From report at bugs.python.org Tue Sep 1 02:31:49 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 01 Sep 2020 06:31:49 +0000 Subject: [issue41678] File-level, optionally external sorting In-Reply-To: <1598889682.73.0.396107473033.issue41678@roundup.psfhosted.org> Message-ID: <1598941909.38.0.690298249646.issue41678@roundup.psfhosted.org> Dennis Sweeney added the comment: Attached is a proof of concept. ---------- Added file: https://bugs.python.org/file49436/disksort.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 02:34:28 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Sep 2020 06:34:28 +0000 Subject: [issue41683] Python3: Installation error on Ubunti-18 In-Reply-To: <1598928956.49.0.0670717412104.issue41683@roundup.psfhosted.org> Message-ID: <1598942068.72.0.259042713562.issue41683@roundup.psfhosted.org> Ned Deily added the comment: If setuptools 50 is in use, you are likely running into one of various problems introduced by setuptools new vendoring of distutils which breaks various Ubuntu local modifications. It looks like a temporary workaround is to to add this environment variable definition: SETUPTOOLS_USE_DISTUTILS=stdlib See https://github.com/pypa/setuptools/issues/2350 and others. If that doesn't work, you may want to follow up on an Ubuntu forum or the pip issue tracker: https://github.com/pypa/pip/issues ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 02:46:21 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Sep 2020 06:46:21 +0000 Subject: [issue41680] Turtles in Python 3.8.5 crashes OSX 10.14.6 In-Reply-To: <1598898277.27.0.605010219391.issue41680@roundup.psfhosted.org> Message-ID: <1598942781.07.0.778647183426.issue41680@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. However, you are going to have give more specific information for us to be able to try to understand and reproduce the problem. Exactly what steps did you use to show the problem, in particular, in what context were those three lines of Python executed: from a file in a Python launched from a command line terminal window, typed into a Python in a command line terminal window, from within an IDLE shell window, from an IDLE edit window? How exactly did Python crash (what error messages were reported)? Also please paste the output from running in a terminal shell window: python3.8 -m test.pythoninfo replacing python3.8 with whatever you use to invoke the Python that fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 04:15:35 2020 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 01 Sep 2020 08:15:35 +0000 Subject: [issue30926] KeyError with cgitb inspecting exception in generator expression In-Reply-To: <1499978803.4.0.623875729197.issue30926@psf.upfronthosting.co.za> Message-ID: <1598948135.4.0.975125679963.issue30926@roundup.psfhosted.org> Zackery Spytz added the comment: Python 2.7 is no longer supported, so I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 04:33:31 2020 From: report at bugs.python.org (Lucca Ruhland) Date: Tue, 01 Sep 2020 08:33:31 +0000 Subject: [issue41684] argparse: unexpected subparser behaviour on parse_args with namespace option Message-ID: <1598949211.7.0.649344000832.issue41684@roundup.psfhosted.org> New submission from Lucca Ruhland : When parsing arguments with a namespace object, the subparser are behaving different than the main parser, although this is not stated in the documentation. Each attribute which is not already part of the namespace, should be saved into the namespace object. Therefore any already existing namespace attribute should overwrite the default value of any argument which is not explicitly set. While this is true for the parent parser, it does not work for the subparser. Here is a small example code: ------------------------------------------------------------------------ import argparse parser = argparse.ArgumentParser() parser.add_argument('--root', type=str, default='.') subparsers = parser.add_subparsers() subparser = subparsers.add_parser('subp') subparser.add_argument('--subroot', type=str, default='./subdir') our_args = argparse.Namespace(root="./config_root", subroot="./config_subdir") argv = ['subp'] args = parser.parse_args(argv, namespace=our_args) print(args) ------------------------------------------------------------------------ >>> Expected: Namespace(root='./config_root', subroot='./config_subdir') >>> Output: Namespace(root='./config_root', subroot='./subdir') When calling the subparser, the namespace attribute is overwritten by the default value. ---------- assignee: docs at python components: Documentation messages: 376183 nosy: docs at python, lucca.ruhland priority: normal severity: normal status: open title: argparse: unexpected subparser behaviour on parse_args with namespace option type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:38:54 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Sep 2020 09:38:54 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 Message-ID: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> New submission from Ned Deily : See pypa/setuptools#2361 for details. For now, temporarily pin setuptools version in the Doc venv to a previous version. Victor notes: ""Temporarily pin setuptools": we already pin Sphinx version to also avoid breaking the CI when a new Sphinx version is released. It would make sense to make our CI less dependent on releases of third party components: better control when we update dependencies. The risk is to forget to update these dependences if the updates are not automated." ---------- assignee: docs at python components: Documentation messages: 376184 nosy: docs at python, mdk, ned.deily, vstinner priority: critical severity: normal stage: commit review status: open title: make doctest on 3.10 (master branch) fails with setuptools 50.0.0 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:39:27 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Sep 2020 09:39:27 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1598953167.56.0.820804255196.issue41685@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: +patch pull_requests: +21135 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/22038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:40:44 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Sep 2020 09:40:44 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1598953244.65.0.519788479988.issue41685@roundup.psfhosted.org> Ned Deily added the comment: New changeset a4c4e17f959621ab00a98086af1704fb0c896466 by Ned Deily in branch 'master': bpo-41685: Temporarily pin setuptools to 49.2.1 in Docs venv. (GH-22038) https://github.com/python/cpython/commit/a4c4e17f959621ab00a98086af1704fb0c896466 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:41:04 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 01 Sep 2020 09:41:04 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1598953264.77.0.55353413704.issue41685@roundup.psfhosted.org> Change by Ned Deily : ---------- priority: critical -> high stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:44:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 09:44:33 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1598953473.02.0.6919006858.issue41685@roundup.psfhosted.org> STINNER Victor added the comment: I proposed https://github.com/pypa/setuptools/pull/2361 to fix setuptools compatibility with Python 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:45:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 09:45:02 +0000 Subject: [issue33997] multiprocessing Pool hangs in terminate() In-Reply-To: <1530275873.32.0.56676864532.issue33997@psf.upfronthosting.co.za> Message-ID: <1598953502.07.0.760964014729.issue33997@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:46:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 09:46:27 +0000 Subject: [issue41622] Add support for emoji-data.txt and emoji-variation-sequences.txt to unicodedata In-Reply-To: <1598214890.63.0.84270917383.issue41622@roundup.psfhosted.org> Message-ID: <1598953587.84.0.741208709266.issue41622@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:47:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 09:47:06 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1598953626.91.0.736311023895.issue41602@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:54:15 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 01 Sep 2020 09:54:15 +0000 Subject: [issue41684] argparse: unexpected subparser behaviour on parse_args with namespace option In-Reply-To: <1598949211.7.0.649344000832.issue41684@roundup.psfhosted.org> Message-ID: <1598954055.73.0.379058645721.issue41684@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:56:25 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 01 Sep 2020 09:56:25 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1598954185.43.0.473171701986.issue41685@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 05:56:15 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 01 Sep 2020 09:56:15 +0000 Subject: [issue41674] Doc tests failing for many PRs on GitHub In-Reply-To: <1598879737.34.0.734115433925.issue41674@roundup.psfhosted.org> Message-ID: <1598954175.98.0.825957295006.issue41674@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This is being fixed by pinning setuptools in issue41685. Closing it as duplicate. ---------- nosy: +xtreak resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> make doctest on 3.10 (master branch) fails with setuptools 50.0.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 06:47:53 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 01 Sep 2020 10:47:53 +0000 Subject: [issue41677] os.access() doesn't recognize lack of permissions on an SMB mountpoint In-Reply-To: <1598887750.34.0.874039613548.issue41677@roundup.psfhosted.org> Message-ID: <1598957273.69.0.569678917776.issue41677@roundup.psfhosted.org> Ronald Oussoren added the comment: os.access is a think wrapper around C APIs (access(2), faccessat(2)). I don't think this is a bug in Python, a shell command like "test -r /opt/xray" will almost certainly give the same result. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 08:32:23 2020 From: report at bugs.python.org (hafiz bilal) Date: Tue, 01 Sep 2020 12:32:23 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' Message-ID: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> New submission from hafiz bilal : Hi, time.sleep() function is not working on Windows host if I use C API Py_InitializeEx(0) function. Issue could be reproduce with following simple example. int main() { Py_InitializeEx(0); PyRun_SimpleString("import time \n" "start = time.time() \n" "time.sleep(4) \n" "print('elapsed: %d' % (time.time() - start))"); } output: elapsed: 0 Note, issue is not reproduce on Linux host. ---------- components: C API messages: 376189 nosy: hafizbilal100 priority: normal severity: normal status: open title: C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 09:20:29 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 01 Sep 2020 13:20:29 +0000 Subject: [issue30926] KeyError with cgitb inspecting exception in generator expression In-Reply-To: <1499978803.4.0.623875729197.issue30926@psf.upfronthosting.co.za> Message-ID: <1598966430.0.0.625928756624.issue30926@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 09:29:57 2020 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 01 Sep 2020 13:29:57 +0000 Subject: [issue40352] SocketHandler silently drops log messages on re-connect In-Reply-To: <1587474127.52.0.907489557829.issue40352@roundup.psfhosted.org> Message-ID: <1598966997.77.0.270006256658.issue40352@roundup.psfhosted.org> Vinay Sajip added the comment: > But when we use TCP it is expected that log messages will not be lost. I wouldn't go that far: logging is not a primary program function (i.e. the library or application should work exactly the same if logging were to be disabled). For the situation where you absolutely don't want to lose messages (apparently not that common a case - the relevant code is over 15 years old, and I can't remember this coming up before), you could either subclass SocketHandler to buffer messages, or use e.g. a MemoryHandler in conjunction with a SocketHandler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 09:34:12 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 01 Sep 2020 13:34:12 +0000 Subject: [issue41371] test_zoneinfo fails when lzma module is unavailable In-Reply-To: <1595449050.37.0.742582022147.issue41371@roundup.psfhosted.org> Message-ID: <1598967252.52.0.441521520529.issue41371@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +21136 pull_request: https://github.com/python/cpython/pull/22039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 09:55:22 2020 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 01 Sep 2020 13:55:22 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris Message-ID: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> New submission from Jakub Kulik : Hi, Sendfile on Solaris raises EINVAL if offset is equal or bigger than the size of the file. This is different from Linux, where similar sendfile call returns 0, which is used in an ad-hoc fashion to indicate EOF. Since Python sendfile implementation expects 0 to be returned, it breaks. I already reported this in issue 36610, which led to sendfile eventually being disabled on Solaris to be safe before the 3.8 release. We were first looking into a possibility to change Solaris behavior of sendfile to reflect that of Linux but decided not to because of the significant risk that it can break existing programs. The other reason is that sendfile isn't standardized (Linux manpage explicitly states that) and hence Solaris implementation isn't broken, just different. Because of that, we patched the runtime and added #ifdef branch (of which there are already many due to os differences) with additional offset check. It is tested with the current master and also 3.7, which we are using internally. Thanks ---------- components: Library (Lib) messages: 376191 nosy: kulikjak priority: normal severity: normal status: open title: sendfile implementation is not compatible with Solaris versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 09:57:04 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 01 Sep 2020 13:57:04 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1598968624.92.0.674450085839.issue41687@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 10:02:22 2020 From: report at bugs.python.org (Jakub Kulik) Date: Tue, 01 Sep 2020 14:02:22 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1598968942.21.0.420700448729.issue41687@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +21137 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 10:34:37 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 01 Sep 2020 14:34:37 +0000 Subject: [issue41681] f-string error description seems wrong In-Reply-To: <1598899225.8.0.488933679404.issue41681@roundup.psfhosted.org> Message-ID: <1598970877.47.0.714424008148.issue41681@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 0d6aa7f0ee38eb453bc8f73bf4830e6172be2f35 by han-solo in branch 'master': bpo-41681: Fix for `f-string/str.format` error description when using 2 `,` in format specifier (GH-22036) https://github.com/python/cpython/commit/0d6aa7f0ee38eb453bc8f73bf4830e6172be2f35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 10:35:18 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 01 Sep 2020 14:35:18 +0000 Subject: [issue41681] f-string error description seems wrong In-Reply-To: <1598899225.8.0.488933679404.issue41681@roundup.psfhosted.org> Message-ID: <1598970918.95.0.0718426350304.issue41681@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +21138 pull_request: https://github.com/python/cpython/pull/22041 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 11:30:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 15:30:47 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1598974247.71.0.395692977383.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: Joshua Root: I'm curious. Can I ask you on which platform do you use clang older than 3.2? It has been released 8 years ago, December 2012. The LLVM project is known to evolve very quickly! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 11:42:45 2020 From: report at bugs.python.org (paul j3) Date: Tue, 01 Sep 2020 15:42:45 +0000 Subject: [issue41684] argparse: unexpected subparser behaviour on parse_args with namespace option In-Reply-To: <1598949211.7.0.649344000832.issue41684@roundup.psfhosted.org> Message-ID: <1598974965.61.0.507935766186.issue41684@roundup.psfhosted.org> paul j3 added the comment: I've noted this behavior before. https://bugs.python.org/issue27859 argparse - subparsers does not retain namespace https://bugs.python.org/issue9351 argparse set_defaults on subcommands should override top level set_defaults Due to a change 2012, the subparser gets a new blank `namespace`. When done those values are copied to the main namespace. That gives subparser defaults priority over both the main ones, and the user provided namespace. I don't entirely like that change, but it was made by the original developer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 11:46:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 01 Sep 2020 15:46:06 +0000 Subject: [issue41681] f-string error description seems wrong In-Reply-To: <1598899225.8.0.488933679404.issue41681@roundup.psfhosted.org> Message-ID: <1598975166.82.0.473707754006.issue41681@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset c16a2a1b643d3e04f86780e2c9e66c3f9f322560 by Miss Islington (bot) in branch '3.9': bpo-41681: Fix for `f-string/str.format` error description when using 2 `,` in format specifier (GH-22036) (GH-22041) https://github.com/python/cpython/commit/c16a2a1b643d3e04f86780e2c9e66c3f9f322560 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 11:49:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 15:49:34 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1598975374.74.0.261898353784.issue41617@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21139 pull_request: https://github.com/python/cpython/pull/22042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 11:53:25 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 01 Sep 2020 15:53:25 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1598975605.34.0.766954548134.issue41686@roundup.psfhosted.org> Eryk Sun added the comment: The SIGINT event gets created when the _signal extension module is imported. Until then, _PyOS_SigintEvent() returns NULL. But currently all code that calls _PyOS_SigintEvent() assumes it returns a valid handle. This has to be fixed to support Py_InitializeEx(0). For example, pysleep could call WinAPI Sleep on the main thread if the interrupt event isn't configured: ul_millis = (unsigned long)millisecs; hInterruptEvent = _PyOS_SigintEvent(); if (ul_millis == 0 || !hInterruptEvent || !_PyOS_IsMainThread()) { Py_BEGIN_ALLOW_THREADS Sleep(ul_millis); Py_END_ALLOW_THREADS break; } ---------- components: +Windows nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware type: -> behavior versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 11:56:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 15:56:25 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1598975785.43.0.835300244426.issue41686@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 11:56:39 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 01 Sep 2020 15:56:39 +0000 Subject: [issue41681] f-string error description seems wrong In-Reply-To: <1598899225.8.0.488933679404.issue41681@roundup.psfhosted.org> Message-ID: <1598975799.27.0.650592124038.issue41681@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:05:50 2020 From: report at bugs.python.org (Lucca Ruhland) Date: Tue, 01 Sep 2020 16:05:50 +0000 Subject: [issue41684] argparse: unexpected subparser behaviour on parse_args with namespace option In-Reply-To: <1598949211.7.0.649344000832.issue41684@roundup.psfhosted.org> Message-ID: <1598976350.33.0.466822731286.issue41684@roundup.psfhosted.org> Lucca Ruhland added the comment: Sorry for the duplication, i haven't noticed the other bug reports. As far as i have seen, i would need to overwrite parts of the _SubParsersAction, _ActionsContainer and ArgumentParser class. Is there maybe an easier way to change the behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:08:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 16:08:28 +0000 Subject: [issue41679] Deprecation warning due to invalid escape sequences in Doc/tools/extensions/peg_highlight.py In-Reply-To: <1598890312.99.0.135296062189.issue41679@roundup.psfhosted.org> Message-ID: <1598976508.33.0.724478950733.issue41679@roundup.psfhosted.org> STINNER Victor added the comment: Do you want to propose a PR to fix these warnings? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:18:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 16:18:43 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1598977123.95.0.623509912565.issue40204@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21140 pull_request: https://github.com/python/cpython/pull/22043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:23:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 16:23:02 +0000 Subject: [issue26053] regression in pdb output between 2.7 and 3.5 In-Reply-To: <1452296621.32.0.373600761217.issue26053@psf.upfronthosting.co.za> Message-ID: <1598977382.96.0.718386279218.issue26053@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:25:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 16:25:28 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1598977528.97.0.641462944511.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e6905e4c82cc05897dc1bf5ab2b5b94b2b043a7f by Victor Stinner in branch 'master': bpo-41617: Fix pycore_bitutils.h to support clang 3.0 (GH-22042) https://github.com/python/cpython/commit/e6905e4c82cc05897dc1bf5ab2b5b94b2b043a7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:29:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 16:29:29 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1598977769.38.0.160295458624.issue41617@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21141 pull_request: https://github.com/python/cpython/pull/22044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:42:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Sep 2020 16:42:49 +0000 Subject: [issue41528] Use math module in turtle In-Reply-To: <1597217786.87.0.701727445347.issue41528@roundup.psfhosted.org> Message-ID: <1598978569.57.0.783342125634.issue41528@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 6844b56176c41f0a0e25fcd4fef5463bcdbc7d7c by Marek Madejski in branch 'master': bpo-41528: Use math module in turtle (GH-21837) https://github.com/python/cpython/commit/6844b56176c41f0a0e25fcd4fef5463bcdbc7d7c ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 12:50:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Sep 2020 16:50:10 +0000 Subject: [issue41549] IDLE leaks `_` into hint box In-Reply-To: <1597395108.67.0.477230529042.issue41549@roundup.psfhosted.org> Message-ID: <1598979010.84.0.0815009492899.issue41549@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 14:28:29 2020 From: report at bugs.python.org (paul j3) Date: Tue, 01 Sep 2020 18:28:29 +0000 Subject: [issue41684] argparse: unexpected subparser behaviour on parse_args with namespace option In-Reply-To: <1598949211.7.0.649344000832.issue41684@roundup.psfhosted.org> Message-ID: <1598984909.38.0.67102302905.issue41684@roundup.psfhosted.org> paul j3 added the comment: When there are potential conflicts between arguments set by the main parser and those set by a subparser, I often recommend giving the sub ones different "dest" parameters. Then you can reconcile the different values after parsing. There's nothing wrong with a bit of post-parsing value checking and adjustment. The primary purpose of the parser is to identify what the user wants, and secondarily to give useful help and error messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 14:31:21 2020 From: report at bugs.python.org (paul j3) Date: Tue, 01 Sep 2020 18:31:21 +0000 Subject: [issue41534] argparse : allow_abbrev behavior between 3.7 and 3.8 In-Reply-To: <1597255813.65.0.986302240119.issue41534@roundup.psfhosted.org> Message-ID: <1598985081.28.0.173387409061.issue41534@roundup.psfhosted.org> paul j3 added the comment: I'm going to close this. 3.8 works as expected/documented, provided we use the normal double dash protocol for long options. Single dash is best reserved for single character options, where chaining is allowed. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 14:40:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 18:40:07 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1598985607.45.0.0366212379041.issue41654@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 9b648a95ccb4c3b14f1e87158f5c9f5dbb2f62c0 by Pablo Galindo in branch 'master': bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) https://github.com/python/cpython/commit/9b648a95ccb4c3b14f1e87158f5c9f5dbb2f62c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 14:54:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 18:54:46 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1598986486.01.0.465146574765.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4217b3c12809b070928413f75949a7ddc4f2221c by Victor Stinner in branch '3.9': bpo-41617: Fix pycore_byteswap.h to support clang 3.0 (GH-22042) (GH-22044) https://github.com/python/cpython/commit/4217b3c12809b070928413f75949a7ddc4f2221c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 14:56:32 2020 From: report at bugs.python.org (Lucca Ruhland) Date: Tue, 01 Sep 2020 18:56:32 +0000 Subject: [issue41684] argparse: unexpected subparser behaviour on parse_args with namespace option In-Reply-To: <1598949211.7.0.649344000832.issue41684@roundup.psfhosted.org> Message-ID: <1598986592.27.0.862957564773.issue41684@roundup.psfhosted.org> Lucca Ruhland added the comment: Thank you very much for your support. I would say we can close this bug report. ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 14:56:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 18:56:30 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1598986590.23.0.00311745612692.issue41617@roundup.psfhosted.org> STINNER Victor added the comment: Thank you Joshua Root for your bug report! Your PR 21942 was good, but I chose to avoid __has_builtin() since it is not supported by all compilers and only available since GCC 10 for GCC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 14:56:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 01 Sep 2020 18:56:47 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1598986607.39.0.807157685079.issue41617@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 15:06:49 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 19:06:49 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1598987209.7.0.990416500072.issue41654@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21142 pull_request: https://github.com/python/cpython/pull/22045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 15:07:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 19:07:10 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1598987230.35.0.98869844442.issue41654@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21143 pull_request: https://github.com/python/cpython/pull/22046 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 15:24:55 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 19:24:55 +0000 Subject: [issue41679] Deprecation warning due to invalid escape sequences in Doc/tools/extensions/peg_highlight.py In-Reply-To: <1598890312.99.0.135296062189.issue41679@roundup.psfhosted.org> Message-ID: <1598988295.47.0.882053016667.issue41679@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +21144 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 15:50:21 2020 From: report at bugs.python.org (Bar Harel) Date: Tue, 01 Sep 2020 19:50:21 +0000 Subject: [issue37873] unittest: execute tests in parallel In-Reply-To: <1565964928.02.0.804836557192.issue37873@roundup.psfhosted.org> Message-ID: <1598989821.35.0.471525094289.issue37873@roundup.psfhosted.org> Change by Bar Harel : ---------- nosy: +bar.harel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 16:08:29 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 01 Sep 2020 20:08:29 +0000 Subject: [issue41688] Document how **= does not fall back on ** In-Reply-To: <1598990897.9.0.376254193992.issue41688@roundup.psfhosted.org> Message-ID: <1598990909.61.0.283717469378.issue41688@roundup.psfhosted.org> Change by Brett Cannon : ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 16:08:17 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 01 Sep 2020 20:08:17 +0000 Subject: [issue41688] Document how **= does not fall back on ** Message-ID: <1598990897.9.0.376254193992.issue41688@roundup.psfhosted.org> New submission from Brett Cannon : https://bugs.python.org/issue38302 covers fixing the fact that `a **= b` does not fall back on `a = a ** b` when `__ipow__` is defined for PYthon 3.10. For older versions of CPython with the bug we should document the slip in semantics. ---------- assignee: docs at python components: Documentation messages: 376207 nosy: brett.cannon, docs at python priority: high severity: normal status: open title: Document how **= does not fall back on ** versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 16:09:07 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 01 Sep 2020 20:09:07 +0000 Subject: [issue38302] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= In-Reply-To: <1569621315.69.0.377751123288.issue38302@roundup.psfhosted.org> Message-ID: <1598990947.21.0.949261634437.issue38302@roundup.psfhosted.org> Brett Cannon added the comment: I have opened https://bugs.python.org/issue41688 to track the documentation fixes so that this can become a release blocker for Python 3.10. ---------- priority: high -> release blocker versions: -Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 16:41:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 20:41:03 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1598992863.84.0.289135886378.issue41654@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d14775ddbb067bcfa6eca516d3cbe968a8c1334e by Pablo Galindo in branch '3.9': [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) (GH-22045) https://github.com/python/cpython/commit/d14775ddbb067bcfa6eca516d3cbe968a8c1334e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 16:41:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 20:41:03 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1598992863.95.0.143230556935.issue41654@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 77f4000ae0d43a2685face80e7f14d4aba053973 by Pablo Galindo in branch '3.8': [3.8] [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) (GH-22046) https://github.com/python/cpython/commit/77f4000ae0d43a2685face80e7f14d4aba053973 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 16:41:03 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 20:41:03 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1598992863.84.0.289135886378.issue41654@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d14775ddbb067bcfa6eca516d3cbe968a8c1334e by Pablo Galindo in branch '3.9': [3.9] bpo-41654: Fix deallocator of MemoryError to account for subclasses (GH-22020) (GH-22045) https://github.com/python/cpython/commit/d14775ddbb067bcfa6eca516d3cbe968a8c1334e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 16:42:29 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 01 Sep 2020 20:42:29 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1598992949.37.0.44041992882.issue41654@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 17:18:11 2020 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 01 Sep 2020 21:18:11 +0000 Subject: [issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown() In-Reply-To: <1579147714.25.0.252393666546.issue39349@roundup.psfhosted.org> Message-ID: <1598995091.45.0.716957352021.issue39349@roundup.psfhosted.org> Kyle Stanley added the comment: New changeset 17dc1b789ecc33b4a254eb3b799085f4b3624ca5 by Shantanu in branch 'master': bpo-39349: Add cancel_futures to Executor.shutdown base class (GH-22023) https://github.com/python/cpython/commit/17dc1b789ecc33b4a254eb3b799085f4b3624ca5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 17:25:39 2020 From: report at bugs.python.org (Shantanu) Date: Tue, 01 Sep 2020 21:25:39 +0000 Subject: [issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown() In-Reply-To: <1579147714.25.0.252393666546.issue39349@roundup.psfhosted.org> Message-ID: <1598995539.83.0.259283749895.issue39349@roundup.psfhosted.org> Change by Shantanu : ---------- pull_requests: +21145 pull_request: https://github.com/python/cpython/pull/22048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 17:32:55 2020 From: report at bugs.python.org (David Bolen) Date: Tue, 01 Sep 2020 21:32:55 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1598995975.43.0.322210697251.issue39010@roundup.psfhosted.org> David Bolen added the comment: I've been seeing failures on the Win10 buildbot 3.x branch that seem to correlate with the timing of this change - could there be some further work needed on Windows? Or, if it's a test-only artifact and the warnings are innocuous, something to ignore the output during the tests? Specifically, the following warnings occur during test_asyncio: Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Warning -- Dangling thread: <_MainThread(MainThread, started 5220)> See https://buildbot.python.org/all/#/builders/146/builds/23 for the first failing build. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 18:10:38 2020 From: report at bugs.python.org (mohamed koubaa) Date: Tue, 01 Sep 2020 22:10:38 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1598998238.71.0.495719748834.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21146 pull_request: https://github.com/python/cpython/pull/22049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 18:11:42 2020 From: report at bugs.python.org (mohamed koubaa) Date: Tue, 01 Sep 2020 22:11:42 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1598998302.22.0.394944054132.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21147 pull_request: https://github.com/python/cpython/pull/22050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 18:23:51 2020 From: report at bugs.python.org (mohamed koubaa) Date: Tue, 01 Sep 2020 22:23:51 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1598999031.49.0.119410916867.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21148 pull_request: https://github.com/python/cpython/pull/22051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 22:02:52 2020 From: report at bugs.python.org (Ben Darnell) Date: Wed, 02 Sep 2020 02:02:52 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599012172.9.0.378517048714.issue39010@roundup.psfhosted.org> Ben Darnell added the comment: I can confirm that those warnings appear to be coming from the test I added here. I'm not sure how to interpret them, though - what does it mean for the main thread to be dangling? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 22:34:35 2020 From: report at bugs.python.org (Ammar Askar) Date: Wed, 02 Sep 2020 02:34:35 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1599014075.26.0.755582878172.issue41685@roundup.psfhosted.org> Ammar Askar added the comment: Victor's fix is now in the 50.0.2 release, should we bump the pinned version, remove its pinning or do nothing? https://github.com/pypa/setuptools/commit/edcf84faaf17e87e6e38796dd24f66d9236bf87c https://pypi.org/project/setuptools/#history ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 1 23:41:14 2020 From: report at bugs.python.org (David Bolen) Date: Wed, 02 Sep 2020 03:41:14 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599018074.57.0.651352994178.issue39010@roundup.psfhosted.org> David Bolen added the comment: I'm guessing the warning appears odd as we're seeing a thread shutdown data race. The message is produced by threading_cleanup in support/threading_helper.py, and it appears that between the first and second lines one of the initially dangling threads goes away, so the only one left to be enumerated is the main thread, at which point the function is simply listing all threads currently alive. But by that point it's just the main thread remaining. I notice in the test that you have a comment about needing to wait for f to complete or you get a warning about thread not shutting down cleanly. Was that a similar warning? The run_until_complete(f) line seems to have no effect on the buildbot. If I added a small sleep at the end of the test the warnings go away on the buildbot. The buildbot is a fairly fast machine, so perhaps the test just needs to wait somehow for the event loop to fully shut down or something. The most direct cause of the warnings seems to be the self.loop.close() call - if I just comment that out the test runs warning-free without any extra delay needed. I don't know much about asyncio tests, but it would appear the close call in the test defeats some of the logic in the close_loop teardown code that runs under TestCase (in utils.py), which under Windows is just a call to run_until_complete(loop.shutdown_default_executor()). If I add that same call to the test prior to the close it also passes cleanly. So if closing the loop in the test itself is crucial, I'd suggest including the extra run_until_complete call. If closing isn't crucial to the test, simply removing it seems to address the issue. I'm not sure if its removal then has any implications for the extra run_until_complete(f) call in the test, as I can't see any impact from that on the buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 00:37:01 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Sep 2020 04:37:01 +0000 Subject: [issue41689] allow __text_signature__ to work for c heap types Message-ID: <1599021421.22.0.223210002461.issue41689@roundup.psfhosted.org> New submission from Benjamin Peterson : C types can add a signature to their __doc__. Currently, PyType_FromSpec just deletes such signatures instead of making them visible from __text_signature__. ---------- components: C API messages: 376216 nosy: benjamin.peterson priority: normal severity: normal status: open title: allow __text_signature__ to work for c heap types versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 00:41:16 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Sep 2020 04:41:16 +0000 Subject: [issue41689] allow __text_signature__ to work for c heap types In-Reply-To: <1599021421.22.0.223210002461.issue41689@roundup.psfhosted.org> Message-ID: <1599021676.39.0.680000596312.issue41689@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +21149 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 02:09:55 2020 From: report at bugs.python.org (Hanish) Date: Wed, 02 Sep 2020 06:09:55 +0000 Subject: [issue41681] f-string error description seems wrong In-Reply-To: <1598899225.8.0.488933679404.issue41681@roundup.psfhosted.org> Message-ID: <1599026995.36.0.972132026676.issue41681@roundup.psfhosted.org> Change by Hanish : ---------- pull_requests: +21150 pull_request: https://github.com/python/cpython/pull/22059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 04:17:45 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Sep 2020 08:17:45 +0000 Subject: [issue40352] SocketHandler silently drops log messages on re-connect In-Reply-To: <1587474127.52.0.907489557829.issue40352@roundup.psfhosted.org> Message-ID: <1599034665.62.0.893020569728.issue40352@roundup.psfhosted.org> Serhiy Storchaka added the comment: In this particular case we do not need a buffer. It is enough to reopen the socket and send the current message again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 05:12:46 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Sep 2020 09:12:46 +0000 Subject: [issue40352] SocketHandler silently drops log messages on re-connect In-Reply-To: <1587474127.52.0.907489557829.issue40352@roundup.psfhosted.org> Message-ID: <1599037966.67.0.899007045704.issue40352@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +21151 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 05:45:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 09:45:27 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599039927.24.0.430991337433.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a7f026870d2dab7015a94e287bec6dd46cdbf604 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _blake2 module to multi-phase init (GH-21856) https://github.com/python/cpython/commit/a7f026870d2dab7015a94e287bec6dd46cdbf604 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 05:51:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 09:51:50 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1599040310.11.0.803463057317.issue41686@roundup.psfhosted.org> STINNER Victor added the comment: Py_InitializeEx() should be modified to always initialize sigint_event, even if install_sigs is equal to zero. Maybe the variable should be moved somewhere else. Maybe in the time module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 05:52:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 09:52:26 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1599040346.1.0.276307216076.issue41686@roundup.psfhosted.org> STINNER Victor added the comment: By the way, it would be nice to add error handling on: sigint_event = CreateEvent(NULL, TRUE, FALSE, FALSE); See also PR #22049. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 05:55:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 09:55:26 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599040526.38.0.533663732078.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 93d50a6a8d0c5d332c11aef267e66573a09765ac by Mohamed Koubaa in branch 'master': bpo-1635741: Port _sha3 module to multi-phase init (GH-21855) https://github.com/python/cpython/commit/93d50a6a8d0c5d332c11aef267e66573a09765ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 05:57:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 09:57:13 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1599040633.98.0.835282794131.issue41654@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the fix Pablo! Thanks for the funny bug report Oleg Hoefling! I didn't expect that anyone would ever subclass MemoryError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 05:57:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 09:57:36 +0000 Subject: [issue37873] unittest: execute tests in parallel In-Reply-To: <1565964928.02.0.804836557192.issue37873@roundup.psfhosted.org> Message-ID: <1599040656.87.0.275275541378.issue37873@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 06:29:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 10:29:35 +0000 Subject: [issue40204] Docs build error with Sphinx 3.0 due to invalid C declaration In-Reply-To: <1586183568.2.0.322929459864.issue40204@roundup.psfhosted.org> Message-ID: <1599042575.53.0.323849765872.issue40204@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c0d5c131d9c1ac743058fae99f913b455fc90ac7 by Victor Stinner in branch 'master': bpo-40204: Update Sphinx to version 3.2.1 in Doc/Makefile (GH-22043) https://github.com/python/cpython/commit/c0d5c131d9c1ac743058fae99f913b455fc90ac7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 06:33:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 10:33:42 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1599042822.5.0.900815883765.issue41685@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21152 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 06:34:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 10:34:31 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1599042871.62.0.787370510159.issue41685@roundup.psfhosted.org> STINNER Victor added the comment: I proposed PR 22062 to unpin the setuptools version. Unless someone steps in and proposes a solution to automate updating the pinned setuptools version, I prefer to not pin the version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 06:59:21 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 10:59:21 +0000 Subject: [issue41690] Use a loop to collect args in the parser instead of recursion Message-ID: <1599044361.34.0.302314568095.issue41690@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : This program can segfault the parser by stackoverflow: import ast code = "f(" + ",".join(['a' for _ in range(100000)]) + ")" print("Ready!") ast.parse(code) the reason is that the rule for arguments has a simple recursion when collecting args: args[expr_ty]: [...] | a=named_expression b=[',' c=args { c }] { [...] } Check https://github.com/we-like-parsers/pegen/issues/245 for more context and informaton ---------- messages: 376225 nosy: pablogsal priority: normal severity: normal status: open title: Use a loop to collect args in the parser instead of recursion versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 06:59:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 10:59:35 +0000 Subject: [issue41690] Use a loop to collect args in the parser instead of recursion In-Reply-To: <1599044361.34.0.302314568095.issue41690@roundup.psfhosted.org> Message-ID: <1599044375.21.0.568472585691.issue41690@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +21153 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 07:11:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 02 Sep 2020 11:11:18 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599045078.82.0.254357698244.issue38762@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch nosy: +iritkatriel nosy_count: 2.0 -> 3.0 pull_requests: +21154 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 07:11:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 11:11:24 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1599045084.99.0.717215752294.issue41685@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 51fece1bb8d7aa22f114172a256714fe24788e31 by Victor Stinner in branch 'master': bpo-41685: Don't pin setuptools version anymore in Doc/Makefile (GH-22062) https://github.com/python/cpython/commit/51fece1bb8d7aa22f114172a256714fe24788e31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 07:11:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 11:11:55 +0000 Subject: [issue41685] make doctest on 3.10 (master branch) fails with setuptools 50.0.0 In-Reply-To: <1598953134.12.0.788721169473.issue41685@roundup.psfhosted.org> Message-ID: <1599045115.74.0.0434132379637.issue41685@roundup.psfhosted.org> STINNER Victor added the comment: As far as I know, the issue is fixed, so I close the issue. Thanks Ned for the temporary fix to repair the workflow! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 07:27:58 2020 From: report at bugs.python.org (David Crespo) Date: Wed, 02 Sep 2020 11:27:58 +0000 Subject: [issue41691] Idle 3.8.5 on Win64 won't save a file if it didn't include a newline when it was opened (ex: opening empty file) Message-ID: <1599046078.06.0.268934557443.issue41691@roundup.psfhosted.org> New submission from David Crespo : Idle won't save a file if it didn't include a newline when it was opened (ex: opening empty file) Steps for reproducing the error: 1) get into some folder in Windows File Explorer 2) right-click on empty space for context menu 3) click new -> create text file 4) rename to test.py 5) right click on test.py for context menu 6) click Edit with Idle -> Edit with Idle 3.8 64-bit 7) write some code, ex: print('hello, world!) 8) try to save the file with CTRL+S, or menu file->save, file->save as or file->save a copy IDLE will silently refuse to save the file, the 'not saved' asterisk will remain next to the file name and no file is written. I am using a workaround for this since creating empty files and editing them is part of my usual workflow. If I edit the file with another text editor, save it, and then open it from the context menu, it can be saved after editing, but ONLY if i put a newline in the file from the alternate text editor. If my the file does NOT contain any newline at opening time, IDLE refuses to save it. This error (refusing to save) seems to happen also when opening from menu file->open any file which does NOT contain any newline. Regards. ---------- assignee: terry.reedy components: IDLE messages: 376228 nosy: dcrespo3d, terry.reedy priority: normal severity: normal status: open title: Idle 3.8.5 on Win64 won't save a file if it didn't include a newline when it was opened (ex: opening empty file) type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 07:32:11 2020 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 02 Sep 2020 11:32:11 +0000 Subject: [issue40352] SocketHandler silently drops log messages on re-connect In-Reply-To: <1587474127.52.0.907489557829.issue40352@roundup.psfhosted.org> Message-ID: <1599046331.26.0.0718825873111.issue40352@roundup.psfhosted.org> Vinay Sajip added the comment: > It is enough to reopen the socket and send the current message again. A common reason for connection failure in SocketHandler is the other end going offline for some reason. The offline period can often be measured in seconds to hours, or even longer. The current strategy is to retry connection, but on the next logging call, and with an exponential backoff. Otherwise, if the remote end goes down and you keep retrying to connect on the same call, the handler would keep trying to connect and failing, and this could slow things down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 08:23:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 12:23:16 +0000 Subject: [issue41642] Buildbot: workers detached every minute and "no space left on device" issue In-Reply-To: <1598434194.1.0.809832074407.issue41642@roundup.psfhosted.org> Message-ID: <1599049396.54.0.803254594528.issue41642@roundup.psfhosted.org> STINNER Victor added the comment: > I can provide some information from the logs of one of the buildbots, or change a parameter. Let me know. David: can you please change the buildbot client configuration to use "buildbot-api.python.org" host name? This host name doesn't go through the PSF load balancer. It seems like TCP connection issues are coming from the load balancer. Also, please reduce the keepalive to 60 seconds (keepalive_interval). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 08:36:33 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 02 Sep 2020 12:36:33 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1599050193.87.0.427897462527.issue41686@roundup.psfhosted.org> Eryk Sun added the comment: > Maybe in the time module? The SIGINT event is also needed by PyOS_Readline, _io (builtin), _winapi (builtin), and _multiprocessing (pyd). Is the time module guaranteed to be imported in 3.x? It appears to get imported incidentally via _PyImportZip_Init (zipimport). Could sigint_event be relocated to a platform-dependent union in _PyRuntimeState that gets initialized and finalized independent of any module? For example, accessed as _PyRuntime.platform.windows.sigint_event. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 08:38:46 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 02 Sep 2020 12:38:46 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1599050326.31.0.453134884904.issue41686@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg376231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 08:40:41 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 02 Sep 2020 12:40:41 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1599050441.24.0.678117751539.issue41686@roundup.psfhosted.org> Eryk Sun added the comment: > Maybe in the time module? The SIGINT event is also needed by PyOS_Readline, _io (builtin), _winapi (builtin), and _multiprocessing (pyd). Is the time module guaranteed to be imported in 3.x? It appears to get imported incidentally via _PyImportZip_Init (zipimport). Could sigint_event be relocated to a platform-dependent extension of _PyRuntimeState that gets initialized and finalized independent of any module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 08:50:37 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 02 Sep 2020 12:50:37 +0000 Subject: [issue41691] Idle 3.8.5 on Win64 won't save a file if it didn't include a newline when it was opened (ex: opening empty file) In-Reply-To: <1599046078.06.0.268934557443.issue41691@roundup.psfhosted.org> Message-ID: <1599051037.2.0.918010309161.issue41691@roundup.psfhosted.org> E. Paine added the comment: Thank you for reporting this bug (particularly for the detailed instructions for reproduction). This has already been fixed in #41373 just over a month ago, and is already available in the 3.9 release candidate (though the fix will not be released for 3.8 until 3.8.6). ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 09:08:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 13:08:13 +0000 Subject: [issue41642] Buildbot: workers detached every minute and "no space left on device" issue In-Reply-To: <1598434194.1.0.809832074407.issue41642@roundup.psfhosted.org> Message-ID: <1599052093.15.0.283909386297.issue41642@roundup.psfhosted.org> STINNER Victor added the comment: Charris, Pablo and me identified that TCP connections are closed by the load balancer on some buildbot workers. When the "buildbot.python.org" host name is used, TCP connections (tcp port 9020) go through a load balancer. Ernest exposed the TCP port 9020 directly to the Internet (without the load balancer) using a new host name: "buildbot-api.python.org". Buildbot workers should be updated to use "buildbot-api.python.org". I also suggest to use a keepalive of 60 seconds, rather than 600 seconds. If your worker got impacted the this issue, I strongly advice you to clean up manually the temporary directory (/tmp). When a worker was disconnected, the build was interrupted without removing temporary files. On some workers, we got around 20 GB of temporary files in /tmp: "ccXXXX" files and "tmpXXXX" files. I guess that some files are coming from the compiler, some other from the Python test suite. I updated the buildbot client configuration of the 9 workers operated by Red Hat: Fedora Rawhide x64-86 Fedora Stable x64-86 RHEL8 x64-86 RHEL7 x64-86 RHEL8 FIPS x86-64 Fedora Rawhide AArch64 Fedora Stable AArch64 RHEL 8 ppc64le RHEL 7 ppc64le On our owners, I used the following commands: systemctl stop buildbot-worker.service du -sh /tmp; rm -f /tmp/{cc,tmp}*; du -sh /tmp sed -i -e "s/buildmaster_host = 'buildbot.python.org'/buildmaster_host = 'buildbot-api.python.org'/;s/keepalive = .*/keepalive = 60/" /home/buildbot/buildarea/buildbot.tac; grep -E '(host|keepalive) =' /home/buildbot/buildarea/buildbot.tac systemctl start buildbot-worker.service systemctl status buildbot-worker.service ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 09:11:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 13:11:46 +0000 Subject: [issue41642] Buildbot: workers detached every minute and "no space left on device" issue In-Reply-To: <1598434194.1.0.809832074407.issue41642@roundup.psfhosted.org> Message-ID: <1599052306.39.0.13411792041.issue41642@roundup.psfhosted.org> STINNER Victor added the comment: Ah, I also updated: Fedora Stable ppc64le Fedora Rawhide ppc64le ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 09:13:14 2020 From: report at bugs.python.org (Marek Madejski) Date: Wed, 02 Sep 2020 13:13:14 +0000 Subject: [issue41528] Use math module in turtle In-Reply-To: <1597217786.87.0.701727445347.issue41528@roundup.psfhosted.org> Message-ID: <1599052394.39.0.0476659010952.issue41528@roundup.psfhosted.org> Marek Madejski added the comment: Complex numbers to be considered, of course. My first pull request, so I'd rather not make such a revolution this time. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 09:59:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 13:59:25 +0000 Subject: [issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal() Message-ID: <1599055165.93.0.874786911809.issue41692@roundup.psfhosted.org> New submission from STINNER Victor : Python has the concept of "immortal" interned strings: PyUnicode_InternImmortal(). The feature was first introduced in the Python 2 "str" (bytes) type, bpo-576101 (commit 45ec02aed14685c353e55841b5acbc0dadee76f8). New PyString_InternImmortal() function. commit 45ec02aed14685c353e55841b5acbc0dadee76f8 Author: Guido van Rossum Date: Mon Aug 19 21:43:18 2002 +0000 SF patch 576101, by Oren Tirosh: alternative implementation of interning. I modified Oren's patch significantly, but the basic idea and most of the implementation is unchanged. Interned strings created with PyString_InternInPlace() are now mortal, and you must keep a reference to the resulting string around; use the new function PyString_InternImmortal() to create immortal interned strings. Later, the feature was added to the PyUnicodeObject type, new PyUnicode_InternImmortal() function: commit 1680713e524016d93a94114c4a874ad71a090b95 Author: Walter D?rwald Date: Fri May 25 13:52:07 2007 +0000 Add interning of unicode strings by copying the functionality from stringobject.c. Intern "True" and "False" in bool_repr() again as it was in the 8bit string era. Since Python 3.10, (mortal) interned strings are cleared at Python exit in Py_Finalize(). It avoids leaking memory when Python is embedded in an application: bpo-1635741. commit 666ecfb0957a2fa0df5e2bd03804195de74bdfbf Author: Victor Stinner Date: Thu Jul 2 01:19:57 2020 +0200 bpo-1635741: Release Unicode interned strings at exit (GH-21269) * PyUnicode_InternInPlace() now ensures that interned strings are ready. * Add _PyUnicode_ClearInterned(). * Py_Finalize() now releases Unicode interned strings: call _PyUnicode_ClearInterned(). -- PyUnicode_InternImmortal() is not used in the Python standard library. I propose to start deprecating the function and remove it in Python 3.12 (PEP 387 requires a deprecation for 2 releases). In Python 3.10, calling the function will emit a DeprecationWarning at runtime. Note: PyString_InternImmortal() (for bytes strings) has been removed from Python 3.0. ---------- components: Interpreter Core messages: 376237 nosy: inada.naoki, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Deprecate immortal interned strings: PyUnicode_InternImmortal() versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:14:12 2020 From: report at bugs.python.org (David Edelsohn) Date: Wed, 02 Sep 2020 14:14:12 +0000 Subject: [issue41642] Buildbot: workers detached every minute and "no space left on device" issue In-Reply-To: <1598434194.1.0.809832074407.issue41642@roundup.psfhosted.org> Message-ID: <1599056052.49.0.80498524712.issue41642@roundup.psfhosted.org> David Edelsohn added the comment: I have updated edelsohn-aix-ppc64 edelsohn-debian-z edelsohn-fedora-ppc64 edelsohn-fedora-rawhide-z edelsohn-fedora-z edelsohn-rhel-z edelsohn-rhel8-z edelsohn-sles-z aixtools-aix-power6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:17:11 2020 From: report at bugs.python.org (Abael He) Date: Wed, 02 Sep 2020 14:17:11 +0000 Subject: [issue41693] AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) Message-ID: <1599056231.08.0.17351963613.issue41693@roundup.psfhosted.org> New submission from Abael He : Abaels-MBP:notebook-myfork abaelhe$ pip install jupyterlab_powerpoint Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://mirror.baidu.com/pypi/simple Collecting jupyterlab_powerpoint Downloading https://pypi.tuna.tsinghua.edu.cn/packages/67/b3/7c65696326b35c2cf62f7203ddc6915518769b3281297762505496c02cbb/jupyterlab_powerpoint-0.1.0-py2.py3-none-any.whl (22 kB) Collecting python-pptx>=0.6.0 ?? Building wheels for collected packages: python-pptx Building wheel for python-pptx (setup.py) ... done Created wheel for python-pptx: filename=python_pptx-0.6.18-py3-none-any.whl size=275703 sha256=2cc60bf3fd5d8de7909a47cf2318248fe7f966f64da1014be413db2274abd19c Stored in directory: /Users/abaelhe/Library/Caches/pip/wheels/2c/92/3f/c614b86f8f18dc83f377a94e76a2f2fb1a1b6d5d74d438d2f4 Successfully built python-pptx Installing collected packages: lxml, XlsxWriter, python-pptx, jupyterlab-powerpoint Successfully installed XlsxWriter-1.3.3 jupyterlab-powerpoint-0.1.0 lxml-4.5.2 python-pptx-0.6.18 Abaels-MBP:notebook-myfork abaelhe$ jupyter labextension install jupyterlab_powerpoint jupyter serverextension enable --py jupyterlab_powerpointjupyter serverextension enable --py jupyterlab_powerpointjupyter serverextension enable --py jupyterlab_powerpointBuilding jupyterlab assets (build:prod:minimize) --- Logging error --- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shutil.py", line 670, in _rmtree_safe_fd os.unlink(entry.name, dir_fd=topfd) PermissionError: [Errno 13] Permission denied: '403.html' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 1081, in emit msg = self.format(record) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 925, in format return fmt.format(record) File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/traitlets/config/application.py", line 117, in format return super(LevelFormatter, self).format(record) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 672, in format record.exc_text = self.formatException(record.exc_info) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/__init__.py", line 622, in formatException traceback.print_exception(ei[0], ei[1], tb, None, sio) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/traceback.py", line 103, in print_exception for line in TracebackException( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/traceback.py", line 479, in __init__ if (exc_value and exc_value.__cause__ is not None AttributeError: 'str' object has no attribute '__cause__' Call stack: File "/Users/abaelhe/Library/Python/3.8/bin/jupyter-labextension", line 8, in sys.exit(main()) File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyter_core/application.py", line 270, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/traitlets/config/application.py", line 664, in launch_instance app.start() File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyterlab/labextensions.py", line 308, in start super(LabExtensionApp, self).start() File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyter_core/application.py", line 259, in start self.subapp.start() File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyterlab/labextensions.py", line 104, in start build(clean_staging=self.should_clean, File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyterlab/commands.py", line 459, in build return handler.build(name=name, version=version, static_url=static_url, File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyterlab/commands.py", line 640, in build self._populate_staging( File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyterlab/commands.py", line 1100, in _populate_staging _rmtree(templates, self.logger) File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyterlab/commands.py", line 1824, in _rmtree shutil.rmtree(path, onerror=onerror) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shutil.py", line 715, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shutil.py", line 672, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/Users/abaelhe/Library/Python/3.8/lib/python/site-packages/jupyterlab/commands.py", line 1822, in onerror logger.debug('Error in shutil.rmtree', exc_info=exc_info) Message: 'Error in shutil.rmtree' Arguments: () --- Logging error --- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/shutil.py", line 670, in _rmtree_safe_fd os.unlink(entry.name, dir_fd=topfd) PermissionError: [Errno 13] Permission denied: 'partial.html' ?? An error occured. ---------- components: Library (Lib) files: traceback.log messages: 376239 nosy: abaelhe priority: normal severity: normal status: open title: AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49437/traceback.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:17:39 2020 From: report at bugs.python.org (Abael He) Date: Wed, 02 Sep 2020 14:17:39 +0000 Subject: [issue41693] AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) In-Reply-To: <1599056231.08.0.17351963613.issue41693@roundup.psfhosted.org> Message-ID: <1599056259.46.0.936257907827.issue41693@roundup.psfhosted.org> Change by Abael He : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:28:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 14:28:25 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599056905.17.0.555305612242.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-41692: "Deprecate immortal interned strings: PyUnicode_InternImmortal()". ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:29:25 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 14:29:25 +0000 Subject: [issue41675] Modernize siginterrupt calls In-Reply-To: <1598881882.83.0.824642954099.issue41675@roundup.psfhosted.org> Message-ID: <1599056965.02.0.0892946930248.issue41675@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:29:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 14:29:20 +0000 Subject: [issue41675] Modernize siginterrupt calls In-Reply-To: <1598881882.83.0.824642954099.issue41675@roundup.psfhosted.org> Message-ID: <1599056960.08.0.174445426926.issue41675@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f9c5e3f5f61cd380f8a17c814766fc3730b7fbdf by Pablo Galindo in branch 'master': bpo-41675: Modernize siginterrupt calls (GH-22028) https://github.com/python/cpython/commit/f9c5e3f5f61cd380f8a17c814766fc3730b7fbdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:30:49 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 02 Sep 2020 14:30:49 +0000 Subject: [issue41679] Deprecation warning due to invalid escape sequences in Doc/tools/extensions/peg_highlight.py In-Reply-To: <1598890312.99.0.135296062189.issue41679@roundup.psfhosted.org> Message-ID: <1599057049.86.0.837671780063.issue41679@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21155 pull_request: https://github.com/python/cpython/pull/22065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:35:10 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 02 Sep 2020 14:35:10 +0000 Subject: [issue41693] AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) In-Reply-To: <1599056231.08.0.17351963613.issue41693@roundup.psfhosted.org> Message-ID: <1599057310.38.0.790212273919.issue41693@roundup.psfhosted.org> Eric V. Smith added the comment: This looks like a problem with jupyter, possibly related to the permission error. Have you tried a jupyter forum for help? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:40:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Sep 2020 14:40:10 +0000 Subject: [issue41691] Idle 3.8.5 on Win64 won't save a file if it didn't include a newline when it was opened (ex: opening empty file) In-Reply-To: <1599046078.06.0.268934557443.issue41691@roundup.psfhosted.org> Message-ID: <1599057610.95.0.353851633445.issue41691@roundup.psfhosted.org> Terry J. Reedy added the comment: For future reference, bpo has a search function. Searching with component = IDLE and status = Closed or Don't care would have found this. ---------- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> IDLE: edit/save files created by Windows Explorer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:45:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 02 Sep 2020 14:45:35 +0000 Subject: [issue41528] Use math module in turtle In-Reply-To: <1597217786.87.0.701727445347.issue41528@roundup.psfhosted.org> Message-ID: <1599057935.14.0.847124323963.issue41528@roundup.psfhosted.org> Terry J. Reedy added the comment: You could post a suggested replacement for a couple of the expressions, with the warning that we would not necessarily use it. math.hypot has recently be worked over so that it is perhaps more accurate than the standard C version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:47:41 2020 From: report at bugs.python.org (David Crespo) Date: Wed, 02 Sep 2020 14:47:41 +0000 Subject: [issue41691] Idle 3.8.5 on Win64 won't save a file if it didn't include a newline when it was opened (ex: opening empty file) In-Reply-To: <1599046078.06.0.268934557443.issue41691@roundup.psfhosted.org> Message-ID: <1599058061.87.0.24571500943.issue41691@roundup.psfhosted.org> David Crespo added the comment: Thanks for your answers. I tried to search if the bug was already reported using some text searches but I couldn't find it so I opened a new one. Next time I'll try what you recommend. Regards and thanks for keeping Python in good shape! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:49:33 2020 From: report at bugs.python.org (Ben Darnell) Date: Wed, 02 Sep 2020 14:49:33 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599058173.75.0.31131503558.issue39010@roundup.psfhosted.org> Change by Ben Darnell : ---------- pull_requests: +21156 pull_request: https://github.com/python/cpython/pull/22066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:49:46 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 02 Sep 2020 14:49:46 +0000 Subject: [issue38055] Starting multiprocessing.Process raises FileNotFoundError unexpectedly In-Reply-To: <1567951615.68.0.110531280911.issue38055@roundup.psfhosted.org> Message-ID: <1599058186.18.0.47495282327.issue38055@roundup.psfhosted.org> Irit Katriel added the comment: On windows 10, Python 3.10 I don't get a FileNotFoundError from this script. Which system and python version are you seeing it on? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 10:51:40 2020 From: report at bugs.python.org (Ben Darnell) Date: Wed, 02 Sep 2020 14:51:40 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599058300.28.0.23618177085.issue39010@roundup.psfhosted.org> Ben Darnell added the comment: I've fixed the test and added some commentary about the different levels of clean shutdown we must do to quiet all the warnings: https://github.com/python/cpython/pull/22066 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 11:26:43 2020 From: report at bugs.python.org (Abael He) Date: Wed, 02 Sep 2020 15:26:43 +0000 Subject: [issue41693] AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) In-Reply-To: <1599056231.08.0.17351963613.issue41693@roundup.psfhosted.org> Message-ID: <1599060403.01.0.26866476716.issue41693@roundup.psfhosted.org> Abael He added the comment: "traceback.py" exception occurred During handling of the jupyter exception; that denotes we need more robust "traceback.py"; i have submit PR: https://github.com/python/cpython/pull/22064 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 11:34:34 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 02 Sep 2020 15:34:34 +0000 Subject: [issue41693] AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) In-Reply-To: <1599056231.08.0.17351963613.issue41693@roundup.psfhosted.org> Message-ID: <1599060874.41.0.913049707972.issue41693@roundup.psfhosted.org> Eric V. Smith added the comment: I'm not convinced. Isn't the real problem that exc_value is a str, and you're just hiding that problem now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:02:12 2020 From: report at bugs.python.org (hai shi) Date: Wed, 02 Sep 2020 16:02:12 +0000 Subject: [issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal() In-Reply-To: <1599055165.93.0.874786911809.issue41692@roundup.psfhosted.org> Message-ID: <1599062532.67.0.26634688106.issue41692@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:15:41 2020 From: report at bugs.python.org (Dallas Marlow) Date: Wed, 02 Sep 2020 16:15:41 +0000 Subject: [issue41694] python3 futures.as_completed timeout broken if future contains undefined reference Message-ID: <1599063341.29.0.717862056359.issue41694@roundup.psfhosted.org> New submission from Dallas Marlow : I recently noticed that timeouts do not work with futures.as_completed if a future contains an undefined variable or method. The following code runs for 30 seconds which I believe is a bug as I would expect the invalid print future to throw an exception immediately or the as_completed method throw an exception instead. ######################### import concurrent.futures with concurrent.futures.ThreadPoolExecutor() as ex: futures = [ ex.submit(time.sleep, 30), ex.submit(print, a), ] for future in concurrent.futures.as_completed(futures, timeout=1): _ = future.result() ---------- components: Interpreter Core messages: 376250 nosy: dallasmarlow priority: normal severity: normal status: open title: python3 futures.as_completed timeout broken if future contains undefined reference versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:29:14 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Sep 2020 16:29:14 +0000 Subject: [issue41689] allow __text_signature__ to work for c heap types In-Reply-To: <1599021421.22.0.223210002461.issue41689@roundup.psfhosted.org> Message-ID: <1599064154.57.0.302420769584.issue41689@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 3940333637b98a2781869977b077552514784529 by Benjamin Peterson in branch 'master': closes bpo-41689: Preserve text signature from tp_doc in C heap type creation. (GH-22058) https://github.com/python/cpython/commit/3940333637b98a2781869977b077552514784529 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:33:05 2020 From: report at bugs.python.org (Dallas Marlow) Date: Wed, 02 Sep 2020 16:33:05 +0000 Subject: [issue41694] python3 futures.as_completed timeout broken if future contains undefined reference In-Reply-To: <1599063341.29.0.717862056359.issue41694@roundup.psfhosted.org> Message-ID: <1599064385.66.0.264159737121.issue41694@roundup.psfhosted.org> Dallas Marlow added the comment: After closer inspection it seems as though timeouts are not working as I would expect even when there are no undefined references. The following code runs for 30s when I would expect a timeout exception thrown after 1 second. as_completed eventually does throw a timeout exception, but only after the sleep future completes. ############################### import concurrent.futures import time with concurrent.futures.ThreadPoolExecutor() as ex: futures = [ ex.submit(time.sleep, 30), ex.submit(print, 'test'), ] for future in concurrent.futures.as_completed(futures, timeout=1): _ = future.result() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:41:04 2020 From: report at bugs.python.org (=?utf-8?q?Beno=C3=AEt_Brayer?=) Date: Wed, 02 Sep 2020 16:41:04 +0000 Subject: [issue41695] http.cookies.SimpleCookie.parse could not parse cookies when one cookie value is json Message-ID: <1599064864.53.0.936259028803.issue41695@roundup.psfhosted.org> New submission from Beno?t Brayer : Using python3.8.5, SimpleCookie parser seems to be unable to load the cookie string when a json string is used inside one of the cookie values. I did not try to replay using other python3 versions yet. Please use the following code to replay the bug: >>> from http import cookies >>> cookie_parser = cookies.SimpleCookie() >>> cookie_parser.load('CookieScriptConsent={"action":"accept"}; __stripe_mid=plip; __stripe_sid=plop; _ga=tada; _gcl_au=pouet; _hjid=hello; authn_token=mylogin; rememberMe=true') >>> cookie_parser.keys() dict_keys([]) >>> cookie_parser = cookies.SimpleCookie() >>> cookie_parser.load('__stripe_mid=plip; __stripe_sid=plop; _ga=tada; _gcl_au=pouet; _hjid=hello; authn_token=mylogin; rememberMe=true') >>> cookie_parser.keys() dict_keys(['__stripe_mid', '__stripe_sid', '_ga', '_gcl_au', '_hjid', 'authn_token', 'rememberMe']) ---------- messages: 376253 nosy: brayer.benoit priority: normal severity: normal status: open title: http.cookies.SimpleCookie.parse could not parse cookies when one cookie value is json type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:41:34 2020 From: report at bugs.python.org (Dallas Marlow) Date: Wed, 02 Sep 2020 16:41:34 +0000 Subject: [issue41694] python3 futures.as_completed timeout broken if future contains undefined reference In-Reply-To: <1599063341.29.0.717862056359.issue41694@roundup.psfhosted.org> Message-ID: <1599064894.02.0.116464403501.issue41694@roundup.psfhosted.org> Dallas Marlow added the comment: I also verified that this issue persists with blocking futures other than sleep calls: import concurrent.futures import subprocess with concurrent.futures.ThreadPoolExecutor() as ex: futures = [ ex.submit(subprocess.run, ['sleep', '30']), ex.submit(print, 'test'), ] for future in concurrent.futures.as_completed(futures, timeout=1): _ = future.result() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:44:22 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 16:44:22 +0000 Subject: [issue41690] Use a loop to collect args in the parser instead of recursion In-Reply-To: <1599044361.34.0.302314568095.issue41690@roundup.psfhosted.org> Message-ID: <1599065062.56.0.932271063271.issue41690@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 4a97b1517a6b5ff22e2984b677a680b07ff0ce11 by Pablo Galindo in branch 'master': bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053) https://github.com/python/cpython/commit/4a97b1517a6b5ff22e2984b677a680b07ff0ce11 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:46:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 02 Sep 2020 16:46:35 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599065195.58.0.349425781811.issue41631@roundup.psfhosted.org> STINNER Victor added the comment: At commit ac46eb4ad6662cf6d771b20d8963658b2186c48c ("bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)"): --------------- static struct PyModuleDef _astmodule = { PyModuleDef_HEAD_INIT, "_ast", NULL, sizeof(astmodulestate), NULL, NULL, astmodule_traverse, astmodule_clear, astmodule_free, }; #define astmodulestate_global ((astmodulestate *)PyModule_GetState(PyState_FindModule(&_astmodule))) PyMODINIT_FUNC PyInit__ast(void) { PyObject *m; if (!init_types()) return NULL; m = PyState_FindModule(&_astmodule); ... return m; } --------------- => I investigated bpo-41194 crash again. It seems like the root issue is more than PyInit__ast() returns a *borrowed* reference, rather than a strong reference. => The _ast module can only be loaded once, astmodule_free() and astmodule_clear() are not called at Python exit. At commit 91e1bc18bd467a13bceb62e16fbc435b33381c82 ("bpo-41194: The _ast module cannot be loaded more than once (GH-21290)"): --------------- static astmodulestate global_ast_state; static astmodulestate * get_ast_state(PyObject *Py_UNUSED(module)) { return &global_ast_state; } #define get_global_ast_state() (&global_ast_state) static struct PyModuleDef _astmodule = { PyModuleDef_HEAD_INIT, .m_name = "_ast", .m_size = -1, .m_traverse = astmodule_traverse, .m_clear = astmodule_clear, .m_free = astmodule_free, }; PyMODINIT_FUNC PyInit__ast(void) { PyObject *m = PyModule_Create(&_astmodule); if (!m) { return NULL; } astmodulestate *state = get_ast_state(m); ... } --------------- * bpo-41194 => ok, PyInit__ast() is fine * bpo-41631 => ok: PyAST_Check() doesn't import the module, it uses a global state. * bpo-41261 => ERROR: This implementation allows to create two instances of the _ast module, but also to unload one instance (call astmodule_free), because _astmodule.m_size = -1. At commit b1cc6ba73a51d5cc3aeb113b5e7378fb50a0e20a ("bpo-41194: Convert _ast extension to PEP 489 (GH-21293)"): --------------- static astmodulestate* get_global_ast_state(void) { ... PyObject *module = PyImport_GetModule(name); if (module == NULL) { if (PyErr_Occurred()) { return NULL; } module = PyImport_Import(name); if (module == NULL) { return NULL; } } ... astmodulestate *state = get_ast_state(module); Py_DECREF(module); return state; } static struct PyModuleDef _astmodule = { PyModuleDef_HEAD_INIT, .m_name = "_ast", .m_size = sizeof(astmodulestate), .m_slots = astmodule_slots, .m_traverse = astmodule_traverse, .m_clear = astmodule_clear, .m_free = astmodule_free, }; PyMODINIT_FUNC PyInit__ast(void) { return PyModuleDef_Init(&_astmodule); } --------------- * bpo-41631 => ERROR: PyAST_Check() imports "_ast" module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:52:28 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 16:52:28 +0000 Subject: [issue41690] Use a loop to collect args in the parser instead of recursion In-Reply-To: <1599044361.34.0.302314568095.issue41690@roundup.psfhosted.org> Message-ID: <1599065548.14.0.192268434815.issue41690@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21157 pull_request: https://github.com/python/cpython/pull/22067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:53:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 16:53:39 +0000 Subject: [issue41679] Deprecation warning due to invalid escape sequences in Doc/tools/extensions/peg_highlight.py In-Reply-To: <1598890312.99.0.135296062189.issue41679@roundup.psfhosted.org> Message-ID: <1599065619.14.0.121894241893.issue41679@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 12:54:01 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 02 Sep 2020 16:54:01 +0000 Subject: [issue16003] thread_PyThread_start_new_thread fails with a generic error In-Reply-To: <1348389246.53.0.0663792895343.issue16003@psf.upfronthosting.co.za> Message-ID: <1599065641.71.0.535279358004.issue16003@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +21158 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22068 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 14:13:50 2020 From: report at bugs.python.org (Dallas Marlow) Date: Wed, 02 Sep 2020 18:13:50 +0000 Subject: [issue41694] python3 futures.as_completed timeout broken if future contains undefined reference In-Reply-To: <1599063341.29.0.717862056359.issue41694@roundup.psfhosted.org> Message-ID: <1599070430.32.0.72728079294.issue41694@roundup.psfhosted.org> Dallas Marlow added the comment: I apologize for all the messages, but the more I look into this issue the stranger it seems. The following code does the following: - print the time - execute 3 futures (2 w/ 30s sleeps) - call as_completed - catch the timeout exception - print the time again - then raise the timeout exception, but only after all futures complete. the second time print executes after the as_completed timeout duration, but the exception was only raised after all futures completed. the exception message incorrectly states that it left 2/3 futures unfinished. ######################### import concurrent.futures import time with concurrent.futures.ThreadPoolExecutor() as ex: print(time.time()) futures = [ ex.submit(time.sleep, 30), ex.submit(time.sleep, 30), ex.submit(print, 'test'), ] try: for future in concurrent.futures.as_completed( futures, timeout=1): _ = future.result() except Exception as e: print(time.time()) raise e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 14:39:10 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Sep 2020 18:39:10 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1599071950.25.0.34648753096.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49438/hypot.svg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 15:06:07 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 02 Sep 2020 19:06:07 +0000 Subject: [issue41642] Buildbot: workers detached every minute and "no space left on device" issue In-Reply-To: <1598434194.1.0.809832074407.issue41642@roundup.psfhosted.org> Message-ID: <1599073567.71.0.643616673602.issue41642@roundup.psfhosted.org> Gregory P. Smith added the comment: The gps-* bots have been updated. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 15:11:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 19:11:07 +0000 Subject: [issue41642] Buildbot: workers detached every minute and "no space left on device" issue In-Reply-To: <1598434194.1.0.809832074407.issue41642@roundup.psfhosted.org> Message-ID: <1599073867.44.0.328667027018.issue41642@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: All the pablogsal-* buildbots have been updated ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 15:28:37 2020 From: report at bugs.python.org (Kyle Stanley) Date: Wed, 02 Sep 2020 19:28:37 +0000 Subject: [issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown() In-Reply-To: <1579147714.25.0.252393666546.issue39349@roundup.psfhosted.org> Message-ID: <1599074917.6.0.533567881353.issue39349@roundup.psfhosted.org> Kyle Stanley added the comment: New changeset a763ee3c583e6a2dfe1b1ac0600a48e8a978ed50 by Shantanu in branch '3.9': [3.9] bpo-39349: Add cancel_futures to Executor.shutdown base class (GH-22023) (GH-22048) https://github.com/python/cpython/commit/a763ee3c583e6a2dfe1b1ac0600a48e8a978ed50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 15:31:13 2020 From: report at bugs.python.org (Kyle Stanley) Date: Wed, 02 Sep 2020 19:31:13 +0000 Subject: [issue39349] Add "cancel_futures" parameter to concurrent.futures.Executor.shutdown() In-Reply-To: <1579147714.25.0.252393666546.issue39349@roundup.psfhosted.org> Message-ID: <1599075073.59.0.0182398577287.issue39349@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for bringing attention to cancel_futures being missing in the base Executor class and for the PR, Shantanu! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 16:20:30 2020 From: report at bugs.python.org (Abael He) Date: Wed, 02 Sep 2020 20:20:30 +0000 Subject: [issue41693] AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) In-Reply-To: <1599056231.08.0.17351963613.issue41693@roundup.psfhosted.org> Message-ID: <1599078030.48.0.369779231815.issue41693@roundup.psfhosted.org> Abael He added the comment: jupyterlab bug ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 16:23:12 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 02 Sep 2020 20:23:12 +0000 Subject: [issue41693] AttributeError: 'str' object has no attribute '__cause__' (python3.8/traceback.py", line 479, in __init__) In-Reply-To: <1599056231.08.0.17351963613.issue41693@roundup.psfhosted.org> Message-ID: <1599078192.92.0.688147288094.issue41693@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 16:31:14 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 20:31:14 +0000 Subject: [issue41690] Use a loop to collect args in the parser instead of recursion In-Reply-To: <1599044361.34.0.302314568095.issue41690@roundup.psfhosted.org> Message-ID: <1599078674.58.0.457975913166.issue41690@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 16:31:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 02 Sep 2020 20:31:07 +0000 Subject: [issue41690] Use a loop to collect args in the parser instead of recursion In-Reply-To: <1599044361.34.0.302314568095.issue41690@roundup.psfhosted.org> Message-ID: <1599078667.34.0.855249222595.issue41690@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 8de34cdb952a2e3b8d7a9a213845cad01a8cece3 by Pablo Galindo in branch '3.9': [3.9] bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053) (GH-22067) https://github.com/python/cpython/commit/8de34cdb952a2e3b8d7a9a213845cad01a8cece3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 16:33:19 2020 From: report at bugs.python.org (Matej Cepl) Date: Wed, 02 Sep 2020 20:33:19 +0000 Subject: [issue38965] test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10 In-Reply-To: <1575448401.0.0.574576942819.issue38965@roundup.psfhosted.org> Message-ID: <1599078799.77.0.709170528943.issue38965@roundup.psfhosted.org> Matej Cepl added the comment: 3.7 patch applies cleanly even for 3.6.12. ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 17:09:38 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Sep 2020 21:09:38 +0000 Subject: [issue41686] C++ Embedded 'time.sleep()' is not working on Windows host due to 'Py_InitializeEx(0)' In-Reply-To: <1598963543.37.0.281772531598.issue41686@roundup.psfhosted.org> Message-ID: <1599080978.72.0.791369380407.issue41686@roundup.psfhosted.org> Steve Dower added the comment: > Could sigint_event be relocated to a platform-dependent extension of _PyRuntimeState that gets initialized and finalized independent of any module? This, or leaving it where it is and making sure it gets initialised (it really is about emulating certain signals). Either sounds fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 18:12:44 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Sep 2020 22:12:44 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1599084764.93.0.843812942982.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : Removed file: https://bugs.python.org/file49438/hypot.svg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 18:13:00 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Sep 2020 22:13:00 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1599084780.63.0.429124058802.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49439/hypot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 18:50:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 02 Sep 2020 22:50:10 +0000 Subject: [issue32725] Instance of _multiprocessing.PipeConnection-subtype crash on deletion In-Reply-To: <1517307235.22.0.467229070634.issue32725@psf.upfronthosting.co.za> Message-ID: <1599087010.64.0.971880895289.issue32725@roundup.psfhosted.org> Irit Katriel added the comment: I was able to reproduce the crash in python 2.7, but in Python 3.10 (after I changed to import PipeConnection from multiprocessing.connection instead of _multiprocessing), it doesn't crash but raises an exception that makes sense when the handle is 0: Running Release|Win32 interpreter... Exception ignored in: Traceback (most recent call last): File "C:\Users\User\src\cpython\lib\multiprocessing\connection.py", line 137, in __del__ self._close() File "C:\Users\User\src\cpython\lib\multiprocessing\connection.py", line 282, in _close _CloseHandle(self._handle) OSError: [WinError 6] The handle is invalid ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 19:33:27 2020 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 02 Sep 2020 23:33:27 +0000 Subject: [issue41694] python3 futures.as_completed timeout broken if future contains undefined reference In-Reply-To: <1599063341.29.0.717862056359.issue41694@roundup.psfhosted.org> Message-ID: <1599089607.4.0.343330387253.issue41694@roundup.psfhosted.org> Josh Rosenberg added the comment: The problem is a lot simpler than you're making it: 1. You submit a time.sleep(30) task. This begins running immediately 2. You try to submit another task, but a NameError is raised, bypassing the rest of the code (you never call as_completed, with or without a timeout) 3. The ThreadPoolExecutor's __exit__ is invoked, which implicitly invokes shutdown(wait=True). This does not return until the successfully submitted task (time.sleep(30)) finished. 4. At that point, the exception that was interrupted by with statement cleanup resumes bubbling All of this is behaving exactly as documented, no bug is occurring. ---------- nosy: +josh.r resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 20:33:50 2020 From: report at bugs.python.org (Shantanu) Date: Thu, 03 Sep 2020 00:33:50 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode Message-ID: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> New submission from Shantanu : To quote the docs (https://docs.python.org/3/library/asyncio-dev.html): ``` By default asyncio runs in production mode. In order to ease the development asyncio has a debug mode. There are several ways to enable asyncio debug mode: Setting the PYTHONASYNCIODEBUG environment variable to 1. Using the -X dev Python command line option. Passing debug=True to asyncio.run(). Calling loop.set_debug(). ``` Unfortunately, this documentation is misleading (or wrong) when using asyncio.run. For instance, from a naive read of the above, I'd expect debug mode to be True for many of the following: ``` ~/tmp ? cat test57.py import asyncio import time async def foo(): loop = asyncio.get_event_loop() time.sleep(2) print(loop.get_debug()) print(asyncio.coroutines._DEBUG) asyncio.run(foo()) ~/tmp ? python3 --version Python 3.7.3 # expected ~/tmp ? python3 test57.py False False # surprising, would expect this to work ~/tmp ? python3 -X dev test57.py True False # surprising, would expect this to work ~/tmp ? PYTHONASYNCIODEBUG=1 python3 test57.py True False # expected ~/tmp ? vim test57.py ~/tmp ? cat test57.py import asyncio import time async def foo(): loop = asyncio.get_event_loop() time.sleep(2) print(loop.get_debug()) print(asyncio.coroutines._DEBUG) asyncio.run(foo(), debug=True) ~/tmp ? python3 test57.py False True Executing result=None created at /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py:563> took 2.003 seconds ~/tmp ? ``` This appears to be because asyncio.run sets debug mode here: https://github.com/python/cpython/blob/4a97b1517a6b5ff22e2984b677a680b07ff0ce11/Lib/asyncio/runners.py#L42 We should either change asyncio.run to use the existing value of debug mode if left unspecified, or we should update the documentation to explicitly call out that the environment variable and command line flag will not work when using asyncio.run ---------- components: asyncio messages: 376268 nosy: asvetlov, hauntsaninja, yselivanov priority: normal severity: normal status: open title: asyncio.run interacts surprisingly with debug mode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 21:11:48 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 01:11:48 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599095508.12.0.461286270807.issue41696@roundup.psfhosted.org> Yury Selivanov added the comment: Yes, this is a bug. The default for the `debug` parameter should be `None` and it should only call `loop.set_debug` if a non-None bool value was explicitly passed. Care to submit a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 21:18:07 2020 From: report at bugs.python.org (Brad Larsen) Date: Thu, 03 Sep 2020 01:18:07 +0000 Subject: [issue41697] Heap buffer overflow in the parser Message-ID: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> New submission from Brad Larsen : It looks like commit 4a97b1517a6b5ff22e2984b677a680b07ff0ce11 introduced a heap buffer overflow: commit 4a97b1517a6b5ff22e2984b677a680b07ff0ce11 (HEAD -> master, origin/master, origin/HEAD) Author: Pablo Galindo Date: Wed Sep 2 17:44:19 2020 +0100 bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053) This program can segfault the parser by stack overflow: ``` import ast code = "f(" + ",".join(['a' for _ in range(100000)]) + ")" print("Ready!") ast.parse(code) ``` the reason is that the rule for arguments has a simple recursion when collecting args: args[expr_ty]: [...] | a=named_expression b=[',' c=args { c }] { [...] } If you try building with clang-10 with `--with-pydebug --with-address-sanitizer`, you should see a crash like the following during the `generate-posix-vars` step: ================================================================= ==39814==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x625000264148 at pc 0x000001ff3be8 bp 0x7ffec90e5d00 sp 0x7ffec90e5cf8 READ of size 4 at 0x625000264148 thread T0 #0 0x1ff3be7 in _PyPegen_collect_call_seqs /build/python/cpython/Parser/pegen.c:2253:61 #1 0x218ab08 in args_rule /build/python/cpython/Parser/parser.c:12240:20 #2 0x20f8906 in arguments_rule /build/python/cpython/Parser/parser.c:12159:18 #3 0x2158c61 in t_primary_raw /build/python/cpython/Parser/parser.c:14063:18 #4 0x21416fb in t_primary_rule /build/python/cpython/Parser/parser.c:13896:22 #5 0x246d944 in single_subscript_attribute_target_rule /build/python/cpython/Parser/parser.c:13265:18 #6 0x2433a19 in _tmp_20_rule /build/python/cpython/Parser/parser.c:16717:54 #7 0x24016e3 in assignment_rule /build/python/cpython/Parser/parser.c:2093:18 #8 0x23e6617 in small_stmt_rule /build/python/cpython/Parser/parser.c:1526:31 #9 0x2018581 in simple_stmt_rule /build/python/cpython/Parser/parser.c:1424:18 #10 0x200c22c in statement_rule /build/python/cpython/Parser/parser.c:1258:32 #11 0x2007026 in _loop1_11_rule /build/python/cpython/Parser/parser.c:16174:30 #12 0x200455a in statements_rule /build/python/cpython/Parser/parser.c:1193:18 #13 0x230193f in block_rule /build/python/cpython/Parser/parser.c:6257:18 #14 0x205886b in function_def_raw_rule /build/python/cpython/Parser/parser.c:4927:18 #15 0x20229a4 in function_def_rule /build/python/cpython/Parser/parser.c:4856:37 #16 0x200e2da in compound_stmt_rule /build/python/cpython/Parser/parser.c:1872:33 #17 0x200a873 in statement_rule /build/python/cpython/Parser/parser.c:1234:18 #18 0x2007026 in _loop1_11_rule /build/python/cpython/Parser/parser.c:16174:30 #19 0x200455a in statements_rule /build/python/cpython/Parser/parser.c:1193:18 #20 0x230193f in block_rule /build/python/cpython/Parser/parser.c:6257:18 #21 0x2392ac3 in class_def_raw_rule /build/python/cpython/Parser/parser.c:6196:18 #22 0x202fb74 in class_def_rule /build/python/cpython/Parser/parser.c:6139:34 #23 0x2010e47 in compound_stmt_rule /build/python/cpython/Parser/parser.c:1914:30 #24 0x200a873 in statement_rule /build/python/cpython/Parser/parser.c:1234:18 #25 0x2007026 in _loop1_11_rule /build/python/cpython/Parser/parser.c:16174:30 #26 0x200455a in statements_rule /build/python/cpython/Parser/parser.c:1193:18 #27 0x230193f in block_rule /build/python/cpython/Parser/parser.c:6257:18 #28 0x238f31b in else_block_rule /build/python/cpython/Parser/parser.c:3787:18 #29 0x204e3c4 in try_stmt_rule /build/python/cpython/Parser/parser.c:4460:19 #30 0x2014f68 in compound_stmt_rule /build/python/cpython/Parser/parser.c:1977:29 #31 0x200a873 in statement_rule /build/python/cpython/Parser/parser.c:1234:18 #32 0x2007026 in _loop1_11_rule /build/python/cpython/Parser/parser.c:16174:30 #33 0x200455a in statements_rule /build/python/cpython/Parser/parser.c:1193:18 #34 0x1ff8c93 in file_rule /build/python/cpython/Parser/parser.c:726:18 #35 0x1ff742d in _PyPegen_parse /build/python/cpython/Parser/parser.c:24794:18 #36 0x1fc1128 in _PyPegen_run_parser /build/python/cpython/Parser/pegen.c:1111:17 #37 0x1fc5e38 in _PyPegen_run_parser_from_string /build/python/cpython/Parser/pegen.c:1238:14 #38 0x1a8952b in PyParser_ASTFromStringObject /build/python/cpython/Parser/peg_api.c:27:21 #39 0x1339bef in Py_CompileStringObject /build/python/cpython/Python/pythonrun.c:1203:11 #40 0x1f2ac43 in builtin_compile_impl /build/python/cpython/Python/bltinmodule.c:819:14 #41 0x1f1902a in builtin_compile /build/python/cpython/Python/clinic/bltinmodule.c.h:249:20 #42 0x1cab483 in cfunction_vectorcall_FASTCALL_KEYWORDS /build/python/cpython/Objects/methodobject.c:440:24 #43 0x58bfa8 in PyVectorcall_Call /build/python/cpython/Objects/call.c:242:24 #44 0x58c3c6 in _PyObject_Call /build/python/cpython/Objects/call.c:265:16 #45 0x58c8b1 in PyObject_Call /build/python/cpython/Objects/call.c:292:12 #46 0x1017138 in do_call_core /build/python/cpython/Python/ceval.c:5141:9 #47 0xfeada4 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3609:22 #48 0xf4068b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #49 0x1025062 in _PyEval_EvalCode /build/python/cpython/Python/ceval.c:4376:14 #50 0x58ec4e in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:395:12 #51 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #52 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #53 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #54 0xfe8b6a in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3564:19 #55 0xf4068b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #56 0x1025062 in _PyEval_EvalCode /build/python/cpython/Python/ceval.c:4376:14 #57 0x58ec4e in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:395:12 #58 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #59 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #60 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #61 0xfe5f00 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3533:23 #62 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #63 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #64 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #65 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #66 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #67 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #68 0xfe5f00 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3533:23 #69 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #70 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #71 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #72 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #73 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #74 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #75 0xfe5f00 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3533:23 #76 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #77 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #78 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #79 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #80 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #81 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #82 0xfe71eb in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3547:19 #83 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #84 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #85 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #86 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #87 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #88 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #89 0xfe71eb in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3547:19 #90 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #91 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #92 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #93 0x5946bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #94 0x5959b3 in object_vacall /build/python/cpython/Objects/call.c:791:14 #95 0x595f4c in _PyObject_CallMethodIdObjArgs /build/python/cpython/Objects/call.c:882:24 #96 0x11ffca4 in import_find_and_load /build/python/cpython/Python/import.c:1765:11 #97 0x11fbbc7 in PyImport_ImportModuleLevelObject /build/python/cpython/Python/import.c:1866:15 #98 0x100dc88 in import_name /build/python/cpython/Python/ceval.c:5242:15 #99 0xfc8157 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3126:19 #100 0xf4068b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #101 0x1025062 in _PyEval_EvalCode /build/python/cpython/Python/ceval.c:4376:14 #102 0x102a75f in _PyEval_EvalCodeWithName /build/python/cpython/Python/ceval.c:4408:12 #103 0xf402c5 in PyEval_EvalCodeEx /build/python/cpython/Python/ceval.c:4424:12 #104 0xf3ff2d in PyEval_EvalCode /build/python/cpython/Python/ceval.c:857:12 #105 0x1f2cc4e in builtin_exec_impl /build/python/cpython/Python/bltinmodule.c:1035:13 #106 0x1f1aa5d in builtin_exec /build/python/cpython/Python/clinic/bltinmodule.c.h:371:20 #107 0x1caae6e in cfunction_vectorcall_FASTCALL /build/python/cpython/Objects/methodobject.c:424:24 #108 0x58bcb5 in PyVectorcall_Call /build/python/cpython/Objects/call.c:230:16 #109 0x58c3c6 in _PyObject_Call /build/python/cpython/Objects/call.c:265:16 #110 0x58c8b1 in PyObject_Call /build/python/cpython/Objects/call.c:292:12 #111 0x1017138 in do_call_core /build/python/cpython/Python/ceval.c:5141:9 #112 0xfeada4 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3609:22 #113 0xf4068b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #114 0x1025062 in _PyEval_EvalCode /build/python/cpython/Python/ceval.c:4376:14 #115 0x58ec4e in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:395:12 #116 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #117 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #118 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #119 0xfe5a21 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3516:23 #120 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #121 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #122 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #123 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #124 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #125 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #126 0xfe5f00 in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3533:23 #127 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #128 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #129 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #130 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #131 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #132 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #133 0xfe71eb in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3547:19 #134 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #135 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #136 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #137 0x10365bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #138 0x1014541 in PyObject_Vectorcall /build/python/cpython/./Include/cpython/abstract.h:123:12 #139 0x10151c6 in call_function /build/python/cpython/Python/ceval.c:5121:13 #140 0xfe71eb in _PyEval_EvalFrameDefault /build/python/cpython/Python/ceval.c:3547:19 #141 0x59721b in _PyEval_EvalFrame /build/python/cpython/./Include/internal/pycore_ceval.h:40:12 #142 0x58f614 in function_code_fastcall /build/python/cpython/Objects/call.c:329:24 #143 0x58d86d in _PyFunction_Vectorcall /build/python/cpython/Objects/call.c:366:20 #144 0x5946bd in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:114:11 #145 0x5959b3 in object_vacall /build/python/cpython/Objects/call.c:791:14 #146 0x595f4c in _PyObject_CallMethodIdObjArgs /build/python/cpython/Objects/call.c:882:24 #147 0x11ffca4 in import_find_and_load /build/python/cpython/Python/import.c:1765:11 #148 0x11fbbc7 in PyImport_ImportModuleLevelObject /build/python/cpython/Python/import.c:1866:15 #149 0x1f1601a in builtin___import__ /build/python/cpython/Python/bltinmodule.c:280:12 #150 0x1cb2676 in cfunction_call /build/python/cpython/Objects/methodobject.c:537:18 #151 0x5873a9 in _PyObject_MakeTpCall /build/python/cpython/Objects/call.c:191:18 #152 0x594638 in _PyObject_VectorcallTstate /build/python/cpython/./Include/cpython/abstract.h:112:16 #153 0x591aaa in _PyObject_CallFunctionVa /build/python/cpython/Objects/call.c:542:18 #154 0x590ea2 in PyObject_CallFunction /build/python/cpython/Objects/call.c:564:14 #155 0x11f8d6e in PyImport_Import /build/python/cpython/Python/import.c:2067:9 #156 0x11eb740 in PyImport_ImportModule /build/python/cpython/Python/import.c:1482:14 #157 0x12f10ac in init_sys_streams /build/python/cpython/Python/pylifecycle.c:1962:19 #158 0x12eed4d in init_interp_main /build/python/cpython/Python/pylifecycle.c:1034:14 #159 0x12e3727 in pyinit_main /build/python/cpython/Python/pylifecycle.c:1107:23 #160 0x12e41cf in Py_InitializeFromConfig /build/python/cpython/Python/pylifecycle.c:1151:18 #161 0x4e6b2d in pymain_init /build/python/cpython/Modules/main.c:66:14 #162 0x4df188 in pymain_main /build/python/cpython/Modules/main.c:694:23 #163 0x4df653 in Py_BytesMain /build/python/cpython/Modules/main.c:727:12 #164 0x4dcec7 in main /build/python/cpython/./Programs/python.c:15:12 #165 0x7fda2537d0b2 in __libc_start_main /build/glibc-YYA7BZ/glibc-2.31/csu/../csu/libc-start.c:308:16 #166 0x43501d in _start (/build/python/cpython/python+0x43501d) 0x625000264148 is located 16 bytes to the right of 8248-byte region [0x625000262100,0x625000264138) allocated by thread T0 here: #0 0x4ad75d in malloc (/build/python/cpython/python+0x4ad75d) #1 0x8afdec in _PyMem_RawMalloc /build/python/cpython/Objects/obmalloc.c:99:12 #2 0x8b909e in _PyMem_DebugRawAlloc /build/python/cpython/Objects/obmalloc.c:2145:24 #3 0x8b0a36 in _PyMem_DebugRawMalloc /build/python/cpython/Objects/obmalloc.c:2178:12 #4 0x8b39e3 in _PyMem_DebugMalloc /build/python/cpython/Objects/obmalloc.c:2330:12 #5 0x8b5b32 in PyMem_Malloc /build/python/cpython/Objects/obmalloc.c:605:12 #6 0x1f906d2 in block_new /build/python/cpython/Python/pyarena.c:80:25 #7 0x1f93300 in block_alloc /build/python/cpython/Python/pyarena.c:111:24 #8 0x1f91bd1 in PyArena_Malloc /build/python/cpython/Python/pyarena.c:182:15 #9 0x1cf79e7 in _Py_arg /build/python/cpython/Python/Python-ast.c:3516:17 #10 0x233c6d3 in param_rule /build/python/cpython/Parser/parser.c:5946:20 #11 0x2338044 in param_with_default_rule /build/python/cpython/Parser/parser.c:5790:18 #12 0x2323c16 in _loop1_153_rule /build/python/cpython/Parser/parser.c:24561:39 #13 0x2319647 in _tmp_134_rule /build/python/cpython/Parser/parser.c:23634:31 #14 0x23093c5 in invalid_parameters_rule /build/python/cpython/Parser/parser.c:15128:29 #15 0x22f6a43 in params_rule /build/python/cpython/Parser/parser.c:5124:39 #16 0x2058782 in function_def_raw_rule /build/python/cpython/Parser/parser.c:4917:23 #17 0x20229a4 in function_def_rule /build/python/cpython/Parser/parser.c:4856:37 #18 0x200e2da in compound_stmt_rule /build/python/cpython/Parser/parser.c:1872:33 #19 0x200a873 in statement_rule /build/python/cpython/Parser/parser.c:1234:18 #20 0x2007026 in _loop1_11_rule /build/python/cpython/Parser/parser.c:16174:30 #21 0x200455a in statements_rule /build/python/cpython/Parser/parser.c:1193:18 #22 0x230193f in block_rule /build/python/cpython/Parser/parser.c:6257:18 #23 0x2392ac3 in class_def_raw_rule /build/python/cpython/Parser/parser.c:6196:18 #24 0x202fb74 in class_def_rule /build/python/cpython/Parser/parser.c:6139:34 #25 0x2010e47 in compound_stmt_rule /build/python/cpython/Parser/parser.c:1914:30 #26 0x200a873 in statement_rule /build/python/cpython/Parser/parser.c:1234:18 #27 0x2007026 in _loop1_11_rule /build/python/cpython/Parser/parser.c:16174:30 #28 0x200455a in statements_rule /build/python/cpython/Parser/parser.c:1193:18 #29 0x230193f in block_rule /build/python/cpython/Parser/parser.c:6257:18 SUMMARY: AddressSanitizer: heap-buffer-overflow /build/python/cpython/Parser/pegen.c:2253:61 in _PyPegen_collect_call_seqs Shadow bytes around the buggy address: 0x0c4a800447d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a800447e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a800447f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a80044800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c4a80044810: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c4a80044820: 00 00 00 00 00 00 00 fa fa[fa]fa fa fa fa fa fa 0x0c4a80044830: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a80044840: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a80044850: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a80044860: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c4a80044870: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==39814==ABORTING In particular, the stack trace here in the ASAN output indicates that it's the `EXTRA_EXPR(first, last)` macro use in this line that's problematic: return _Py_Call(_PyPegen_dummy_name(p), args, keywords, EXTRA_EXPR(first, last)); ---------- components: Interpreter Core messages: 376270 nosy: blarsen, gvanrossum, pablogsal priority: normal severity: normal status: open title: Heap buffer overflow in the parser type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 21:19:36 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 03 Sep 2020 01:19:36 +0000 Subject: [issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal() In-Reply-To: <1599055165.93.0.874786911809.issue41692@roundup.psfhosted.org> Message-ID: <1599095976.54.0.361654532228.issue41692@roundup.psfhosted.org> Inada Naoki added the comment: +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 21:32:40 2020 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Sep 2020 01:32:40 +0000 Subject: [issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited Message-ID: <1599096760.67.0.528727675431.issue41698@roundup.psfhosted.org> New submission from Andy Maier : I stumbled across the problem reported in https://bugs.python.org/issue25030 on Python 3.8: >>> with open('x.txt', 'a') as fp: ... fp.seek(0, whence=os.SEEK_END) ... Traceback (most recent call last): File "", line 2, in TypeError: seek() takes no keyword arguments Which I coded with a keyword argument because the documentation says so: seek(offset, whence=SEEK_SET) See https://docs.python.org/3.8/library/io.html#io.IOBase.seek The fix for issue issue25030 changed the documentation to: seek(offset[, whence]) and supposedly was integrated into 2.7, 3.4, and the default branch back then. It seems the fix got lost? ---------- assignee: docs at python components: Documentation messages: 376272 nosy: andymaier, docs at python priority: normal severity: normal status: open title: io.[Text]IOBase.seek doesn't take keyword parameter - revisited versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 21:32:59 2020 From: report at bugs.python.org (Shantanu) Date: Thu, 03 Sep 2020 01:32:59 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599096779.32.0.0111547042835.issue41696@roundup.psfhosted.org> Change by Shantanu : ---------- keywords: +patch pull_requests: +21159 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22069 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 22:35:52 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 03 Sep 2020 02:35:52 +0000 Subject: [issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited In-Reply-To: <1599096760.67.0.528727675431.issue41698@roundup.psfhosted.org> Message-ID: <1599100552.54.0.108387629397.issue41698@roundup.psfhosted.org> Inada Naoki added the comment: For the record, https://github.com/python/cpython/pull/14691/files reintroduced `whence=SEEK_SET`. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 22:36:44 2020 From: report at bugs.python.org (Inada Naoki) Date: Thu, 03 Sep 2020 02:36:44 +0000 Subject: [issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited In-Reply-To: <1599096760.67.0.528727675431.issue41698@roundup.psfhosted.org> Message-ID: <1599100604.13.0.120633523066.issue41698@roundup.psfhosted.org> Inada Naoki added the comment: Since we have positional-only argument, can we document it as `seek(offset, whence=SEEK_SET, /)`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 2 23:24:15 2020 From: report at bugs.python.org (Sophia Wisdom) Date: Thu, 03 Sep 2020 03:24:15 +0000 Subject: [issue41699] Potential memory leak with asyncio and run_in_executor Message-ID: <1599103455.66.0.578420174204.issue41699@roundup.psfhosted.org> New submission from Sophia Wisdom : The below example leaks ~20 megabytes of memory. The amount leaked is related to both the number of items in the list and the number of times `run_in_executor` is called. ``` import asyncio def leaker(): x = list(range(int(1000))) 1/0 async def function(): loop = asyncio.get_running_loop() for i in range(10000): loop.run_in_executor(None, leaker) ``` at this point, `ps -o rss -p {pid}` outputs about 10MB after invoking this: ``` asyncio.run(function()) ``` Memory jumps to about 94MB, and doesn't return. The lists don't show up in `gc.get_objects()`, but the amount of memory leaked does increase (though not proportionately) when the lists increase in size. Note - this doesn't happen if `run_in_executor` is `await`ed immediately, but it does still occur if we e.g. put the future in a dictionary and then `await` the results later. The leak still occurs on my machine if the `1/0` is omitted, but not on a colleague's. We're pretty confused as to why this happens, and would appreciate any help. ---------- components: asyncio messages: 376275 nosy: asvetlov, sophia2, yselivanov priority: normal severity: normal status: open title: Potential memory leak with asyncio and run_in_executor versions: Python 3.10, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:10:12 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 03 Sep 2020 04:10:12 +0000 Subject: [issue41699] Potential memory leak with asyncio and run_in_executor In-Reply-To: <1599103455.66.0.578420174204.issue41699@roundup.psfhosted.org> Message-ID: <1599106212.67.0.641937825831.issue41699@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:14:35 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 04:14:35 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599106475.55.0.587107581522.issue39883@roundup.psfhosted.org> Guido van Rossum added the comment: FWIW the PSF board approved the change. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:19:41 2020 From: report at bugs.python.org (Andy Maier) Date: Thu, 03 Sep 2020 04:19:41 +0000 Subject: [issue41698] io.[Text]IOBase.seek doesn't take keyword parameter - revisited In-Reply-To: <1599096760.67.0.528727675431.issue41698@roundup.psfhosted.org> Message-ID: <1599106781.17.0.670770351645.issue41698@roundup.psfhosted.org> Andy Maier added the comment: Thanks for referencing the PR that reintroduced the old way of documenting it. >From my perspective, the proposal is fine. There are already some cases where it is documented like that, e.g. str.removeprefix(prefix, /). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:24:31 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 04:24:31 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599107071.96.0.258880449216.issue41697@roundup.psfhosted.org> Guido van Rossum added the comment: So that's the last line of the new helper function (in fact the end of the file). Maybe args can still be empty at this point? ---------- assignee: -> pablogsal priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:37:33 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 04:37:33 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599107853.15.0.558203569746.issue41697@roundup.psfhosted.org> Guido van Rossum added the comment: I do have a repro of the crash (with clang 11 no less). But it could be anywhere in sysconfig.py or anything it imports... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:41:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 04:41:41 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599108101.87.0.404160870351.issue41697@roundup.psfhosted.org> Guido van Rossum added the comment: Hm, it's not in sysconfig.py, it's in the next step: ./python.exe -E ./setup.py build ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:54:32 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 04:54:32 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599108872.37.0.794161710395.issue41697@roundup.psfhosted.org> Guido van Rossum added the comment: Looking at it in lldb, 'last' seems to be bogus. kind = 6961392 ... lineno = -33686019 col_offset = -33686019 end_lineno = 0 end_col_offset = 0 Here I'm stuck. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:54:54 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 04:54:54 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599108894.11.0.0908597456783.issue41696@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 0770ad948cb6d9f7f6c4002efd83e27c27069808 by Shantanu in branch 'master': bpo-41696: Fix handling of debug mode in asyncio.run (#22069) https://github.com/python/cpython/commit/0770ad948cb6d9f7f6c4002efd83e27c27069808 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:54:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 04:54:57 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599108897.07.0.608275848099.issue41697@roundup.psfhosted.org> Guido van Rossum added the comment: Adding 3.9 since the offending commit was backported there. ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:55:12 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Sep 2020 04:55:12 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599108912.18.0.628281428511.issue41696@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21160 pull_request: https://github.com/python/cpython/pull/22071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:55:19 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Sep 2020 04:55:19 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599108919.74.0.761564255525.issue41696@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21161 pull_request: https://github.com/python/cpython/pull/22072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 00:58:53 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 04:58:53 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599109133.44.0.976406629972.issue39010@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset be435ae2b064dc64f04475bec632862e1dbf605f by Ben Darnell in branch 'master': bpo-39010: Improve test shutdown (#22066) https://github.com/python/cpython/commit/be435ae2b064dc64f04475bec632862e1dbf605f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 01:16:19 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 05:16:19 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599110179.9.0.566457595723.issue41697@roundup.psfhosted.org> Guido van Rossum added the comment: Smaller repro: ./python.exe -m configparser Bisection shows that this is the call that causes the crash (line 1301): return _impl(self._name, option, raw=raw, vars=vars, fallback=fallback, **kwargs) But just that line doesn't trigger this -- apparently *everything* that came before it in that file is implicated. Or at least *something* that I haven't found yet. Sorry for the play-by-play... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 01:18:49 2020 From: report at bugs.python.org (Martin Panter) Date: Thu, 03 Sep 2020 05:18:49 +0000 Subject: [issue41695] http.cookies.SimpleCookie.parse could not parse cookies when one cookie value is json In-Reply-To: <1599064864.53.0.936259028803.issue41695@roundup.psfhosted.org> Message-ID: <1599110329.32.0.173328576613.issue41695@roundup.psfhosted.org> Martin Panter added the comment: Perhaps this is a duplicate of Issue 27674, where I think parsing is aborted when a double-quote is seen? ---------- nosy: +martin.panter superseder: -> Quote mark breaks http.cookies, Cookie.py processing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 01:22:44 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 05:22:44 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599110564.54.0.917569211358.issue39883@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset e223d06a8b2067c68e9f97c4628c2b0f056dcae6 by Todd in branch 'master': bpo-39883: Use BSD0 license for code in docs (GH-17635) https://github.com/python/cpython/commit/e223d06a8b2067c68e9f97c4628c2b0f056dcae6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 01:23:00 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Sep 2020 05:23:00 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599110580.25.0.681750628614.issue39883@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21163 pull_request: https://github.com/python/cpython/pull/22074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 01:22:53 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Sep 2020 05:22:53 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599110573.44.0.800105434156.issue39883@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21162 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 04:21:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Sep 2020 08:21:25 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599121285.37.0.880763509682.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 71d1bd9569c8a497e279f2fea6fe47cd70a87ea3 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049) https://github.com/python/cpython/commit/71d1bd9569c8a497e279f2fea6fe47cd70a87ea3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 05:29:56 2020 From: report at bugs.python.org (=?utf-8?q?Beno=C3=AEt_Brayer?=) Date: Thu, 03 Sep 2020 09:29:56 +0000 Subject: [issue27674] Quote mark breaks http.cookies, Cookie.py processing In-Reply-To: <1470226948.72.0.0645301470223.issue27674@psf.upfronthosting.co.za> Message-ID: <1599125396.95.0.451104235862.issue27674@roundup.psfhosted.org> Beno?t Brayer added the comment: Please find what Django's devs have done to parse cookies: https://github.com/django/django/commit/93a135d111c2569d88d65a3f4ad9e6d9ad291452 I hope this might help to find a solution. ---------- nosy: +brayer.benoit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 05:40:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Sep 2020 09:40:09 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 Message-ID: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/34/builds/16 pythoninfo: pre_config[utf8_mode]: 1 os.environ[LANG]: C.UTF-8 sys.filesystem_encoding: utf-8/surrogateescape sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, dev_mode=False, utf8_mode=1) Tests logs: 0:23:06 load avg: 2.33 Re-running test_c_locale_coercion in verbose mode skipped 'No C-with-UTF-8 locale available' test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) ... ok test_PYTHONCOERCECLOCALE_not_set (test.test_c_locale_coercion.LocaleCoercionTests) ... ok test_PYTHONCOERCECLOCALE_not_zero (test.test_c_locale_coercion.LocaleCoercionTests) ... ok test_PYTHONCOERCECLOCALE_set_to_one (test.test_c_locale_coercion.LocaleCoercionTests) ... ERROR test_PYTHONCOERCECLOCALE_set_to_warn (test.test_c_locale_coercion.LocaleCoercionTests) ... ok test test_c_locale_coercion failed test_PYTHONCOERCECLOCALE_set_to_zero (test.test_c_locale_coercion.LocaleCoercionTests) ... ok ====================================================================== ERROR: test_PYTHONCOERCECLOCALE_set_to_one (test.test_c_locale_coercion.LocaleCoercionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.9.edelsohn-fedora-ppc64/build/Lib/test/test_c_locale_coercion.py", line 410, in test_PYTHONCOERCECLOCALE_set_to_one loc = locale.setlocale(locale.LC_CTYPE, "") File "/home/shager/cpython-buildarea/3.9.edelsohn-fedora-ppc64/build/Lib/locale.py", line 610, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting ---------------------------------------------------------------------- Ran 6 tests in 3.138s FAILED (errors=1, skipped=1) 1 test failed again: test_c_locale_coercion I guess that the locale.setlocale(locale.LC_CTYPE, "") call should catch the locale.Error and skip the test if the locale is not supported. ---------- components: Tests messages: 376290 nosy: ncoghlan, vstinner priority: normal severity: normal status: open title: test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 05:44:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Sep 2020 09:44:48 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599126288.13.0.0260411973789.issue41700@roundup.psfhosted.org> STINNER Victor added the comment: The test also fails on PPC64 Fedora 3.x: https://buildbot.python.org/all/#/builders/237/builds/40 The test pass on PPC64 Fedora 3.8, the latest build still used "LANG=en_US.UTF-8": https://buildbot.python.org/all/#/builders/163/builds/12 The test still passed on PPC64 Fedora 3.9 in build 15 which was using LANG=en_US.UTF-8: https://buildbot.python.org/all/#/builders/34/builds/15 pythoninfo: pre_config[utf8_mode]: 0 os.environ[LANG]: en_US.UTF-8 sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0, dev_mode=False, utf8_mode=0) sys.filesystem_encoding: utf-8/surrogateescape So the test started to fail when the buildbot worker configured changed to use LANG=C.UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 06:03:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Sep 2020 10:03:02 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1599127382.66.0.273834712224.issue40941@roundup.psfhosted.org> STINNER Victor added the comment: The change introduced compiler warnings on Windows: c:\vstinner\python\master\python\ceval.c(1448): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data [C:\vstinner\python\master\PCbui ld\pythoncore.vcxproj] c:\vstinner\python\master\python\ceval.c(2254): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data [C:\vstinner\python\master\PCbui ld\pythoncore.vcxproj] c:\vstinner\python\master\python\ceval.c(2271): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data [C:\vstinner\python\master\PCbui ld\pythoncore.vcxproj] ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 06:21:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Sep 2020 10:21:19 +0000 Subject: [issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup Message-ID: <1599128479.83.0.639934661132.issue41701@roundup.psfhosted.org> New submission from STINNER Victor : Since the buildbot server migrated to a new machine, the web page losts is connection and the whole web page is reloaded every minute. Try for example: https://buildbot.python.org/all/#/release_status The new buildbot.python.org machine is now behind a load balancer. TCP connections closed after 1 minute already affected clients: see bpo-41642. It seems like HTTPS connections (tcp/443) are also affected. ---------- components: Tests messages: 376293 nosy: vstinner priority: normal severity: normal status: open title: Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 06:21:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Sep 2020 10:21:32 +0000 Subject: [issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup In-Reply-To: <1599128479.83.0.639934661132.issue41701@roundup.psfhosted.org> Message-ID: <1599128492.84.0.206724971078.issue41701@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 06:46:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 10:46:42 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599130002.41.0.714750867084.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think I have the problem. The problem is that the asdl_seq that is b is filled with KeywordOrStarred* not with expr_ty. We need to do: KeywordOrStarred* last = asdl_seq_GET(b, asdl_seq_LEN(b)-1); return _Py_Call(_PyPegen_dummy_name(p), args, keywords, EXTRA_EXPR(first, last->element)); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 06:48:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 10:48:19 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599130099.76.0.614730955463.issue41697@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +21164 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 07:23:16 2020 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 03 Sep 2020 11:23:16 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599132196.06.0.33703279686.issue38762@roundup.psfhosted.org> Vinay Sajip added the comment: See also bpo-8200, which relates to the way the code is currently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 07:45:52 2020 From: report at bugs.python.org (Valdemar Rolfsen) Date: Thu, 03 Sep 2020 11:45:52 +0000 Subject: [issue41702] Inconcistent behaviour in strftime Message-ID: <1599133552.94.0.223502406334.issue41702@roundup.psfhosted.org> New submission from Valdemar Rolfsen : Inconsistency in strftime between python 3.6 and 3.7 when parsing first-century dates. Python 3.6 >>> datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d") '0020-10-05' Python 3.7 >>> datetime.datetime.strptime("0020-10-05", "%Y-%m-%d").strftime("%Y-%m-%d") '20-10-05' This means that the following would work for 3.6 but raise a ValueError for 3.7: >>> d = "0020-10-05" >>> d = datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d") >>> d = datetime.datetime.strptime(d, "%Y-%m-%d").strftime("%Y-%m-%d") ---------- components: Library (Lib) messages: 376296 nosy: belopolsky, p-ganssle, valdemarrolfsen priority: normal severity: normal status: open title: Inconcistent behaviour in strftime type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 07:48:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 11:48:10 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599133690.73.0.920912104029.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The reason this does not manifest itself without the address sanitizer is because that information is thrown away later, and the line and col numbers for the Call node end being correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 09:22:07 2020 From: report at bugs.python.org (Matthieu Dartiailh) Date: Thu, 03 Sep 2020 13:22:07 +0000 Subject: [issue41191] PyType_FromModuleAndSpec is not mentioned in 3.9 What's new In-Reply-To: <1593634040.83.0.8340731803.issue41191@roundup.psfhosted.org> Message-ID: <1599139327.33.0.228595362273.issue41191@roundup.psfhosted.org> Change by Matthieu Dartiailh : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 09:26:53 2020 From: report at bugs.python.org (Matthieu Dartiailh) Date: Thu, 03 Sep 2020 13:26:53 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new Message-ID: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> New submission from Matthieu Dartiailh : A number of bytecodes have been added removed in Python 3.9 as documented in https://docs.python.org/3.9/library/dis.html. However only the addition of LOAD_ASSERTION_ERROR is currently documented in What's New. The relevant bpo issues are: - https://bugs.python.org/issue33387 - https://bugs.python.org/issue39320 ---------- messages: 376298 nosy: mdartiailh priority: normal severity: normal status: open title: Most bytecode changes are absent from Python 3.9 What's new _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 09:42:42 2020 From: report at bugs.python.org (Robert) Date: Thu, 03 Sep 2020 13:42:42 +0000 Subject: [issue39727] cgi.parse() fatally attempts str.decode when handling multipart/form-data In-Reply-To: <1582436056.52.0.172079709412.issue39727@roundup.psfhosted.org> Message-ID: <1599140562.53.0.529873346349.issue39727@roundup.psfhosted.org> Robert added the comment: Would this patch already solve? : https://github.com/python/cpython/pull/19130 There seems to be another bug: The strange 'latin-1' default encoding of cgi.parse(), which only has effect in non-mulitpart: if hasattr(fp,'encoding'): encoding = fp.encoding else: encoding = 'latin-1' ( cgi.FieldStorage and the other functions in cgi and urllib.parse use a 'utf-8' default correctly - and do not try fp.encoding, which is usually not present and not reasonable in form handling WSGI. And 'application/x-www-form-urlencoded' implies utf-8. ) => that default should possibly become utf-8. Optionally cgi.parse() could take an extra parameter encoding=None . ---------- nosy: +kxroberto2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 09:45:08 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 13:45:08 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599140708.33.0.243907140385.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I have added a new builbot builder to detect these problems in the future more immediately: https://buildbot.python.org/all/#/builders/582 For example, building the current master: https://buildbot.python.org/all/#/builders/582/builds/1 And with PR 22077: https://buildbot.python.org/all/#/builders/581/builds/1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 09:45:13 2020 From: report at bugs.python.org (Roundup Robot) Date: Thu, 03 Sep 2020 13:45:13 +0000 Subject: [issue30826] More details in reference 'Looping through a list in Python and modifying it' In-Reply-To: <1498969328.51.0.74139016573.issue30826@psf.upfronthosting.co.za> Message-ID: <1599140713.37.0.885446273117.issue30826@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +21165 pull_request: https://github.com/python/cpython/pull/22078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 09:58:44 2020 From: report at bugs.python.org (Zachary Ware) Date: Thu, 03 Sep 2020 13:58:44 +0000 Subject: [issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup In-Reply-To: <1599128479.83.0.639934661132.issue41701@roundup.psfhosted.org> Message-ID: <1599141524.37.0.837233827211.issue41701@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +EWDurbin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:08:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 14:08:44 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599142124.34.0.403355708533.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > return _Py_Call(_PyPegen_dummy_name(p), args, keywords, EXTRA_EXPR(first, last->element)); Actually, this is not enough because last->element may be a keyword_ty. I have updated PR 22077 to receive the EXTRA macro in the call because that simplifies the code and allows us to not need to distinguish between keywords and expr_ty elements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:19:14 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 03 Sep 2020 14:19:14 +0000 Subject: [issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal() In-Reply-To: <1599055165.93.0.874786911809.issue41692@roundup.psfhosted.org> Message-ID: <1599142754.27.0.768790413493.issue41692@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:19:26 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 03 Sep 2020 14:19:26 +0000 Subject: [issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal() In-Reply-To: <1599055165.93.0.874786911809.issue41692@roundup.psfhosted.org> Message-ID: <1599142766.48.0.458835754828.issue41692@roundup.psfhosted.org> Dong-hee Na added the comment: +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:29:43 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 14:29:43 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599143383.3.0.570259545323.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 315a61f7a9418d904e0eea14b1f054fac3a90e9f by Pablo Galindo in branch 'master': bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser (GH-22077) https://github.com/python/cpython/commit/315a61f7a9418d904e0eea14b1f054fac3a90e9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:31:00 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 03 Sep 2020 14:31:00 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599143460.11.0.603003408037.issue41672@roundup.psfhosted.org> Dong-hee Na added the comment: @eric What do you think about? ---------- nosy: +corona10, eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:32:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 14:32:38 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599143558.1.0.266815463454.issue41697@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21166 pull_request: https://github.com/python/cpython/pull/22079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:40:13 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 14:40:13 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599144013.91.0.68140842955.issue39883@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset a5d0232b0d2cbcbdeb0d89ea3d8826241a53a7c7 by Miss Islington (bot) in branch '3.9': bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22073) https://github.com/python/cpython/commit/a5d0232b0d2cbcbdeb0d89ea3d8826241a53a7c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:41:18 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 14:41:18 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599144078.02.0.948383437831.issue39883@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 9fef7c54a0adfade5ec94259d97f22e05fe9e3e3 by Miss Islington (bot) in branch '3.8': bpo-39883: Use BSD0 license for code in docs (GH-17635) (GH-22074) https://github.com/python/cpython/commit/9fef7c54a0adfade5ec94259d97f22e05fe9e3e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 10:42:52 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 14:42:52 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599144172.88.0.911178526385.issue39883@roundup.psfhosted.org> Guido van Rossum added the comment: Todd, you have a PR for the pydotorg repo as well, right? Can you link it here? ---------- versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 11:19:35 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 03 Sep 2020 15:19:35 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599146375.17.0.715193829724.issue41703@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 11:29:29 2020 From: report at bugs.python.org (Jack Jansen) Date: Thu, 03 Sep 2020 15:29:29 +0000 Subject: [issue41704] logging module needs some form of introspection or debugging support Message-ID: <1599146969.01.0.981479655014.issue41704@roundup.psfhosted.org> New submission from Jack Jansen : The logging module and its API make it easy to modify the behaviour of all loggers used in any package in your program. Unfortunately the downside of this is that if any author of any module that you use changes the global logger configuration you get in a situation where all your logger calls are not behaving as expected. Moreover, it is very difficult to debug this and to find the culprit. If the logger module had a global "debug logger usage" flag which would make it emit a log message whenever a call changed the global configuration this would help, especially if the messages were vectored through a single function or method that you could then set a breakpoint on. ---------- components: Library (Lib) messages: 376308 nosy: jackjansen priority: normal severity: normal status: open title: logging module needs some form of introspection or debugging support type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 11:35:24 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 15:35:24 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599147324.68.0.933100172924.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset be17295280c89771c80f317da072f6c0d016cc60 by Pablo Galindo in branch '3.9': [3.9] bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser (GH-22077) (GH-22079) https://github.com/python/cpython/commit/be17295280c89771c80f317da072f6c0d016cc60 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 11:42:02 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 03 Sep 2020 15:42:02 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599147722.04.0.281162945753.issue41700@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch nosy: +corona10 nosy_count: 2.0 -> 3.0 pull_requests: +21167 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 11:47:26 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 15:47:26 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599148046.71.0.750166783286.issue41697@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 11:49:13 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 03 Sep 2020 15:49:13 +0000 Subject: [issue41704] logging module needs some form of introspection or debugging support In-Reply-To: <1599146969.01.0.981479655014.issue41704@roundup.psfhosted.org> Message-ID: <1599148153.43.0.559919665833.issue41704@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 12:52:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 16:52:57 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599148046.74.0.125607644745.issue41697@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Thanks for the report Brad, and thanks for the quick fix Pablo! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 14:57:30 2020 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 03 Sep 2020 18:57:30 +0000 Subject: [issue41704] logging module needs some form of introspection or debugging support In-Reply-To: <1599146969.01.0.981479655014.issue41704@roundup.psfhosted.org> Message-ID: <1599159450.15.0.660921567255.issue41704@roundup.psfhosted.org> Vinay Sajip added the comment: > if any author of any module that you use changes the global logger configuration This is an anti-pattern - any library module which does this should have a bug report raised about it. Only applications should change the logging configuration. Can you share which libraries are causing this type of problem for you? I'm not sure emitting a message using the logging machinery itself would work as expected, as under the changed configuration the dispatch of logging messages might not work as you expect. Why does setting breakpoints on logging.basicConfig, logging.config.fileConfig and logging.config.dictConfig not work for your use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:28:37 2020 From: report at bugs.python.org (Safihre) Date: Thu, 03 Sep 2020 19:28:37 +0000 Subject: [issue41705] os.makedirs fails long-path UNC-paths if it is the first sub-folder Message-ID: <1599161317.94.0.39054668985.issue41705@roundup.psfhosted.org> New submission from Safihre : It consistently fails on the first directory in a long-path UNC notation server-folder. >>> os.makedirs(r"\\?\UNC\DiskStation\already_exists", exist_ok=True) Traceback (most recent call last): File "", line 1, in File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", line 213, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", line 213, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", line 223, in makedirs mkdir(name, mode) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '\\\\?\\UNC\\' >>> os.makedirs(r"\\?\UNC\DiskStation\already_exists") Traceback (most recent call last): File "", line 1, in File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", line 213, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", line 213, in makedirs makedirs(head, exist_ok=exist_ok) File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", line 223, in makedirs mkdir(name, mode) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '\\\\?\\UNC\\' The second level directory is working correctly as expected: >>> os.makedirs(r"\\?\UNC\DiskStation\already_exists\new") >>> os.makedirs(r"\\?\UNC\DiskStation\already_exists\new") Traceback (most recent call last): File "", line 1, in File "C:\Users\safihre\AppData\Local\Programs\Python\Python38\lib\os.py", line 223, in makedirs mkdir(name, mode) FileExistsError: [WinError 183] Cannot create a file when that file already exists: '\\\\?\\UNC\\DiskStation\\test_get2\\test2' Inspecting the code, I think the problem is in the os.path.exists function that is called from within os.makedirs, the line in os.makedirs says: if head and tail and not path.exists(head): But: >>> head, tail = path.split(r"\\?\UNC\DiskStation\already_exists") ('\\\\?\\UNC\\DiskStation', 'already_exists') >>> os.path.exists(r'\\?\UNC\DiskStation') False >>> os.path.exists(r'\\DiskStation') False So it wrongly goes ahead and tries to create \\?\UNC\DiskStation ---------- components: Windows messages: 376312 nosy: Safihre, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.makedirs fails long-path UNC-paths if it is the first sub-folder versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:37:04 2020 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 03 Sep 2020 19:37:04 +0000 Subject: [issue41702] Inconsistent behaviour in strftime In-Reply-To: <1599133552.94.0.223502406334.issue41702@roundup.psfhosted.org> Message-ID: <1599161824.58.0.620730202501.issue41702@roundup.psfhosted.org> Josh Rosenberg added the comment: 3.8.2 (on Alpine Linux under WSL) produces '0020-10-05', just like your 3.6 example. Not seeing anything obvious in commit history that would break it for 3.7. That said, 3.7 is in security fix only mode at this point (see https://devguide.python.org/#status-of-python-branches ); as this works on the latest release, I'm thinking this won't be fixed for 3.7. ---------- nosy: +josh.r title: Inconcistent behaviour in strftime -> Inconsistent behaviour in strftime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:38:37 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 19:38:37 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599161917.91.0.0554481562797.issue39010@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 49571c0b0e57e20d85727c738d9a0fe342dd2938 by Miss Islington (bot) in branch '3.9': bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22034) https://github.com/python/cpython/commit/49571c0b0e57e20d85727c738d9a0fe342dd2938 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:38:38 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 19:38:38 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599161917.91.0.0554481562797.issue39010@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 49571c0b0e57e20d85727c738d9a0fe342dd2938 by Miss Islington (bot) in branch '3.9': bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22034) https://github.com/python/cpython/commit/49571c0b0e57e20d85727c738d9a0fe342dd2938 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:38:38 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 19:38:38 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599161918.26.0.960113011481.issue39010@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset a986b061a3cd4661eb9f857e2936291f1847bd15 by Miss Islington (bot) in branch '3.8': bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22035) https://github.com/python/cpython/commit/a986b061a3cd4661eb9f857e2936291f1847bd15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:39:32 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Sep 2020 19:39:32 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599161972.36.0.983469865223.issue39010@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21169 pull_request: https://github.com/python/cpython/pull/22083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:39:24 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 03 Sep 2020 19:39:24 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599161964.47.0.171218066382.issue39010@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21168 pull_request: https://github.com/python/cpython/pull/22082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 15:40:12 2020 From: report at bugs.python.org (Safihre) Date: Thu, 03 Sep 2020 19:40:12 +0000 Subject: [issue41705] os.makedirs fails on long-path UNC-paths if it is the first sub-folder In-Reply-To: <1599161317.94.0.39054668985.issue41705@roundup.psfhosted.org> Message-ID: <1599162012.74.0.420391239208.issue41705@roundup.psfhosted.org> Change by Safihre : ---------- title: os.makedirs fails long-path UNC-paths if it is the first sub-folder -> os.makedirs fails on long-path UNC-paths if it is the first sub-folder type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:30:50 2020 From: report at bugs.python.org (William Chargin) Date: Thu, 03 Sep 2020 20:30:50 +0000 Subject: [issue41706] docs: operator dunder (`__add__`, et al.) invocations described incorrectly Message-ID: <1599165050.43.0.0605757296817.issue41706@roundup.psfhosted.org> New submission from William Chargin : The operator override dunder methods, like `__add__`, are described in the ?Data model? docs here: Those docs say: > For instance, to evaluate the expression `x + y`, where `x` is an > instance of a class that has an `__add__()` method, `x.__add__(y)` is > called. But this is not correct: `x + y` always uses `type(x).__add__`, which may be different from `x.__add__` if `__add__` has been set directly on the instance. Demonstration: ``` class C: def __add__(self, other): return "from class" c = C() print(c + c) # prints "from class" c.__add__ = lambda other: "from instance" print(c.__add__(c)) # prints "from instance" print(type(c).__add__(c, c)) # prints "from class" print(c + c) # prints "from class"! ``` The same issue appears in the reversed operator dunder (`__radd__`, et al.) docs below. I have a patch that I can submit as a PR; just need a bpo number. ---------- assignee: docs at python components: Documentation messages: 376316 nosy: docs at python, wchargin priority: normal severity: normal status: open title: docs: operator dunder (`__add__`, et al.) invocations described incorrectly type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:40:56 2020 From: report at bugs.python.org (William Chargin) Date: Thu, 03 Sep 2020 20:40:56 +0000 Subject: [issue41706] docs: operator dunder (`__add__`, et al.) invocations described incorrectly In-Reply-To: <1599165050.43.0.0605757296817.issue41706@roundup.psfhosted.org> Message-ID: <1599165656.12.0.618290310363.issue41706@roundup.psfhosted.org> Change by William Chargin : ---------- keywords: +patch pull_requests: +21170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:51:59 2020 From: report at bugs.python.org (Alex Mohr) Date: Thu, 03 Sep 2020 20:51:59 +0000 Subject: [issue41707] Builtins like int() and float() should not blindly treat buffer protocol bytes as string characters. Message-ID: <1599166319.13.0.56353332302.issue41707@roundup.psfhosted.org> New submission from Alex Mohr : Instead they should request and take into consideration the buffer object's data format. For example, surely we don't want to treat floating point binary representations as string characters: >>> from array import array >>> a = array('f', [1.2, 2.3, 3.4]) >>> int(a) Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 10: b'\x9a\x99\x99?33\x13@\x9a\x99Y@' It's even a little dangerous, since you can get "lucky" with certain binary representations: >>> a = array('I', [875770417, 875770420]) >>> int(a) 12344234 ---------- components: Interpreter Core messages: 376317 nosy: amohr priority: normal severity: normal status: open title: Builtins like int() and float() should not blindly treat buffer protocol bytes as string characters. type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:54:15 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 20:54:15 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599166455.37.0.477216685048.issue41696@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 1f5f12737755f246fee83a54c600779ad76934a4 by Miss Islington (bot) in branch '3.8': bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072) https://github.com/python/cpython/commit/1f5f12737755f246fee83a54c600779ad76934a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:54:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 03 Sep 2020 20:54:38 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599166478.52.0.407889802722.issue41700@roundup.psfhosted.org> STINNER Victor added the comment: I can reproduce the issue with: $ LC_ALL=xxx ./python -m test test_c_locale_coercion -m test_PYTHONCOERCECLOCALE_set_to_one -v (...) ====================================================================== ERROR: test_PYTHONCOERCECLOCALE_set_to_one (test.test_c_locale_coercion.LocaleCoercionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_c_locale_coercion.py", line 410, in test_PYTHONCOERCECLOCALE_set_to_one loc = locale.setlocale(locale.LC_CTYPE, "") File "/home/vstinner/python/master/Lib/locale.py", line 610, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting (...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:54:15 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 20:54:15 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599166455.37.0.477216685048.issue41696@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 1f5f12737755f246fee83a54c600779ad76934a4 by Miss Islington (bot) in branch '3.8': bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072) https://github.com/python/cpython/commit/1f5f12737755f246fee83a54c600779ad76934a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:54:15 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 20:54:15 +0000 Subject: [issue41696] asyncio.run interacts surprisingly with debug mode In-Reply-To: <1599093230.84.0.897076872177.issue41696@roundup.psfhosted.org> Message-ID: <1599166455.47.0.412000446849.issue41696@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset a2680058ee1f43cab282e9f4c2b35fd89464ebb6 by Miss Islington (bot) in branch '3.9': bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22071) https://github.com/python/cpython/commit/a2680058ee1f43cab282e9f4c2b35fd89464ebb6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:54:40 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 20:54:40 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599166480.06.0.514834809761.issue39010@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 40e2444c364eede59f193979df5a02ed958f56e9 by Miss Islington (bot) in branch '3.8': bpo-39010: Improve test shutdown (GH-22066) (#22083) https://github.com/python/cpython/commit/40e2444c364eede59f193979df5a02ed958f56e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 16:54:47 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 03 Sep 2020 20:54:47 +0000 Subject: [issue39010] ProactorEventLoop raises unhandled ConnectionResetError In-Reply-To: <1575924458.67.0.403977169674.issue39010@roundup.psfhosted.org> Message-ID: <1599166487.32.0.86472171932.issue39010@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 8d68e59f11267ded765d4af6d71a49784a12fad5 by Miss Islington (bot) in branch '3.9': bpo-39010: Improve test shutdown (GH-22066) (#22082) https://github.com/python/cpython/commit/8d68e59f11267ded765d4af6d71a49784a12fad5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 17:44:12 2020 From: report at bugs.python.org (Brad Larsen) Date: Thu, 03 Sep 2020 21:44:12 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599169451.99.0.192963854854.issue41697@roundup.psfhosted.org> Brad Larsen added the comment: Nice work with the quick fix! I'm also happy to see the addition of the Linux ASAN builder -- that should help detect memory errors earlier on in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 17:53:05 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 21:53:05 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599169451.99.0.192963854854.issue41697@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: FWIW the bug was a classic type error -- in a decent language the asdl_seq type would have been generic and this would have been caught without an ASAN builder... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 17:56:49 2020 From: report at bugs.python.org (Jeff Scheibly) Date: Thu, 03 Sep 2020 21:56:49 +0000 Subject: [issue41708] request make uninstall target Message-ID: <1599170209.73.0.817887899624.issue41708@roundup.psfhosted.org> New submission from Jeff Scheibly : I went through and ran the make altinstall from the Python3.8.3.tar.gz and after running the .configure --enable-optimizations, I ran make altinstall, which was successful. Would it be possible to get a uninstall target added so that in the case you may need a different version the uninstall would be super quick. ---------- components: Installation messages: 376325 nosy: jeffs priority: normal severity: normal status: open title: request make uninstall target versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 18:01:32 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 03 Sep 2020 22:01:32 +0000 Subject: [issue41705] os.makedirs fails on long-path UNC-paths if it is the first sub-folder In-Reply-To: <1599161317.94.0.39054668985.issue41705@roundup.psfhosted.org> Message-ID: <1599170492.77.0.170686626802.issue41705@roundup.psfhosted.org> Eryk Sun added the comment: This behavior is due to issue 37609, i.e. ntpath.splitdrive fails for "UNC" device paths. >>> ntpath.splitdrive('//?/UNC/server/share') ('//?/UNC', '/server/share') The result should be "//?/UNC/server/share". A path on the "UNC" device requires a share component, on which is mounted a local or remote filesystem directory. It's functionally part of the 'drive' path. Using just the root path or a server path on the "UNC" device is malformed in the context of a normal file API open. The former fails as ERROR_INVALID_NAME (123), and the latter fails as ERROR_BAD_PATHNAME (161). The incorrect splitdrive result in turn makes ntpath.split misbehave: >>> ntpath.split('//?/UNC/server/share') ('//?/UNC/server', 'share') >>> ntpath.split('//?/UNC/server') ('//?/UNC/', 'server') The correct result should be ('//?/UNC/server/share', ''). ---------- nosy: +eryksun type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 18:28:38 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 22:28:38 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599172118.89.0.432689547579.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Given that using asdl_seq currently means casting from void*, we could maybe have a set of macros like asdl_seq_GET that are type specialized (there aren't many of them) and in debug mode they can check that the ->kind attribute is consistent with the specific type that the macro represents. For instance asdl_seq_GET_EXPR will check that the ->kind attribute is consistent with a valid EXPR. It will not catch all problems but it will catch almost all the typical ones in simple sequences. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 18:38:14 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 22:38:14 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599172118.89.0.432689547579.issue41697@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Hm, I don't believe that will work -- each node type (e.g. `expr_ty`, `mod_ty`) has its own enum for `kind` (e.g. `_expr_kind`, `_mod_kind`) and some don't have a `kind` field at all (e.g. `keyword_ty`). So you'd have to add an extra field to each node type and initialize that with yet another enum that can be used to distinguish between node *types*. (There are other options, but they all sound like a lot of work.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 18:55:24 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 22:55:24 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599173724.12.0.561281342979.issue41697@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: That's true. Is a bit sad because a considerable amount of problems we experienced with the new parser were due to invalid casts from these structures :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 19:06:37 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 23:06:37 +0000 Subject: [issue41411] Improve and consolidate f-strings docs In-Reply-To: <1595867493.01.0.94068638385.issue41411@roundup.psfhosted.org> Message-ID: <1599174397.79.0.283958367787.issue41411@roundup.psfhosted.org> Guido van Rossum added the comment: @ezio.melotti: What is this waiting for at this point? There was some good energy here but progress seems halted, waiting for some kind of decision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 19:15:21 2020 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 03 Sep 2020 23:15:21 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599174921.75.0.509748994015.issue41672@roundup.psfhosted.org> Eric V. Smith added the comment: For the case of returning a list of non-tuples, all of my code assumes bytes, so I think changing the docs to say bytes is good. "bytes-like" might be overkill. Unfortunately, I don't know enough to say what encoding is returned: I just assume utf-8, although everything I'm using is probably ascii. My code doesn't handle any case where a list of tuples is returned, so I can't really comment on that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 19:41:55 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Sep 2020 23:41:55 +0000 Subject: [issue41678] File-level, optionally external sorting In-Reply-To: <1598889682.73.0.396107473033.issue41678@roundup.psfhosted.org> Message-ID: <1599176515.26.0.790984668941.issue41678@roundup.psfhosted.org> Raymond Hettinger added the comment: This doesn't seem like something that should be in the standard library. It is more of an application than a building block for writing code. It is a good candidate for an external package on PyPI rather than the standard library. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 19:44:50 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 03 Sep 2020 23:44:50 +0000 Subject: [issue41678] File-level, optionally external sorting In-Reply-To: <1598889682.73.0.396107473033.issue41678@roundup.psfhosted.org> Message-ID: <1599176690.24.0.95352380524.issue41678@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I am of the same opinion as Raymond ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 19:55:02 2020 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Sep 2020 23:55:02 +0000 Subject: [issue41697] Heap buffer overflow in the parser In-Reply-To: <1599095887.78.0.252018926067.issue41697@roundup.psfhosted.org> Message-ID: <1599177302.67.0.379398239824.issue41697@roundup.psfhosted.org> Change by Guido van Rossum : ---------- stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 20:18:25 2020 From: report at bugs.python.org (Platon workaccount) Date: Fri, 04 Sep 2020 00:18:25 +0000 Subject: [issue41678] File-level, optionally external sorting In-Reply-To: <1598889682.73.0.396107473033.issue41678@roundup.psfhosted.org> Message-ID: <1599178705.74.0.953268574854.issue41678@roundup.psfhosted.org> Platon workaccount added the comment: Why is shutil.make_archive suitable for a standard library but the file sorter not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 3 20:54:24 2020 From: report at bugs.python.org (Larry Hastings) Date: Fri, 04 Sep 2020 00:54:24 +0000 Subject: [issue39603] [security] http.client: HTTP Header Injection in the HTTP method In-Reply-To: <1581362975.61.0.33794022777.issue39603@roundup.psfhosted.org> Message-ID: <1599180864.74.0.703719582244.issue39603@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 524b8de630036a29ca340bc2ae6fd6dc7dda8f40 by Victor Stinner in branch '3.5': bpo-39603: Prevent header injection in http methods (GH-18485) (#21946) https://github.com/python/cpython/commit/524b8de630036a29ca340bc2ae6fd6dc7dda8f40 ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 02:15:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 06:15:31 +0000 Subject: [issue41707] Builtins like int() and float() should not blindly treat buffer protocol bytes as string characters. In-Reply-To: <1599166319.13.0.56353332302.issue41707@roundup.psfhosted.org> Message-ID: <1599200131.85.0.626296605608.issue41707@roundup.psfhosted.org> Serhiy Storchaka added the comment: See also issue27572. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 03:04:28 2020 From: report at bugs.python.org (Kitty Beans) Date: Fri, 04 Sep 2020 07:04:28 +0000 Subject: [issue41709] Idle erases clipboard upon closing Message-ID: <1599203068.1.0.547512334334.issue41709@roundup.psfhosted.org> New submission from Kitty Beans : Idle erases the contents of my clipboard after copying any text from the idle window, and then closing idle. This happens on my Linux Mint 19.3 Laptop and Desktop; Windows 10 Laptop does not seem to have this issue (it has never altered my clipboard outside of me actually copying text) Only tested with Idle version 3.6.8 ---------- assignee: terry.reedy components: IDLE messages: 376337 nosy: Spacekiwigames, terry.reedy priority: normal severity: normal status: open title: Idle erases clipboard upon closing type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 04:34:54 2020 From: report at bugs.python.org (Jonas Norling) Date: Fri, 04 Sep 2020 08:34:54 +0000 Subject: [issue41710] Timeout is affected by jumps in system time Message-ID: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org> New submission from Jonas Norling : The timeout for threading.Lock, threading.Condition, etc, is not using a monotonic clock ? it is affected if the system time (realtime clock) is set. The attached program can be used to show the problem. It is expected to print "Took 2.000 s" repeatedly, but if run with permissions to set the system time, it prints: $ sudo ./time_test.py Took 2.400 s Took 1.657 s Took 2.044 s Took 2.401 s ... (the 1.6 s time can be explained by NTP correcting the clock) There are already a number of closed bugs for this and related issues: bpo 23428, bpo 31267, bpo 35747. This happens in Python 3.7.7 (ARM32, Yocto Warrior), Python 3.8.2 (AMD64, Ubuntu Linux 20.04) and Python v3.9.0rc1 (AMD64, Ubuntu Linux 20.04). ---------- components: Interpreter Core files: time_test.py messages: 376338 nosy: wocket priority: normal severity: normal status: open title: Timeout is affected by jumps in system time type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49440/time_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 04:48:03 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 04 Sep 2020 08:48:03 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599209283.47.0.0872359346846.issue41700@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 54a66ade2067c373d31003ad260e1b7d14c81564 by Dong-hee Na in branch 'master': bpo-41700: Skip test if the locale is not supported (GH-22081) https://github.com/python/cpython/commit/54a66ade2067c373d31003ad260e1b7d14c81564 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 04:48:09 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 08:48:09 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599209289.02.0.977402790589.issue41700@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21172 pull_request: https://github.com/python/cpython/pull/22086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 04:48:00 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 08:48:00 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599209280.27.0.328129888878.issue41700@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21171 pull_request: https://github.com/python/cpython/pull/22085 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 04:50:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 08:50:30 +0000 Subject: [issue23428] Use the monotonic clock for thread conditions on POSIX platforms In-Reply-To: <1423517667.9.0.82075564578.issue23428@psf.upfronthosting.co.za> Message-ID: <1599209430.01.0.990546508552.issue23428@roundup.psfhosted.org> STINNER Victor added the comment: See bpo-41710 "Timeout is affected by jumps in system time". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 04:49:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 08:49:30 +0000 Subject: [issue41710] Timeout is affected by jumps in system time In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org> Message-ID: <1599209370.98.0.890007942811.issue41710@roundup.psfhosted.org> STINNER Victor added the comment: bpo-23428 modified the pthread implementation of conditional variable to use pthread_condattr_setclock(&ca, CLOCK_MONOTONIC) is available: commit 001fee14e0f2ba5f41fb733adc69d5965925a094. The change should be part of Python 3.8. What is your sys.thread_info value? Example on Fedora 32 with Python 3.8.5: >>> sys.thread_info sys.thread_info(name='pthread', lock='semaphore', version='NPTL 2.31') Sadly, the semaphore implementation doesn't use monotonic clock. See glibc issues: * https://sourceware.org/bugzilla/show_bug.cgi?id=14717 * https://bugzilla.kernel.org/show_bug.cgi?id=112521 ---------- nosy: +inada.naoki, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:02:51 2020 From: report at bugs.python.org (pig) Date: Fri, 04 Sep 2020 09:02:51 +0000 Subject: [issue41711] Socker send method throws a timeout exception Message-ID: <1599210171.24.0.888697969812.issue41711@roundup.psfhosted.org> Change by pig : ---------- components: IO nosy: pppig0921 priority: normal severity: normal status: open title: Socker send method throws a timeout exception type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:20:35 2020 From: report at bugs.python.org (pig) Date: Fri, 04 Sep 2020 09:20:35 +0000 Subject: [issue41711] Socker send method throws a timeout exception Message-ID: <1599211235.53.0.742848549662.issue41711@roundup.psfhosted.org> Change by pig : Added file: https://bugs.python.org/file49441/tcpclient.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:24:06 2020 From: report at bugs.python.org (pig) Date: Fri, 04 Sep 2020 09:24:06 +0000 Subject: [issue41711] Socker send method throws a timeout exception Message-ID: <1599211446.99.0.988483237363.issue41711@roundup.psfhosted.org> Change by pig : Added file: https://bugs.python.org/file49442/tcpserver.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:33:28 2020 From: report at bugs.python.org (pig) Date: Fri, 04 Sep 2020 09:33:28 +0000 Subject: [issue41711] Socker send method throws a timeout exception Message-ID: <1599212008.8.0.575018716091.issue41711@roundup.psfhosted.org> New submission from pig : When tcpclient.py and tcpserver.py files are run on macOS at the same time, custom exceptions will be thrown due to exceeding the given timeout.Timed out: Timed out When one or two files are running on window, socker.send throws an exception socket.timeout: Timed out. The description of the send function I saw on the [web site](https://docs.python.org/3.7/library/socket.html#socket.socket.send) does not seem to throw an exception ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:47:22 2020 From: report at bugs.python.org (yeting li) Date: Fri, 04 Sep 2020 09:47:22 +0000 Subject: [issue41712] REDoS in purge Message-ID: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> New submission from yeting li : I find this regex "(\d+\.\d+\.\d+)(\w+\d+)?$" may be stucked by input. The vulnerable regex is located in https://github.com/python/cpython/blob/54a66ade2067c373d31003ad260e1b7d14c81564/Tools/msi/purge.py#L15 The ReDOS vulnerability of the regex is mainly due to the sub-pattern \w+\d+ and can be exploited with the following string "1.1.1"+"1" * 5000 + "!" I think you can limit the input length or fix this regex. For example, you can modify the sub-pattern \w+\d+ to ([A-Za-z_]*\d)+ Looking forward for your response?! Best, Yeting Li ---------- components: Library (Lib) files: purge.py messages: 376343 nosy: yetingli priority: normal severity: normal status: open title: REDoS in purge type: security versions: Python 3.10 Added file: https://bugs.python.org/file49443/purge.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:52:53 2020 From: report at bugs.python.org (Peter Stokes) Date: Fri, 04 Sep 2020 09:52:53 +0000 Subject: [issue36094] When using an SMTP SSL connection,, get ValueError. In-Reply-To: <1550943841.97.0.129283187576.issue36094@roundup.psfhosted.org> Message-ID: <1599213173.77.0.782621014441.issue36094@roundup.psfhosted.org> Peter Stokes added the comment: I wanted to enquire as to if/when the proposed PR11998 is likely to be merged? I also wanted to note the similarity between this issue and issue41470 and to suggest that whilst the change proposed in commit e445ccbc of PR11998 [1] would be welcome, there may be a case for exposing the value ultimately passed as the `server_hostname` parameter to the `SSLContext.wrap_socket(?)` call [2] as a parameter to `SMTP.connect(?)` [3]. Doing so would aid potential use cases whereby the `host` parameter provided is an address, yet the TLS server hostname validation should be based upon another value (i.e. the hostname); potentially useful in scenarios where the `host`'s address has been previously derived, by the caller, by other means (e.g. a call to `socket.getaddrinfo(?)` [4]). [1] https://github.com/python/cpython/pull/11998/commits/e445ccbc483dfde74638dbb694132dc00ced4973 [2] https://docs.python.org/3/library/ssl.html#ssl.SSLContext.wrap_socket [3] https://docs.python.org/3/library/smtplib.html#smtplib.SMTP.connect [4] https://docs.python.org/3/library/socket.html#socket.getaddrinfo ---------- nosy: +Dadeos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:53:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 09:53:41 +0000 Subject: [issue41713] test_interpreters leaked [1424, 1422, 1424] references Message-ID: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Fedora Rawhide Refleaks 3.x: https://buildbot.python.org/all/#/builders/565/builds/11 test_interpreters leaked [1424, 1422, 1424] references, sum=4270 According to git bisect, the leak was introduced by: commit 71d1bd9569c8a497e279f2fea6fe47cd70a87ea3 Author: Mohamed Koubaa Date: Thu Sep 3 03:21:06 2020 -0500 bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049) .../2020-09-01-17-07-20.bpo-1635741.7wSuCc.rst | 1 + Modules/signalmodule.c | 168 +++++++++++---------- 2 files changed, 87 insertions(+), 82 deletions(-) Example of leak: $ ./python -m test -R 3:3 test_interpreters -m test.test_interpreters.TestInterpreterClose.test_from_current 0:00:00 load avg: 0.72 Run tests sequentially 0:00:00 load avg: 0.72 [1/1] test_interpreters beginning 6 repetitions 123456 ...... test_interpreters leaked [237, 237, 237] references, sum=711 test_interpreters leaked [18, 18, 18] memory blocks, sum=54 test_interpreters failed == Tests result: FAILURE == 1 test failed: test_interpreters Total duration: 1.1 sec Tests result: FAILURE ---------- components: Interpreter Core messages: 376345 nosy: vstinner priority: normal severity: normal status: open title: test_interpreters leaked [1424, 1422, 1424] references versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:55:49 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 04 Sep 2020 09:55:49 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599213349.25.0.911955670295.issue41700@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 4bcff52447b472bc5c8698d4ab29c09df9e122b4 by Miss Islington (bot) in branch '3.8': bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22086) https://github.com/python/cpython/commit/4bcff52447b472bc5c8698d4ab29c09df9e122b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:55:33 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 04 Sep 2020 09:55:33 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599213333.1.0.645396772477.issue41700@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 8f13ff959ae43fb6b8217845b2945779fe693b84 by Miss Islington (bot) in branch '3.9': bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22085) https://github.com/python/cpython/commit/8f13ff959ae43fb6b8217845b2945779fe693b84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 05:55:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 09:55:36 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599213336.31.0.942158081374.issue41713@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test_interpreters leaked [1424, 1422, 1424] references -> _signal module leak: test_interpreters leaked [1424, 1422, 1424] references _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:03:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 10:03:39 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599213819.47.0.595110113151.issue41713@roundup.psfhosted.org> STINNER Victor added the comment: The signal module is really special. In Python, only the main thread of the main interpreter is supposed to be allowed to run Python signal handlers (but the C signal handler can be executed by any thread). The exec function of the _signal module runs actions each time a new instance of the _signal module is created, whereas some actions must only be done exactly once: * modify Handlers[i].tripped * modify Handlers[i].func * Set SIGINT signal handler * Initialize sigint_event event (Windows only): see bpo-41686 For example, calling signal.signal() in a subinterpreter raises ValueError("signal only works in main thread of the main interpreter"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:08:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 10:08:55 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599214135.91.0.916589735319.issue41713@roundup.psfhosted.org> STINNER Victor added the comment: About the leak, the following three variables are also initialized multiple times by signal_exec(): static PyObject *DefaultHandler; static PyObject *IgnoreHandler; static PyObject *IntHandler; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:19:47 2020 From: report at bugs.python.org (Richard Purdie) Date: Fri, 04 Sep 2020 10:19:47 +0000 Subject: [issue41714] multiprocessing.Queue deadlock Message-ID: <1599214787.05.0.21620669779.issue41714@roundup.psfhosted.org> New submission from Richard Purdie : We're having some problems with multiprocessing.Queue where the parent process ends up hanging with zombie children. The code is part of bitbake, the task execution engine behind OpenEmbedded/Yocto Project. I've cut down our code to the pieces in question in the attached file. It doesn't give a runnable test case unfortunately but does at least show what we're doing. Basically, we have a set of items to parse, we create a set of multiprocessing.Process() processes to handle the parsing in parallel. Jobs are queued in one queue and results are fed back to the parent via another. There is a quit queue that takes sentinels to cause the subprocesses to quit. If something fails to parse, shutdown with clean=False is called, the sentinels are sent. the Parser() process calls results.cancel_join_thread() on the results queue. We do this since we don't care about the results any more, we just want to ensure everyting exits cleanly. This is where things go wrong. The Parser processes and their queues all turn into zombies. The parent process ends up stuck in self.result_queue.get(timeout=0.25) inside shutdown(). strace shows its acquired the locks and is doing a read() on the os.pipe() it created. Unfortunately since the parent still has a write channel open to the same pipe, it hangs indefinitely. If I change the code to do: self.result_queue._writer.close() while True: try: self.result_queue.get(timeout=0.25) except (queue.Empty, EOFError): break i.e. close the writer side of the pipe by poking at the queue internals, we don't see the hang. The .close() method would close both sides. We create our own process pool since this code dates from python 2.x days and multiprocessing pools had issues back when we started using this. I'm sure it would be much better now but we're reluctant to change what has basically been working. We drain the queues since in some cases we have clean shutdowns where cancel_join_thread() hasn't been used and we don't want those cases to block. My question is whether this is a known issue and whether there is some kind of API to close just the write side of the Queue to avoid problems like this? ---------- components: Library (Lib) files: simplified.py messages: 376350 nosy: rpurdie priority: normal severity: normal status: open title: multiprocessing.Queue deadlock type: crash versions: Python 3.6 Added file: https://bugs.python.org/file49444/simplified.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:27:31 2020 From: report at bugs.python.org (Richard Purdie) Date: Fri, 04 Sep 2020 10:27:31 +0000 Subject: [issue41714] multiprocessing.Queue deadlock In-Reply-To: <1599214787.05.0.21620669779.issue41714@roundup.psfhosted.org> Message-ID: <1599215251.57.0.537288132276.issue41714@roundup.psfhosted.org> Richard Purdie added the comment: I should also add that if we don't use cancel_join_thread() in the parser processes, things all work out ok. There is therefore seemingly something odd about the state that is leaving things in. This issue doesn't occur every time, its maybe 1 in 40 runs where we throw parsing errors but I can brute force reproduce it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:34:10 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 04 Sep 2020 10:34:10 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599215650.41.0.463668856897.issue41700@roundup.psfhosted.org> Dong-hee Na added the comment: This issue is fixed. Thanks for the report and review Victor! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:34:18 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 04 Sep 2020 10:34:18 +0000 Subject: [issue41700] test_c_locale_coercion: test_PYTHONCOERCECLOCALE_set_to_one() failed on PPC64 Fedora 3.9 In-Reply-To: <1599126009.78.0.459572903927.issue41700@roundup.psfhosted.org> Message-ID: <1599215658.95.0.76238950775.issue41700@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.10, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:51:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Sep 2020 10:51:46 +0000 Subject: [issue41709] Tkinter erases clipboard upon closing In-Reply-To: <1599203068.1.0.547512334334.issue41709@roundup.psfhosted.org> Message-ID: <1599216706.95.0.0665807867087.issue41709@roundup.psfhosted.org> Terry J. Reedy added the comment: This is a duplicate of an existing tkinter and Linux issue we don't know how to fix. #40452 ---------- components: +Tkinter -IDLE resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Tkinter/IDLE: preserve clipboard on closure title: Idle erases clipboard upon closing -> Tkinter erases clipboard upon closing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 06:53:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Sep 2020 10:53:03 +0000 Subject: [issue40452] Tkinter/IDLE: preserve clipboard on closure In-Reply-To: <1588268147.56.0.852233274654.issue40452@roundup.psfhosted.org> Message-ID: <1599216783.71.0.168224341274.issue40452@roundup.psfhosted.org> Terry J. Reedy added the comment: I closed duplicate issue #41709, Linux Mint 19.3, python 3.6.8 ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:11:24 2020 From: report at bugs.python.org (yeting li) Date: Fri, 04 Sep 2020 11:11:24 +0000 Subject: [issue41715] REDoS inc_analyzer Message-ID: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> New submission from yeting li : Hi, I find this regex "^([a-zA-Z]|_\w*[a-zA-Z]\w*|[a-zA-Z]\w*)$" may be stucked by input. The vulnerable regex is located in https://github.com/python/cpython/blob/54a66ade2067c373d31003ad260e1b7d14c81564/Tools/c-analyzer/c_analyzer/common/info.py#L12 The ReDOS vulnerability of the regex is mainly due to the sub-pattern \w*[a-zA-Z]\w* and can be exploited with the following string "_" + "a" * 5000 + "!" I think you can limit the input length or fix this regex. Looking forward for your response?! Best, Yeting Li ---------- files: info.py messages: 376355 nosy: yetingli priority: normal severity: normal status: open title: REDoS inc_analyzer Added file: https://bugs.python.org/file49445/info.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:12:33 2020 From: report at bugs.python.org (yeting li) Date: Fri, 04 Sep 2020 11:12:33 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599217953.55.0.674797816825.issue41715@roundup.psfhosted.org> Change by yeting li : ---------- title: REDoS inc_analyzer -> REDoS in c_analyzer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:13:19 2020 From: report at bugs.python.org (yeting li) Date: Fri, 04 Sep 2020 11:13:19 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599217999.74.0.533170289335.issue41715@roundup.psfhosted.org> Change by yeting li : ---------- components: +Library (Lib) type: -> security versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:14:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 11:14:42 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1599218082.26.0.995679121333.issue41712@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your report yeting li. The pattern modification looks good to me. Do you mind to create a pull request? ---------- keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:18:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 11:18:37 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599218317.42.0.339554834562.issue41715@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +eric.snow, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:43:44 2020 From: report at bugs.python.org (Richard Purdie) Date: Fri, 04 Sep 2020 11:43:44 +0000 Subject: [issue41714] multiprocessing.Queue deadlock In-Reply-To: <1599214787.05.0.21620669779.issue41714@roundup.psfhosted.org> Message-ID: <1599219824.59.0.591749825989.issue41714@roundup.psfhosted.org> Richard Purdie added the comment: Even my hack to call _writer.close() doesn't seem to be enough, it makes the problem rarer but there is still an issue. Basically, if you call cancel_join_thread() in one process, the queue is potentially totally broken in all other processes that may be using it. If for example another has called join_thread() as it was exiting and has queued data at the same time as another process exits using cancel_join_thread() and exits holding the write lock, you'll deadlock on the processes now stuck in join_thread() waiting for a lock they'll never get. I suspect the answer is "don't use cancel_join_thread()" but perhaps the docs need a note to point out that if anything is already potentially exiting, it can deadlock? I'm not sure you can actually use the API safely unless you stop all users from exiting and synchronise that by other means? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:47:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 11:47:11 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599220031.55.0.265463772564.issue41715@roundup.psfhosted.org> Serhiy Storchaka added the comment: I would use NAME_RE = re.compile(r'(?![_\d]+\Z)(?!\d)\w+', re.ASCII) or NAME_RE = re.compile(r'(?=.*[A-Za-z])(?!\d)\w+', re.ASCII) and NAME_RE.fullmatch() instead of NAME_RE.match(). But why identifiers not containing letters are disabled at first place? Is _123 an invalid identifier in C? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:50:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 11:50:02 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599220202.07.0.633851223781.issue41713@roundup.psfhosted.org> STINNER Victor added the comment: Another problem: PyOS_FiniInterrupts() is a public function of the C API which access global variables like IntHandler, DefaultHandler and IgnoreHandler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:50:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 11:50:24 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599220224.13.0.117614568117.issue41713@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +21173 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:52:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 11:52:09 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599220329.47.0.474382912465.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-1635741: Port _signal module to multi-phase init (PEP 489) (GH-22049) This change is causing new issues: bpo-41713 "_signal module leak: test_interpreters leaked [1424, 1422, 1424] references". So I partially reverted it: PR 22087. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 07:58:03 2020 From: report at bugs.python.org (mattip) Date: Fri, 04 Sep 2020 11:58:03 +0000 Subject: [issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows) In-Reply-To: <1583156407.62.0.364374237882.issue39825@roundup.psfhosted.org> Message-ID: <1599220683.63.0.588416361043.issue39825@roundup.psfhosted.org> Change by mattip : ---------- keywords: +patch nosy: +mattip nosy_count: 8.0 -> 9.0 pull_requests: +21174 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 08:12:06 2020 From: report at bugs.python.org (chen-y0y0) Date: Fri, 04 Sep 2020 12:12:06 +0000 Subject: [issue41716] SyntaxError: EOL while scanning string literal Message-ID: <1599221526.43.0.8824911096.issue41716@roundup.psfhosted.org> New submission from chen-y0y0 : # I try to run: import os os.system(r"start C:\Windows\System32\") # But I get an Exception: SyntaxError: EOL while scanning string literal # A string after ?r? means the string's original meaning. But?? ---------- components: Argument Clinic messages: 376361 nosy: larry, prasechen priority: normal severity: normal status: open title: SyntaxError: EOL while scanning string literal type: compile error versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 08:17:05 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 04 Sep 2020 12:17:05 +0000 Subject: [issue41716] SyntaxError: EOL while scanning string literal In-Reply-To: <1599221526.43.0.8824911096.issue41716@roundup.psfhosted.org> Message-ID: <1599221825.21.0.656237725733.issue41716@roundup.psfhosted.org> Steven D'Aprano added the comment: You can't end a string with a bare backslash, not even an raw string. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 08:23:19 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 04 Sep 2020 12:23:19 +0000 Subject: [issue41716] SyntaxError: EOL while scanning string literal In-Reply-To: <1599221526.43.0.8824911096.issue41716@roundup.psfhosted.org> Message-ID: <1599222199.68.0.737181184199.issue41716@roundup.psfhosted.org> Steven D'Aprano added the comment: See the FAQ: https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash Also documented here: https://docs.python.org/dev/reference/lexical_analysis.html#string-and-bytes-literals Previous issues: #1271 and #31136 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 08:51:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 12:51:19 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599223879.78.0.92772077658.issue41713@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4b8032e5a4994a7902076efa72fca1e2c85d8b7f by Victor Stinner in branch 'master': bpo-41713: _signal doesn't use multi-phase init (GH-22087) https://github.com/python/cpython/commit/4b8032e5a4994a7902076efa72fca1e2c85d8b7f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 08:55:06 2020 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 04 Sep 2020 12:55:06 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1599224106.4.0.635343350648.issue38240@roundup.psfhosted.org> Change by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 09:24:06 2020 From: report at bugs.python.org (yeting li) Date: Fri, 04 Sep 2020 13:24:06 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599225846.94.0.0988365625063.issue41715@roundup.psfhosted.org> yeting li added the comment: I think we can replace \w*[a-zA-Z]\w* with (_\d*)+([a-zA-Z]([_\d])*)+ This is an equivalent fix and the fixed regex is safe. Does that sound right to you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 09:33:00 2020 From: report at bugs.python.org (yeting li) Date: Fri, 04 Sep 2020 13:33:00 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599226380.55.0.778236061967.issue41715@roundup.psfhosted.org> yeting li added the comment: You can use the dk.brics.automaton library to verify whether two regexes are equivalent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 10:05:37 2020 From: report at bugs.python.org (hai shi) Date: Fri, 04 Sep 2020 14:05:37 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599228337.1.0.371883150594.issue41713@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 10:21:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 04 Sep 2020 14:21:48 +0000 Subject: [issue26214] textwrap should minimize number of breaks in extra long words In-Reply-To: <1453882121.55.0.184610339904.issue26214@psf.upfronthosting.co.za> Message-ID: <1599229308.65.0.965673301083.issue26214@roundup.psfhosted.org> Irit Katriel added the comment: You can do this already with the break_long_words arg of testwrap: >>> import itertools, textwrap >>> wr = textwrap.wrap >>> list(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567", width=5, break_long_words=False)))) ['123', '123', '12345', '67'] ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 10:41:11 2020 From: report at bugs.python.org (yeting li) Date: Fri, 04 Sep 2020 14:41:11 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599230471.95.0.914694380841.issue41715@roundup.psfhosted.org> yeting li added the comment: I'm sorry there was a typo just now. replace _\w*[a-zA-Z]\w* with (_\d*)+([a-zA-Z]([_\d])*)+ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:01:43 2020 From: report at bugs.python.org (af) Date: Fri, 04 Sep 2020 15:01:43 +0000 Subject: [issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za> Message-ID: <1599231703.26.0.715804799867.issue21987@roundup.psfhosted.org> af added the comment: Any updates on this? ---------- nosy: +af _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:13:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 15:13:58 +0000 Subject: =?utf-8?q?=5Bissue41717=5D_=5BAIX=5D_test=5Fio=3A_files_was_modified_by_t?= =?utf-8?b?ZXN0X2lvOiAoQHRlc3RfNjQ4ODc0OF90bXDDpikgb24gUE9XRVI2IEFJWCAz?= =?utf-8?q?=2E9?= Message-ID: <1599232438.83.0.403363375817.issue41717@roundup.psfhosted.org> New submission from STINNER Victor : '@test_6488748_tmp?' is likely TESTFN_NONASCII which is exposed as test.support.os_helper.TESTFN, but test_io has many many tests using TESTFN. https://buildbot.python.org/all/#/builders/330/builds/20 0:06:47 [130/425/1] test_io failed (env changed) (1 min 8 sec) -- running: test_concurrent_futures (31.1 sec) (...) Warning -- files was modified by test_io Before: [] After: ['@test_6488748_tmp?'] Since build 1, 19 days ago: https://buildbot.python.org/all/#/builders/330/builds/1 If someone is able to reproduce the issue, please attempt to identify which test method leaks the temporary file using the command: ./python -m test.bisect_cmd test_io --fail-env-changed -v After 10-20 minutes, the command should give the name of a single method which creates the temporary file. ---------- components: Tests messages: 376371 nosy: BTaskaya, David.Edelsohn, vstinner priority: normal severity: normal status: open title: [AIX] test_io: files was modified by test_io: (@test_6488748_tmp?) on POWER6 AIX 3.9 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:15:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 15:15:16 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1599232516.77.0.932599785334.issue41654@roundup.psfhosted.org> STINNER Victor added the comment: "AMD64 Arch Linux Asan 3.8" buildbot logs a compiler warning: https://buildbot.python.org/all/#builders/580/builds/4 Objects/exceptions.c: In function ?MemoryError_dealloc?: Objects/exceptions.c:2298:23: warning: comparison of distinct pointer types lacks a cast 2298 | if (Py_TYPE(self) != PyExc_MemoryError) { | ^~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:18:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 15:18:45 +0000 Subject: [issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars In-Reply-To: <1405482059.28.0.321220843423.issue21987@psf.upfronthosting.co.za> Message-ID: <1599232725.5.0.650330168979.issue21987@roundup.psfhosted.org> STINNER Victor added the comment: > Any updates on this? So far, nobody proposed a pull request. So no, there is no update. Someone has to step in, dig into the issue, propose a fix, then someone else has to review the PR, and finally the PR should be merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:36:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 15:36:12 +0000 Subject: [issue41718] test.regrtest has way too many imports Message-ID: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> New submission from STINNER Victor : Follow-up of bpo-40275. While investigating a crash on AIX (bpo-40068), I noticed that test_threading crashed because the test imports the logging module, and the logging has a bug on AIX on fork. I created an issue to reduce the number of imports made by "import test.support": https://bugs.python.org/issue40275 I would prefer to better isolate tests: test_threading should only test the threading module, not the logging module. Thanks to the hard work of Hai Shi, "import test.support" now imports only 37 modules instead of 171! He split the 3200 lines of Lib/test/support/__init__.py into new helper submodules: bytecode, import, threading, socket, etc. For example, TESTFN now comes from test.support.os_helper. Sadly, test.regrtest.save_env still imports asyncio and multiprocessing, and so in practice, running any test using "python -m test (...)" still imports around 233 modules :-( I measured the number of imports done in practice using the following file, Lib/test/test_sys_modules.py: ---- import unittest from test import support import sys class Tests(unittest.TestCase): def test_bug(self): modules = sorted(sys.modules) print("sys.modules:") print("") import pprint pprint.pprint(modules) print("") print("len(sys.modules):", len(modules)) def test_main(): support.run_unittest(Tests) if __name__ == "__main__": test_main() ---- master: * ./python -m test test_sys_modules: 233 modules (multiprocessing, asyncio, etc.) * ./python Lib/test/test_sys_modules.py: 95 modules 3.9: * ./python -m test test_sys_modules: 232 * ./python Lib/test/test_sys_modules.py: 117 3.5: * ./python -m test test_sys_modules: 167 * ./python Lib/test/test_sys_modules.py: 151 2.7: * ./python -m test test_sys_modules: 170 * ./python Lib/test/test_sys_modules.py: 122 ---------- components: Tests messages: 376374 nosy: shihai1991, vstinner priority: normal severity: normal status: open title: test.regrtest has way too many imports versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:37:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 15:37:27 +0000 Subject: [issue40275] test.support has way too many imports In-Reply-To: <1586816691.28.0.874442798421.issue40275@roundup.psfhosted.org> Message-ID: <1599233847.75.0.793122922375.issue40275@roundup.psfhosted.org> STINNER Victor added the comment: Sadly, the work done on this issue is useless until test.regrtest imports less modules as well. So I created bpo-41718 follow-up issue: "test.regrtest has way too many imports". I consider that the work is done on test.support, so I close this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:38:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 15:38:56 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599233936.7.0.476832443347.issue41718@roundup.psfhosted.org> STINNER Victor added the comment: If I hack test.libregrtest.runtest to not import test.libregrtest.save_env, test_sys_modules imports only 148 instead of 233 modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:43:43 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 04 Sep 2020 15:43:43 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1599234223.44.0.394735807248.issue41712@roundup.psfhosted.org> Zachary Ware added the comment: Does it matter? This is not a library, it is a script used occasionally by a release manager, called manually, and the only input to the regex is provided via a command-line argument in that manual call. I don't think Steve plans to REDoS himself :) ---------- components: +Installation, Windows -Library (Lib) nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: security -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:54:10 2020 From: report at bugs.python.org (chen-y0y0) Date: Fri, 04 Sep 2020 15:54:10 +0000 Subject: [issue41719] Why does not range() support decimals? Message-ID: <1599234850.47.0.91793785644.issue41719@roundup.psfhosted.org> New submission from chen-y0y0 : # I try: >>> range(0,5,0.5) # I hope it will (0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5). But... Traceback (most recent call last): File "", line 1, in range(0,5,0.5) TypeError: 'float' object cannot be interpreted as an integer ---------- components: Argument Clinic messages: 376378 nosy: larry, prasechen priority: normal severity: normal status: open title: Why does not range() support decimals? type: compile error versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 11:59:16 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 15:59:16 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599235156.95.0.375998268948.issue41718@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +21175 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:04:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 16:04:54 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599235494.05.0.420491805934.issue41718@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:04:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 16:04:42 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599235482.61.0.502168659773.issue41718@roundup.psfhosted.org> STINNER Victor added the comment: In general, it's nice to have the following 4 checks: * multiprocessing.process._dangling * asyncio.events._event_loop_policy * urllib.requests._url_tempfiles * urllib.requests._opener The problem is that because of these checks, **any** unit test file of the 424 Python test files import asyncio, multiprocessing and urllib. As a result, **any** unit test starts with around 233 imported modules. We are far from an "unit" test, since many modules have side effects. I wrote PR 22089 to remove these checks. "import test.libregrtest" is reduces from 233 to only 149 imports (on Linux), which is way better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:06:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 16:06:48 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599235608.37.0.590230216828.issue41718@roundup.psfhosted.org> STINNER Victor added the comment: With PR 22089, test_sys_modules.py of msg376374 imports 152 imports rather than 233. It's better than Python 2.7 which imports 170 modules! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:09:35 2020 From: report at bugs.python.org (David Edelsohn) Date: Fri, 04 Sep 2020 16:09:35 +0000 Subject: =?utf-8?q?=5Bissue41717=5D_=5BAIX=5D_test=5Fio=3A_files_was_modified_by_t?= =?utf-8?b?ZXN0X2lvOiAoQHRlc3RfNjQ4ODc0OF90bXDDpikgb24gUE9XRVI2IEFJWCAz?= =?utf-8?q?=2E9?= In-Reply-To: <1599232438.83.0.403363375817.issue41717@roundup.psfhosted.org> Message-ID: <1599235775.44.0.295044742573.issue41717@roundup.psfhosted.org> David Edelsohn added the comment: Bisection failed after 101 iterations and 0:20:29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:18:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 04 Sep 2020 16:18:55 +0000 Subject: =?utf-8?q?=5Bissue41717=5D_=5BAIX=5D_test=5Fio=3A_files_was_modified_by_t?= =?utf-8?b?ZXN0X2lvOiAoQHRlc3RfNjQ4ODc0OF90bXDDpikgb24gUE9XRVI2IEFJWCAz?= =?utf-8?q?=2E9?= In-Reply-To: <1599232438.83.0.403363375817.issue41717@roundup.psfhosted.org> Message-ID: <1599236335.57.0.0180999837158.issue41717@roundup.psfhosted.org> STINNER Victor added the comment: > Bisection failed after 101 iterations and 0:20:29 Oh :-( Does "./python -m test test_io --fail-env-changed -v" fail? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:22:46 2020 From: report at bugs.python.org (Georges) Date: Fri, 04 Sep 2020 16:22:46 +0000 Subject: [issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed In-Reply-To: <1497568363.46.0.596536376967.issue30681@psf.upfronthosting.co.za> Message-ID: <1599236566.33.0.255418769972.issue30681@roundup.psfhosted.org> Change by Georges : ---------- nosy: +sim0n nosy_count: 4.0 -> 5.0 pull_requests: +21176 pull_request: https://github.com/python/cpython/pull/22090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:24:46 2020 From: report at bugs.python.org (Georges) Date: Fri, 04 Sep 2020 16:24:46 +0000 Subject: [issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed In-Reply-To: <1497568363.46.0.596536376967.issue30681@psf.upfronthosting.co.za> Message-ID: <1599236686.08.0.844137739229.issue30681@roundup.psfhosted.org> Georges added the comment: As I think it is still important to have this fixed and considering the original PR was closed, I have created a new PR based on the original one while implementing the requested changes. https://github.com/python/cpython/pull/22090 ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:30:12 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Sep 2020 16:30:12 +0000 Subject: [issue41712] REDoS in purge In-Reply-To: <1599212842.75.0.630288607393.issue41712@roundup.psfhosted.org> Message-ID: <1599237012.72.0.53629647441.issue41712@roundup.psfhosted.org> Steve Dower added the comment: I've considered DoSing myself a few times, but then change my mind and just publish the release :) A PR to change it to "(\d+\.\d+\.\d+)([a-zA-Z]+\d+)?$" would be fine, but is not urgent. It certainly doesn't need to be backported, as this is only ever used from master these days. Personally I'd be just as happy closing the issue. I know that the current script works, and there's nothing worse than breaking a release because someone has changed the release scripts without testing them properly. ---------- versions: -Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 12:34:24 2020 From: report at bugs.python.org (David Edelsohn) Date: Fri, 04 Sep 2020 16:34:24 +0000 Subject: =?utf-8?q?=5Bissue41717=5D_=5BAIX=5D_test=5Fio=3A_files_was_modified_by_t?= =?utf-8?b?ZXN0X2lvOiAoQHRlc3RfNjQ4ODc0OF90bXDDpikgb24gUE9XRVI2IEFJWCAz?= =?utf-8?q?=2E9?= In-Reply-To: <1599232438.83.0.403363375817.issue41717@roundup.psfhosted.org> Message-ID: <1599237264.66.0.988685166468.issue41717@roundup.psfhosted.org> David Edelsohn added the comment: It's the same system. It doesn't fail alone. Didn't we both previously see issues with the interaction of tests due to the other of tests, that previous tests left things in the environment that affected later tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:11:56 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 17:11:56 +0000 Subject: [issue26214] textwrap should minimize number of breaks in extra long words In-Reply-To: <1453882121.55.0.184610339904.issue26214@psf.upfronthosting.co.za> Message-ID: <1599239516.02.0.83496514179.issue26214@roundup.psfhosted.org> Serhiy Storchaka added the comment: The code with nested wraps is awesome. But it does not work well. >>> list(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567 12", width=5, break_long_words=False)))) ['123', '123', '12345', '67', '12'] It is expected that '67' and '12' should be in the same line: '67 12'. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:23:43 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 04 Sep 2020 17:23:43 +0000 Subject: [issue26214] textwrap should minimize number of breaks in extra long words In-Reply-To: <1453882121.55.0.184610339904.issue26214@psf.upfronthosting.co.za> Message-ID: <1599240223.86.0.0184739931416.issue26214@roundup.psfhosted.org> Irit Katriel added the comment: One more wrap: >>> wr(' '.join(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567 12", width=5, break_long_words=False)))), 5) ['123', '123', '12345', '67 12'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:27:34 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 17:27:34 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1599240454.59.0.729241827766.issue41715@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +21178 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:41:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 17:41:53 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ Message-ID: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> New submission from Serhiy Storchaka : Vec2D.__rmul__() misses "return NotImplemented" and therefore implicitly returns None for arguments which are not int or float. >>> import turtle >>> print(object() * turtle.Vec2D(1, 2)) None ---------- components: Library (Lib) messages: 376389 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Missed "return NotImplemented" in Vec2D.__rmul__ type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:44:26 2020 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Fri, 04 Sep 2020 17:44:26 +0000 Subject: [issue41282] Deprecate and remove distutils In-Reply-To: <1594542625.3.0.789939298104.issue41282@roundup.psfhosted.org> Message-ID: <1599241466.04.0.5367039916.issue41282@roundup.psfhosted.org> Chih-Hsuan Yen added the comment: I noticed that a new PEP draft [1] about deprecating distutils is uploaded. The current version [2] proposes to deprecate distutils in 3.10 and 3.11 and remove distutils in 3.12. [1] https://www.python.org/dev/peps/pep-0632/ [2] https://github.com/python/peps/commit/5d5c68517cf9087e104673f7f8322311e31a4e0a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:45:27 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Sep 2020 17:45:27 +0000 Subject: [issue41678] File-level, optionally external sorting In-Reply-To: <1598889682.73.0.396107473033.issue41678@roundup.psfhosted.org> Message-ID: <1599241527.32.0.200112962759.issue41678@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the suggestion, but Pablo and I agree that this isn't within scope for the standard library. Marking as closed. If you want to discuss further, please post to the Python ideas list. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:46:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 17:46:49 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ In-Reply-To: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> Message-ID: <1599241609.25.0.507725691514.issue41720@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +21179 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 13:55:49 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 17:55:49 +0000 Subject: [issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved In-Reply-To: <1598422615.42.0.67853581727.issue41638@roundup.psfhosted.org> Message-ID: <1599242149.71.0.417325436335.issue41638@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 81715808716198471fbca0a3db42ac408468dbc5 by Serhiy Storchaka in branch 'master': bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999) https://github.com/python/cpython/commit/81715808716198471fbca0a3db42ac408468dbc5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 14:19:54 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 18:19:54 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1599243594.11.0.646574663421.issue40486@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21181 pull_request: https://github.com/python/cpython/pull/22094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 14:19:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Sep 2020 18:19:37 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1599243577.57.0.780739606919.issue40486@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 306cfb3a37e1438f6ba9f0a9f3af3c00aae4ec64 by Serhiy Storchaka in branch 'master': bpo-40486: Specify what happens if directory content change diring iteration (GH-22025) https://github.com/python/cpython/commit/306cfb3a37e1438f6ba9f0a9f3af3c00aae4ec64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 14:19:46 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 18:19:46 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1599243586.19.0.246758428433.issue40486@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21180 pull_request: https://github.com/python/cpython/pull/22093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 14:55:50 2020 From: report at bugs.python.org (Jonas Norling) Date: Fri, 04 Sep 2020 18:55:50 +0000 Subject: [issue41710] Timeout is affected by jumps in system time In-Reply-To: <1599208494.85.0.752607116191.issue41710@roundup.psfhosted.org> Message-ID: <1599245750.25.0.932652081882.issue41710@roundup.psfhosted.org> Jonas Norling added the comment: sys.thread_info = sys.thread_info(name='pthread', lock='semaphore', version='NPTL 2.31') on my system. Looking at the source I think the semaphore implementation will be used on all modern Linux systems. In my tests it works as expected on a Macintosh (3.8.5 with lock='mutex+cond') and also if I force a Linux build to use the mutex+cond implementation by defining HAVE_BROKEN_POSIX_SEMAPHORES. Doesn't look like those glibc and Linux bug reports will get any attention anytime soon. I will find a workaround instead :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 15:09:52 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 04 Sep 2020 19:09:52 +0000 Subject: [issue26214] textwrap should minimize number of breaks in extra long words In-Reply-To: <1453882121.55.0.184610339904.issue26214@psf.upfronthosting.co.za> Message-ID: <1599246592.99.0.303283634029.issue26214@roundup.psfhosted.org> Irit Katriel added the comment: To clarify, this solution is a linear-time greedy one, with three passes: - the first pass puts each long word on its own line. - the second pass chops them up into words of at most width characters. - the third pass wraps them, when there are no more long words. This minimizes the number of breaks within words. It doesn't minimize the number of output lines (you'd need a dynamic programming programming algo for that - O(n^2)). So for this input: wr("123 12 123456 1234", 5) you will get ['123', '12', '12345', '6', '1234'] where you may (or may not) have preferred: ['123', '12 1', '23456', '1234'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 15:46:55 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 04 Sep 2020 19:46:55 +0000 Subject: [issue38585] defusedexpat not supported past python 3.3/3.4 In-Reply-To: <1571928342.44.0.0364587849841.issue38585@roundup.psfhosted.org> Message-ID: <1599248815.14.0.207422337551.issue38585@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +21182 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:00:05 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 20:00:05 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 Message-ID: <1599249605.65.0.634527594272.issue41721@roundup.psfhosted.org> Change by Stefan Krah : ---------- nosy: David.Edelsohn, skrah priority: normal severity: normal status: open title: xlc: add -qalias=noansi -qmaxmem=-1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:02:10 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 20:02:10 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 Message-ID: <1599249730.84.0.567424638866.issue41721@roundup.psfhosted.org> Change by Stefan Krah : ---------- keywords: +patch pull_requests: +21183 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:06:51 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 20:06:51 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 Message-ID: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> New submission from Stefan Krah : At least the xlc version on AIX 7.1 has aggressive optimizations even with -O: ==================================================================== #include #include static int f(long *a, long long *b) { int t = *a; *b = 0; // cannot change *a return *a - t; // can be folded to zero } int main(void) { long a = 10; printf("%d\n", f(&a, (long long *)&a)); return 0; } ==================================================================== $ xlc -O -o alias alias.c $ ./alias 0 $ $ xlc -O -qalias=noansi -o alias alias.c $ ./alias -10 ---------- components: +Build type: -> behavior versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:12:07 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 20:12:07 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 In-Reply-To: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> Message-ID: <1599250327.79.0.409235621008.issue41721@roundup.psfhosted.org> Stefan Krah added the comment: We would also need -fwrapv to be safe, but I cannot find an equivalent option for xlc. The Intel compiler had a similar failure to #40244 that was resolved by -fwrapv (see #40223). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:17:08 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 20:17:08 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 In-Reply-To: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> Message-ID: <1599250628.11.0.186757926189.issue41721@roundup.psfhosted.org> Stefan Krah added the comment: -qmaxmem=-1 is added to disable verbose remarks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:33:24 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 20:33:24 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 In-Reply-To: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> Message-ID: <1599251604.89.0.845909747892.issue41721@roundup.psfhosted.org> Stefan Krah added the comment: New changeset 84a7917b4c9afec07575065cffa143b91fe98c14 by Stefan Krah in branch 'master': bpo-41721: Add xlc options (GH-22096) https://github.com/python/cpython/commit/84a7917b4c9afec07575065cffa143b91fe98c14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:33:48 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 20:33:48 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 In-Reply-To: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> Message-ID: <1599251628.8.0.0750950199894.issue41721@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +21184 pull_request: https://github.com/python/cpython/pull/22097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:35:02 2020 From: report at bugs.python.org (Jack Jansen) Date: Fri, 04 Sep 2020 20:35:02 +0000 Subject: [issue41704] logging module needs some form of introspection or debugging support In-Reply-To: <1599146969.01.0.981479655014.issue41704@roundup.psfhosted.org> Message-ID: <1599251702.87.0.270237298623.issue41704@roundup.psfhosted.org> Jack Jansen added the comment: @vinay, absolutely right on this being an anti-pattern:-) And also right on the statement that I can set a breakpoint on all three of logging.basicConfig, logging.config.fileConfig and logging.config.dictConfig, I had overlooked that (was looking for a single place to put the breakpoint). I'll close this. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:37:26 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Sep 2020 20:37:26 +0000 Subject: [issue41627] Relocate user site packages on Windows 32-bit In-Reply-To: <1598298331.25.0.959731633335.issue41627@roundup.psfhosted.org> Message-ID: <1599251846.34.0.670309858575.issue41627@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +21185 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:41:03 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Sep 2020 20:41:03 +0000 Subject: [issue41627] Relocate user site packages on Windows 32-bit In-Reply-To: <1598298331.25.0.959731633335.issue41627@roundup.psfhosted.org> Message-ID: <1599252063.17.0.0828735854984.issue41627@roundup.psfhosted.org> Steve Dower added the comment: > If it is otherwise possible to user-only install both 32 and 64 bit versions, then using the same site-packages strikes me a bug It's very easy to install both 32 and 64-bit runtimes (and it doesn't matter if they're user or system installs). But when you're installing packages in the nt_user scheme (--user with pip), you can only use one or the other. If you install with 32-bit runtime first, then you'll get 32-bit binaries installed and the 64-bit runtime won't try and install the package again (or it'll delete it and replace it with one that only works with the 64-bit runtime). With the change in PR 22098, the 32-bit interpreter will install to a different location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:45:40 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 20:45:40 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 In-Reply-To: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> Message-ID: <1599252340.19.0.222908818751.issue41721@roundup.psfhosted.org> Stefan Krah added the comment: The code example is for 64-bit Linux with sizeof(long) == sizeof(long long). It also works on 32-bit xlc with int/long. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:57:56 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 20:57:56 +0000 Subject: [issue38585] defusedexpat not supported past python 3.3/3.4 In-Reply-To: <1571928342.44.0.0364587849841.issue38585@roundup.psfhosted.org> Message-ID: <1599253076.7.0.826106317573.issue38585@roundup.psfhosted.org> miss-islington added the comment: New changeset 51b84f8e96a441c498210f827c1297ee4973525f by Zackery Spytz in branch 'master': bpo-38585: Remove references to defusedexpat (GH-22095) https://github.com/python/cpython/commit/51b84f8e96a441c498210f827c1297ee4973525f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:58:50 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 20:58:50 +0000 Subject: [issue38585] defusedexpat not supported past python 3.3/3.4 In-Reply-To: <1571928342.44.0.0364587849841.issue38585@roundup.psfhosted.org> Message-ID: <1599253130.57.0.0508797956037.issue38585@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21186 pull_request: https://github.com/python/cpython/pull/22099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 16:58:58 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 20:58:58 +0000 Subject: [issue38585] defusedexpat not supported past python 3.3/3.4 In-Reply-To: <1571928342.44.0.0364587849841.issue38585@roundup.psfhosted.org> Message-ID: <1599253138.59.0.154954883375.issue38585@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21187 pull_request: https://github.com/python/cpython/pull/22100 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 17:03:05 2020 From: report at bugs.python.org (Stefan Krah) Date: Fri, 04 Sep 2020 21:03:05 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 In-Reply-To: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> Message-ID: <1599253385.56.0.9177883894.issue41721@roundup.psfhosted.org> Stefan Krah added the comment: New changeset fb050d0d60f38dc9b6c30df1864020a92981be5b by Miss Islington (bot) in branch '3.9': bpo-41721: Add xlc options (GH-22097) https://github.com/python/cpython/commit/fb050d0d60f38dc9b6c30df1864020a92981be5b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 17:06:02 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Sep 2020 21:06:02 +0000 Subject: [issue35228] Index search in CHM help crashes viewer In-Reply-To: <1542107217.87.0.788709270274.issue35228@psf.upfronthosting.co.za> Message-ID: <1599253562.63.0.125263580262.issue35228@roundup.psfhosted.org> Steve Dower added the comment: So I found the "owner" of the HTML Help component in Windows (I put owner in quotes because this tool is _very_ maintenance mode, so nothing short of a critical vulnerability is going to be touched) and he helped me do some debugging. In short, the index file is either corrupt, or it is not parsed correctly. I can reliably reproduce the crash with the following steps: 1. Open the Python docs 2. Switch to the Index tab 3. Double-click on any second-level (indented) entry 4. Modify the text in the Index search box We haven't yet gone deep enough to be able to tell whether the help compiler is at fault, or the loader. If anyone has the time and inclination, testing with older versions (if you can find them) of the HTML Help compiler may find a version that works. Unfortunately, the older copies we used to use were on the Subversion server, which is long gone now. Alternatively, if anyone knows of a similar tool that we can redistribute easily with CPython (i.e. it's not as big as Zeal) and is significantly better than just using the user's default browser, I'd be interested to hear about it (as would the rest of the developer world, I'm sure - this is a fairly popular format!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 17:17:49 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 21:17:49 +0000 Subject: [issue38585] defusedexpat not supported past python 3.3/3.4 In-Reply-To: <1571928342.44.0.0364587849841.issue38585@roundup.psfhosted.org> Message-ID: <1599254269.45.0.32404100409.issue38585@roundup.psfhosted.org> miss-islington added the comment: New changeset 6386e86becc2096206e16d7f5fabb5752bdd9b37 by Miss Islington (bot) in branch '3.9': bpo-38585: Remove references to defusedexpat (GH-22095) https://github.com/python/cpython/commit/6386e86becc2096206e16d7f5fabb5752bdd9b37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:25:13 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:25:13 +0000 Subject: [issue38585] defusedexpat not supported past python 3.3/3.4 In-Reply-To: <1571928342.44.0.0364587849841.issue38585@roundup.psfhosted.org> Message-ID: <1599258313.12.0.414995914892.issue38585@roundup.psfhosted.org> miss-islington added the comment: New changeset 1470c9189c8b099e0be94b4d89842f5345b776ec by Miss Islington (bot) in branch '3.8': bpo-38585: Remove references to defusedexpat (GH-22095) https://github.com/python/cpython/commit/1470c9189c8b099e0be94b4d89842f5345b776ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:25:57 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:25:57 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1599258357.88.0.686448468411.issue40486@roundup.psfhosted.org> miss-islington added the comment: New changeset e52f5bc898c9a11fb1d57a42a1f9ec60b424d576 by Miss Islington (bot) in branch '3.8': [3.8] bpo-40486: Specify what happens if directory content change diring iteration (GH-22025) (GH-22094) https://github.com/python/cpython/commit/e52f5bc898c9a11fb1d57a42a1f9ec60b424d576 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:26:13 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:26:13 +0000 Subject: [issue41533] Bugfix: va_build_stack leaks the stack if do_mkstack fails In-Reply-To: <1597253261.51.0.12759996374.issue41533@roundup.psfhosted.org> Message-ID: <1599258373.34.0.355656356928.issue41533@roundup.psfhosted.org> miss-islington added the comment: New changeset 66e9c2aee4af846ab1b77faa8a46fe3a9373d943 by Miss Islington (bot) in branch '3.8': [3.8] closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847) (GH-22015) https://github.com/python/cpython/commit/66e9c2aee4af846ab1b77faa8a46fe3a9373d943 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:27:32 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 04 Sep 2020 22:27:32 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1599258452.01.0.3107146492.issue41654@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21188 pull_request: https://github.com/python/cpython/pull/22102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:28:27 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:28:27 +0000 Subject: [issue41533] Bugfix: va_build_stack leaks the stack if do_mkstack fails In-Reply-To: <1597253261.51.0.12759996374.issue41533@roundup.psfhosted.org> Message-ID: <1599258507.91.0.239619494252.issue41533@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21189 pull_request: https://github.com/python/cpython/pull/22103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:29:10 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:29:10 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1599258550.26.0.830541891831.issue40486@roundup.psfhosted.org> miss-islington added the comment: New changeset bd078df28322f840afd363b6ba097b5506ea5098 by Miss Islington (bot) in branch '3.9': [3.9] bpo-40486: Specify what happens if directory content change diring iteration (GH-22025) (GH-22093) https://github.com/python/cpython/commit/bd078df28322f840afd363b6ba097b5506ea5098 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:32:32 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:32:32 +0000 Subject: [issue38787] PEP 573: Module State Access from C Extension Methods In-Reply-To: <1573655440.57.0.563143759574.issue38787@roundup.psfhosted.org> Message-ID: <1599258752.52.0.260699599725.issue38787@roundup.psfhosted.org> miss-islington added the comment: New changeset fbb9ee0a903fb9b7b4b807f85aed1de754da09e6 by Miss Islington (bot) in branch '3.9': [3.9] bpo-38787: Clarify docs for PyType_GetModule and warn against common mistake (GH-20215) (GH-21984) https://github.com/python/cpython/commit/fbb9ee0a903fb9b7b4b807f85aed1de754da09e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:34:39 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:34:39 +0000 Subject: [issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter In-Reply-To: <1597246976.86.0.332574378371.issue41531@roundup.psfhosted.org> Message-ID: <1599258879.86.0.789686976509.issue41531@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21190 pull_request: https://github.com/python/cpython/pull/22105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:35:23 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:35:23 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1599258923.62.0.860932362241.issue29590@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21191 pull_request: https://github.com/python/cpython/pull/22106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:38:51 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:38:51 +0000 Subject: [issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter In-Reply-To: <1597246976.86.0.332574378371.issue41531@roundup.psfhosted.org> Message-ID: <1599259131.82.0.398610870756.issue41531@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21192 pull_request: https://github.com/python/cpython/pull/22107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:47:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Sep 2020 22:47:56 +0000 Subject: [issue41659] PEG discrepancy on 'if {x} {a}: pass' In-Reply-To: <1598650995.75.0.684602655166.issue41659@roundup.psfhosted.org> Message-ID: <1599259676.82.0.121583428889.issue41659@roundup.psfhosted.org> Terry J. Reedy added the comment: Minimal example >>> a{ # or >>> a { In 3.8, this is immediately flagged as a SyntaxError. In 3.9 and master, a continuation prompt is issued. This strikes me as a parsing buglet that should preferably be fixed, as it implies that something valid *could* follow '{', thus misleading beginners. On the other hand, after scanning my keyboard, '{' seems unique in being a legal symbol, unlike `, $, and ?, or combinations like +*, that can AFAIK never follow a name. So it would need special handling. Side note: for the same reason I dislike the { change, I like the generic 3.9 change for legal operators without a second operand. >>> a * Both flag as SyntaxError, but in 3.8, the caret is under '*', falsely implying that '*' cannot follow a name, while in 3.9, it is under the whitespace following, correct implying that the * is legal and that the problem is lack of a second expression (on the same line without continuation). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:51:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Sep 2020 22:51:47 +0000 Subject: [issue41663] Support Windows pseudoterminals in pty and termios modules In-Reply-To: <1598725687.47.0.96007277971.issue41663@roundup.psfhosted.org> Message-ID: <1599259907.97.0.783226640278.issue41663@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Library (Lib) stage: -> test needed type: -> enhancement versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 18:56:08 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 22:56:08 +0000 Subject: [issue41533] Bugfix: va_build_stack leaks the stack if do_mkstack fails In-Reply-To: <1597253261.51.0.12759996374.issue41533@roundup.psfhosted.org> Message-ID: <1599260168.22.0.450561637758.issue41533@roundup.psfhosted.org> miss-islington added the comment: New changeset 106c1df736d38f5b411a8571b97275d0ecf1d0a9 by Miss Islington (bot) in branch '3.9': closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847) https://github.com/python/cpython/commit/106c1df736d38f5b411a8571b97275d0ecf1d0a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:01:21 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Sep 2020 23:01:21 +0000 Subject: [issue41671] inspect.getdoc/.cleandoc doesn't always remove trailing blank lines In-Reply-To: <1598827998.17.0.2637020471.issue41671@roundup.psfhosted.org> Message-ID: <1599260481.45.0.0118892499301.issue41671@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +yselivanov stage: -> needs patch versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:04:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Sep 2020 23:04:33 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1599260673.6.0.735833721581.issue41687@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:07:22 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 23:07:22 +0000 Subject: [issue29590] Incorrect stack traces when re-entering a generator/coroutine stack via .throw() In-Reply-To: <1487341428.62.0.272190755105.issue29590@psf.upfronthosting.co.za> Message-ID: <1599260842.4.0.424063894853.issue29590@roundup.psfhosted.org> miss-islington added the comment: New changeset e92219d8f864a1a8eb381d98d5df4f1aa767dacb by Miss Islington (bot) in branch '3.9': bpo-29590: fix stack trace for gen.throw() with yield from (GH-19896) https://github.com/python/cpython/commit/e92219d8f864a1a8eb381d98d5df4f1aa767dacb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:14:43 2020 From: report at bugs.python.org (vishal rao) Date: Fri, 04 Sep 2020 23:14:43 +0000 Subject: [issue41722] multiprocess error on large dataset Message-ID: <1599261283.51.0.132892099897.issue41722@roundup.psfhosted.org> New submission from vishal rao : I am processing a large pandas dataframe using pathos framework which internally uses Python multiprocess package. I get the following error when i run the code with a large dataset. The issue doesn't occur on smaller datasets. /opt/conda/lib/python3.7/site-packages/pathos/multiprocessing.py in map(self, f, *args, **kwds) 135 AbstractWorkerPool._AbstractWorkerPool__map(self, f, *args, **kwds) 136 _pool = self._serve() --> 137 return _pool.map(star(f), zip(*args)) # chunksize 138 map.__doc__ = AbstractWorkerPool.map.__doc__ 139 def imap(self, f, *args, **kwds): /opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in map(self, func, iterable, chunksize) 266 in a list that is returned. 267 ''' --> 268 return self._map_async(func, iterable, mapstar, chunksize).get() 269 270 def starmap(self, func, iterable, chunksize=None): /opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in get(self, timeout) 655 return self._value 656 else: --> 657 raise self._value 658 659 def _set(self, i, obj): /opt/conda/lib/python3.7/site-packages/multiprocess/pool.py in _handle_tasks(taskqueue, put, outqueue, pool, cache) 429 break 430 try: --> 431 put(task) 432 except Exception as e: 433 job, idx = task[:2] /opt/conda/lib/python3.7/site-packages/multiprocess/connection.py in send(self, obj) 207 self._check_closed() 208 self._check_writable() --> 209 self._send_bytes(_ForkingPickler.dumps(obj)) 210 211 def recv_bytes(self, maxlength=None): /opt/conda/lib/python3.7/site-packages/multiprocess/connection.py in _send_bytes(self, buf) 394 n = len(buf) 395 # For wire compatibility with 3.2 and lower --> 396 header = struct.pack("!i", n) 397 if n > 16384: 398 # The payload is large so Nagle's algorithm won't be triggered error: 'i' format requires -2147483648 <= number <= 2147483647 I ran the code in debug mode, and saw that the value of n was 3140852627. ---------- components: Library (Lib) messages: 376415 nosy: vishalraoanizer priority: normal severity: normal status: open title: multiprocess error on large dataset versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:38:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Sep 2020 23:38:49 +0000 Subject: [issue41719] Why does not range() support decimals? In-Reply-To: <1599234850.47.0.91793785644.issue41719@roundup.psfhosted.org> Message-ID: <1599262729.67.0.282413638563.issue41719@roundup.psfhosted.org> Terry J. Reedy added the comment: The original title was "Why does not range() support decimals?". In general, such questions should be directed to question forums, such as https://mail.python.org/mailman/listinfo/python-list or stackoverflow.com. This question has been answered on both, with alternatives, in particular on https://stackoverflow.com/questions/477486/how-to-use-a-decimal-range-step-value https://stackoverflow.com/questions/12403411/range-with-float-step-argument and other duplicates. I am leaving this open to add this frequent question to our FAQ, in particular at https://docs.python.org/3/faq/programming.html#sequences-tuples-lists with 'range' added. This answer should include how to use range to get what people generally want. ---------- assignee: -> docs at python components: +Documentation -Argument Clinic nosy: +docs at python, terry.reedy stage: -> needs patch type: compile error -> versions: +Python 3.10, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:38:58 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 04 Sep 2020 23:38:58 +0000 Subject: [issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter In-Reply-To: <1597246976.86.0.332574378371.issue41531@roundup.psfhosted.org> Message-ID: <1599262738.4.0.0804227141309.issue41531@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d64d78be20ced6ac9de58e91e69eaba184e36e9b by Miss Islington (bot) in branch '3.9': bpo-41531: Fix compilation of dict literals with more than 0xFFFF elements (GH-21850) (GH-22107) https://github.com/python/cpython/commit/d64d78be20ced6ac9de58e91e69eaba184e36e9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:39:20 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 04 Sep 2020 23:39:20 +0000 Subject: [issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter In-Reply-To: <1597246976.86.0.332574378371.issue41531@roundup.psfhosted.org> Message-ID: <1599262760.86.0.875883318841.issue41531@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:40:34 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 04 Sep 2020 23:40:34 +0000 Subject: [issue41218] PyCF_ALLOW_TOP_LEVEL_AWAIT + list comprehension set .CO_COROUTINE falg. In-Reply-To: <1594047652.43.0.575402047323.issue41218@roundup.psfhosted.org> Message-ID: <1599262834.35.0.273918847173.issue41218@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21193 pull_request: https://github.com/python/cpython/pull/22109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:46:00 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Sep 2020 23:46:00 +0000 Subject: [issue41627] Relocate user site packages on Windows 32-bit In-Reply-To: <1598298331.25.0.959731633335.issue41627@roundup.psfhosted.org> Message-ID: <1599263160.14.0.545186769239.issue41627@roundup.psfhosted.org> Steve Dower added the comment: New changeset dd18001c308fb3bb65006c91d95f6639583a3420 by Steve Dower in branch 'master': bpo-41627: Distinguish 32 and 64-bit user site packages on Windows (GH-22098) https://github.com/python/cpython/commit/dd18001c308fb3bb65006c91d95f6639583a3420 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 19:46:47 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 04 Sep 2020 23:46:47 +0000 Subject: [issue41627] Relocate user site packages on Windows 32-bit In-Reply-To: <1598298331.25.0.959731633335.issue41627@roundup.psfhosted.org> Message-ID: <1599263207.94.0.0931032969622.issue41627@roundup.psfhosted.org> Steve Dower added the comment: > With the change in PR 22098, the 32-bit interpreter will install to a different location. To clarify this, I meant the 32-bit interpreter will install *packages* to a different location (when using the user scheme). ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 20:24:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Sep 2020 00:24:03 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599265443.84.0.745648554277.issue41718@roundup.psfhosted.org> Terry J. Reedy added the comment: On Windows with current master, the baseline for running anything with 1 import (">>> import sys; len(sys.modules)") is 35 imported modules. Adding "import unittest" increases this to 80. What slightly puzzles me is that running --- import unittest import sys class Tests(unittest.TestCase): def test_bug(self): print("len(sys.modules):", len(sys.modules)) if __name__ == "__main__": unittest.main() --- increases the number to 90. Perhaps unittest has delayed imports. The current startup number for IDLE is 162, which can result in a cold startup of several seconds. I am thinking of trying to reduce this by delaying imports of modules that are not immediately used and might never be used. For tests, I gather that side-effect issues are more important than startup time. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 21:11:01 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 05 Sep 2020 01:11:01 +0000 Subject: [issue41719] Why does not range() support decimals? In-Reply-To: <1599234850.47.0.91793785644.issue41719@roundup.psfhosted.org> Message-ID: <1599268261.27.0.839624678774.issue41719@roundup.psfhosted.org> Steven D'Aprano added the comment: Generating a range of equally-spaced floats is tricky and the range builtin is not the right solution for this. For numerical work, we often need to specify the number of steps, not the step size. For instance, in numeric integration, we often like to double the number of steps and avoid re-calculation. We often need to skip either the start or end point, or both, or neither. If you specify the step size, as range does, you can have off-by-one errors due to float rounding. See here for a discussion and possible solution: https://code.activestate.com/recipes/577878 ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 21:17:22 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Sep 2020 01:17:22 +0000 Subject: [issue41719] Why does not range() support decimals? In-Reply-To: <1599234850.47.0.91793785644.issue41719@roundup.psfhosted.org> Message-ID: <1599268642.76.0.815708228036.issue41719@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, the usual approach to the OP's problem is: >>> [x*0.5 for x in range(10)] [0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5] This technique generalizes to other sequences as well: >>> [x**2 for x in range(10)] [0, 1, 4, 9, 16, 25, 36, 49, 64, 81] As Steven points out, numeric work typically requires something different and a bit more sophisticated. The numpy package may be your best bet for this kind of work. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 22:10:13 2020 From: report at bugs.python.org (Todd Jennings) Date: Sat, 05 Sep 2020 02:10:13 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1599271813.74.0.854364350385.issue39883@roundup.psfhosted.org> Todd Jennings added the comment: The pull request is https://github.com/python/python-docs-theme/pull/36 It doesn't seem to went let me add it to linked pull requests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 22:31:13 2020 From: report at bugs.python.org (vishal rao) Date: Sat, 05 Sep 2020 02:31:13 +0000 Subject: [issue41722] multiprocess error on large dataset In-Reply-To: <1599261283.51.0.132892099897.issue41722@roundup.psfhosted.org> Message-ID: <1599273073.84.0.593228486047.issue41722@roundup.psfhosted.org> Change by vishal rao : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 4 22:53:13 2020 From: report at bugs.python.org (Sean Chao) Date: Sat, 05 Sep 2020 02:53:13 +0000 Subject: [issue41723] doc: issue in a sentence in py_compile Message-ID: <1599274393.95.0.247670918268.issue41723@roundup.psfhosted.org> New submission from Sean Chao : I think in https://docs.python.org/3.10/library/py_compile.html#py_compile.compile the sentence: > If dfile is specified, it is used as the name of the source file in error messages when instead of file. should not have the 'when'. ---------- assignee: docs at python components: Documentation messages: 376424 nosy: SeanChao, docs at python priority: normal severity: normal status: open title: doc: issue in a sentence in py_compile type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 02:23:53 2020 From: report at bugs.python.org (Ravi Misra) Date: Sat, 05 Sep 2020 06:23:53 +0000 Subject: [issue41724] SQLite returns instead of with aggregate queries. Message-ID: <1599287033.27.0.142696776365.issue41724@roundup.psfhosted.org> New submission from Ravi Misra : I tested the timestamp column in SQLite with MAX/MIN queries. They return string values instead of datetime.datetime. ---------- components: C API messages: 376425 nosy: ravi-misra priority: normal severity: normal status: open title: SQLite returns instead of with aggregate queries. type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 03:38:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Sep 2020 07:38:26 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599291506.36.0.960979569162.issue41718@roundup.psfhosted.org> Serhiy Storchaka added the comment: You could save/restore this data only when corresponded modules was imported, like it was done in clear_caches() in refleak.py. For example: # Same for Process objects def get_multiprocessing_process__dangling(self): multiprocessing_process = sys.modules.get('multiprocessing.process') if not multiprocessing_process: return set() # Unjoined process objects can survive after process exits multiprocessing_process._cleanup() # This copies the weakrefs without making any strong reference return multiprocessing_process._dangling.copy() def restore_multiprocessing_process__dangling(self, saved): multiprocessing_process = sys.modules.get('multiprocessing.process') if not multiprocessing_process: return multiprocessing_process._dangling.clear() multiprocessing_process._dangling.update(saved) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 04:04:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Sep 2020 08:04:07 +0000 Subject: [issue40486] pathlib's iterdir doesn't specify what happens if directory content change In-Reply-To: <1588523788.71.0.846056751312.issue40486@roundup.psfhosted.org> Message-ID: <1599293047.1.0.296680302976.issue40486@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.10, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 04:07:49 2020 From: report at bugs.python.org (Stefan Krah) Date: Sat, 05 Sep 2020 08:07:49 +0000 Subject: [issue41721] xlc: add -qalias=noansi -qmaxmem=-1 In-Reply-To: <1599250011.46.0.353326658252.issue41721@roundup.psfhosted.org> Message-ID: <1599293269.11.0.866677102925.issue41721@roundup.psfhosted.org> Change by Stefan Krah : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 06:26:14 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Sat, 05 Sep 2020 10:26:14 +0000 Subject: [issue41725] bz2 would use a dedicated exception for data error Message-ID: <1599301574.54.0.309033165254.issue41725@roundup.psfhosted.org> New submission from Micha? G?rny : Currently, the bz2 extension functions raise a generic OSError() on BZ_DATA_ERROR and BZ_DATA_ERROR_MAGIC. When working on files, this makes it unnecessarily hard to catch compressor errors (i.e. invalid bz2 input file) without catching system I/O errors. Could you please consider adding a new exception type for bz2 errors, akin to gzip.BadGzipFile? ---------- components: Extension Modules messages: 376427 nosy: mgorny priority: normal severity: normal status: open title: bz2 would use a dedicated exception for data error type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 06:40:01 2020 From: report at bugs.python.org (hai shi) Date: Sat, 05 Sep 2020 10:40:01 +0000 Subject: [issue41692] Deprecate immortal interned strings: PyUnicode_InternImmortal() In-Reply-To: <1599055165.93.0.874786911809.issue41692@roundup.psfhosted.org> Message-ID: <1599302401.24.0.508261349957.issue41692@roundup.psfhosted.org> hai shi added the comment: +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 06:50:48 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 05 Sep 2020 10:50:48 +0000 Subject: [issue41723] doc: issue in a sentence in py_compile In-Reply-To: <1599274393.95.0.247670918268.issue41723@roundup.psfhosted.org> Message-ID: <1599303048.39.0.98935301287.issue41723@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +21194 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 08:21:11 2020 From: report at bugs.python.org (S. Zhang) Date: Sat, 05 Sep 2020 12:21:11 +0000 Subject: [issue41555] re.sub replaces twice In-Reply-To: <1597707600.74.0.0435232717655.issue41555@roundup.psfhosted.org> Message-ID: S. Zhang added the comment: Thanks. On Mon, Aug 17, 2020 at 7:40 PM Pablo Galindo Salgado < report at bugs.python.org> wrote: > > Change by Pablo Galindo Salgado : > > > ---------- > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 09:26:54 2020 From: report at bugs.python.org (Stefan Krah) Date: Sat, 05 Sep 2020 13:26:54 +0000 Subject: =?utf-8?q?=5Bissue41717=5D_=5BAIX=5D_test=5Fio=3A_files_was_modified_by_t?= =?utf-8?b?ZXN0X2lvOiAoQHRlc3RfNjQ4ODc0OF90bXDDpikgb24gUE9XRVI2IEFJWCAz?= =?utf-8?q?=2E9?= In-Reply-To: <1599232438.83.0.403363375817.issue41717@roundup.psfhosted.org> Message-ID: <1599312414.79.0.8882613737.issue41717@roundup.psfhosted.org> Stefan Krah added the comment: I think this is a duplicate of #41401. ---------- nosy: +skrah resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Using non-ascii that require UTF-8 breaks AIX testing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 09:42:33 2020 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 05 Sep 2020 13:42:33 +0000 Subject: [issue41659] PEG discrepancy on 'if {x} {a}: pass' In-Reply-To: <1598650995.75.0.684602655166.issue41659@roundup.psfhosted.org> Message-ID: <1599313353.35.0.883445613992.issue41659@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- keywords: +patch pull_requests: +21195 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 09:45:09 2020 From: report at bugs.python.org (David Edelsohn) Date: Sat, 05 Sep 2020 13:45:09 +0000 Subject: [issue41401] Using non-ascii that require UTF-8 breaks AIX testing In-Reply-To: <1595772423.92.0.81107313537.issue41401@roundup.psfhosted.org> Message-ID: <1599313509.28.0.754072482919.issue41401@roundup.psfhosted.org> Change by David Edelsohn : ---------- nosy: +David.Edelsohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 11:37:30 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 05 Sep 2020 15:37:30 +0000 Subject: [issue41218] PyCF_ALLOW_TOP_LEVEL_AWAIT + list comprehension set .CO_COROUTINE falg. In-Reply-To: <1594047652.43.0.575402047323.issue41218@roundup.psfhosted.org> Message-ID: <1599320250.45.0.683243116558.issue41218@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset a708ae7470cf0abc58a62853c25d9bbc977f8cd1 by Miss Islington (bot) in branch '3.9': bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro (GH-21363) (GH-22109) https://github.com/python/cpython/commit/a708ae7470cf0abc58a62853c25d9bbc977f8cd1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 11:40:32 2020 From: report at bugs.python.org (hai shi) Date: Sat, 05 Sep 2020 15:40:32 +0000 Subject: [issue41726] Update the refcounts.dat of `PyType_FromModuleAndSpec` Message-ID: <1599320432.34.0.409671228483.issue41726@roundup.psfhosted.org> New submission from hai shi : `PyType_FromModuleAndSpec` in docs doesn't show the info:`Return value: New reference.` ---------- assignee: docs at python components: Documentation messages: 376432 nosy: docs at python, petr.viktorin, shihai1991 priority: normal severity: normal status: open title: Update the refcounts.dat of `PyType_FromModuleAndSpec` versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 11:42:59 2020 From: report at bugs.python.org (hai shi) Date: Sat, 05 Sep 2020 15:42:59 +0000 Subject: [issue41726] Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat In-Reply-To: <1599320432.34.0.409671228483.issue41726@roundup.psfhosted.org> Message-ID: <1599320579.89.0.365540702425.issue41726@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +21196 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 11:41:59 2020 From: report at bugs.python.org (hai shi) Date: Sat, 05 Sep 2020 15:41:59 +0000 Subject: [issue41726] Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat In-Reply-To: <1599320432.34.0.409671228483.issue41726@roundup.psfhosted.org> Message-ID: <1599320519.4.0.821418735906.issue41726@roundup.psfhosted.org> Change by hai shi : ---------- title: Update the refcounts.dat of `PyType_FromModuleAndSpec` -> Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 12:08:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 05 Sep 2020 16:08:01 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1599322081.87.0.559024828196.issue41654@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6ae61959ec51a6b3dddc8e665ce6a7b8aeb26c04 by Pablo Galindo in branch '3.8': bpo-41654: Explicitly cast PyExc_MemoryError to PyTypeObject to avoid warning (GH-22102) https://github.com/python/cpython/commit/6ae61959ec51a6b3dddc8e665ce6a7b8aeb26c04 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 12:13:00 2020 From: report at bugs.python.org (John Hagen) Date: Sat, 05 Sep 2020 16:13:00 +0000 Subject: [issue34556] Add --upgrade-deps to venv module In-Reply-To: <1535729151.14.0.56676864532.issue34556@psf.upfronthosting.co.za> Message-ID: <1599322380.23.0.643900456724.issue34556@roundup.psfhosted.org> John Hagen added the comment: I noticed this new feature was not added to the Python 3.9 what's new: https://docs.python.org/3.9/whatsnew/3.9.html#venv Should it be? ---------- nosy: +John Hagen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 13:59:04 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 05 Sep 2020 17:59:04 +0000 Subject: [issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries. In-Reply-To: <1599287033.27.0.142696776365.issue41724@roundup.psfhosted.org> Message-ID: <1599328744.63.0.211439968727.issue41724@roundup.psfhosted.org> Eric V. Smith added the comment: [Adjusted title so that it displays correctly when not logged in. The text within less-than and greater-than was being dropped, probably because some piece of code didn't want to display unknown tags.] ---------- nosy: +eric.smith title: SQLite returns instead of with aggregate queries. -> SQLite returns "str" instead of "datetime.datetime" with aggregate queries. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 14:32:28 2020 From: report at bugs.python.org (MegMM) Date: Sat, 05 Sep 2020 18:32:28 +0000 Subject: [issue41727] Confusing presentation for configuration settings references Message-ID: <1599330748.16.0.0755344279451.issue41727@roundup.psfhosted.org> New submission from MegMM : Priority: LOW Keywords: Documentation, Presentation of configuration settings Most of the documentation is excellent, but I'm running into a confusing method of referring to configuration settings in files. For instance on https://docs.python.org/3/library/venv.html, there is a section that reads: The created pyvenv.cfg file also includes the include-system-site-packages key, set to true if venv is run with the --system-site-packages option, false otherwise. Nothing about it is wrong but the presentation of the setting and variable should written as shown in the file instead of written out: "include-system-site-packages=True" Also, I see this in a lot of the documentation, which makes it hard to check if file settings match up with documentation as expected or not. ---------- assignee: docs at python components: Documentation files: SUGGESTED CHANGE-- venv.html messages: 376436 nosy: MegMM, docs at python priority: normal severity: normal status: open title: Confusing presentation for configuration settings references type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file49446/SUGGESTED CHANGE-- venv.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 14:48:28 2020 From: report at bugs.python.org (Vitaly Kruglikov) Date: Sat, 05 Sep 2020 18:48:28 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1599331708.19.0.779993054403.issue38240@roundup.psfhosted.org> Change by Vitaly Kruglikov : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 14:49:17 2020 From: report at bugs.python.org (Vitaly Kruglikov) Date: Sat, 05 Sep 2020 18:49:17 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016890.25.0.356226902269.issue38240@roundup.psfhosted.org> Message-ID: Vitaly Kruglikov added the comment: Re-opened, thanks! On Fri, Sep 20, 2019 at 3:01 PM Ammar Askar wrote: > > Ammar Askar added the comment: > > Hey Vitaly, not sure if you're the author of the original bug here: > https://bugs.python.org/issue27071 > > Could you re-open that so the discussion is kept in one place. > > ---------- > nosy: +ammar2 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 14:49:55 2020 From: report at bugs.python.org (Vitaly Kruglikov) Date: Sat, 05 Sep 2020 18:49:55 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1599331795.93.0.589041563831.issue38240@roundup.psfhosted.org> Vitaly Kruglikov added the comment: Reopened per request from ammar2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 15:10:10 2020 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 05 Sep 2020 19:10:10 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1599333010.01.0.455255667957.issue41687@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 8c0be6fd9101746235b63ddfb84106d1e9ca286b by Jakub Kul?k in branch 'master': bpo-41687: Fix sendfile implementation to work with Solaris (#22040) https://github.com/python/cpython/commit/8c0be6fd9101746235b63ddfb84106d1e9ca286b ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 15:10:31 2020 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 05 Sep 2020 19:10:31 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1599333031.4.0.469385523689.issue41687@roundup.psfhosted.org> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 15:32:02 2020 From: report at bugs.python.org (Jakub Kulik) Date: Sat, 05 Sep 2020 19:32:02 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1599334322.16.0.14999253343.issue6721@roundup.psfhosted.org> Change by Jakub Kulik : ---------- nosy: +kulikjak nosy_count: 27.0 -> 28.0 pull_requests: +21197 pull_request: https://github.com/python/cpython/pull/22040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 15:32:02 2020 From: report at bugs.python.org (Jakub Kulik) Date: Sat, 05 Sep 2020 19:32:02 +0000 Subject: [issue33802] Regression in logging configuration In-Reply-To: <1528412435.4.0.592728768989.issue33802@psf.upfronthosting.co.za> Message-ID: <1599334322.48.0.975321940159.issue33802@roundup.psfhosted.org> Change by Jakub Kulik : ---------- nosy: +kulikjak nosy_count: 7.0 -> 8.0 pull_requests: +21199 pull_request: https://github.com/python/cpython/pull/22040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 15:32:02 2020 From: report at bugs.python.org (Jakub Kulik) Date: Sat, 05 Sep 2020 19:32:02 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1599334322.41.0.698168420156.issue36533@roundup.psfhosted.org> Change by Jakub Kulik : ---------- nosy: +kulikjak nosy_count: 7.0 -> 8.0 pull_requests: +21198 pull_request: https://github.com/python/cpython/pull/22040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:02:41 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Sep 2020 20:02:41 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1599336161.88.0.939436877914.issue38240@roundup.psfhosted.org> Raymond Hettinger added the comment: This should stay closed as a duplicate. If you must, reopen of the original 27071, but it was closed for a reason. The majority of respondents voted for the status quo. Each alternative that was considered had its own share of problems. BTW, it is hyperbolic to call the name "horribly misleading". The method literally runs Counter and checks for equality. The docstring is clear about this: def assertCountEqual(self, first, second, msg=None): """Asserts that two iterables have the same elements, the same number of times, without regard to order. self.assertEqual(Counter(list(first)), Counter(list(second))) Example: - [0, 1, 1] and [1, 0, 1] compare equal. - [0, 0, 1] and [0, 1] compare unequal. """ ---------- nosy: +rhettinger status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:04:44 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 05 Sep 2020 20:04:44 +0000 Subject: [issue40318] Migrate to SQLite3 trace v2 API In-Reply-To: <1587210970.59.0.35117859461.issue40318@roundup.psfhosted.org> Message-ID: <1599336284.07.0.678715126579.issue40318@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: +Python 3.10 -Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:11:34 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 05 Sep 2020 20:11:34 +0000 Subject: [issue30646] SQLite: sqlite3_enable_shared_cache() is deprecated In-Reply-To: <1497342853.76.0.499200677365.issue30646@psf.upfronthosting.co.za> Message-ID: <1599336694.99.0.28984588426.issue30646@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: >From the SQLite docs https://sqlite.org/c3ref/enable_shared_cache.html: "Note: This method is disabled on MacOS X 10.7 and iOS version 5.0 and will always return SQLITE_MISUSE. On those systems, shared cache mode should be enabled per-database connection via sqlite3_open_v2() with SQLITE_OPEN_SHAREDCACHE." We should make sure sqlite3_open_v2() calls use SQLITE_OPEN_SHAREDCACHE if we are running on macOS. This should be a pretty straight-forward fix. ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:17:41 2020 From: report at bugs.python.org (Vitaly Kruglikov) Date: Sat, 05 Sep 2020 20:17:41 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1599336161.88.0.939436877914.issue38240@roundup.psfhosted.org> Message-ID: Vitaly Kruglikov added the comment: Well, when you do tab-completion in unit tests on `self.` and `assertCountEqual` pops up, it sure sounds a lot like it's going to compare just the count of the items. The point is that the name of the function is not self-documenting, hence "misleading". A better name could be `assertItemsEqual` or `assertCountAndItemsEqual` On Sat, Sep 5, 2020 at 1:02 PM Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > This should stay closed as a duplicate. > > If you must, reopen of the original 27071, but it was closed for a > reason. The majority of respondents voted for the status quo. Each > alternative that was considered had its own share of problems. > > BTW, it is hyperbolic to call the name "horribly misleading". The method > literally runs Counter and checks for equality. The docstring is clear > about this: > > def assertCountEqual(self, first, second, msg=None): > """Asserts that two iterables have the same elements, the same > number of > times, without regard to order. > > self.assertEqual(Counter(list(first)), > Counter(list(second))) > > Example: > - [0, 1, 1] and [1, 0, 1] compare equal. > - [0, 0, 1] and [0, 1] compare unequal. > > """ > > ---------- > nosy: +rhettinger > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:37:13 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 05 Sep 2020 20:37:13 +0000 Subject: [issue30646] SQLite: sqlite3_enable_shared_cache() is deprecated In-Reply-To: <1497342853.76.0.499200677365.issue30646@psf.upfronthosting.co.za> Message-ID: <1599338233.63.0.984923601747.issue30646@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: A little bit too fast with my previous comment; just disregard that suggestion. Maybe we should just disable the sqlite3.enable_shared_cache() method if we are running on macOS, since it will only result in a misuse error anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:43:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 05 Sep 2020 20:43:35 +0000 Subject: [issue40318] Migrate to SQLite3 trace v2 API In-Reply-To: <1587210970.59.0.35117859461.issue40318@roundup.psfhosted.org> Message-ID: <1599338615.17.0.157489596363.issue40318@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7f331c898a36d937c66ba93f86d2a445c96d382e by Erlend Egeberg Aasland in branch 'master': bpo-40318: Migrate to SQLite3 trace v2 API (GH-19581) https://github.com/python/cpython/commit/7f331c898a36d937c66ba93f86d2a445c96d382e ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:43:58 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 05 Sep 2020 20:43:58 +0000 Subject: [issue40318] Migrate to SQLite3 trace v2 API In-Reply-To: <1587210970.59.0.35117859461.issue40318@roundup.psfhosted.org> Message-ID: <1599338638.77.0.159727030035.issue40318@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 16:44:07 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 05 Sep 2020 20:44:07 +0000 Subject: [issue24464] "sqlite3_enable_shared_cache" deprecation warning when compiling with macOS system SQLite3 In-Reply-To: <1434627103.24.0.34027869681.issue24464@psf.upfronthosting.co.za> Message-ID: <1599338647.89.0.89793201425.issue24464@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: The SQLite docs clearly states that using sqlite3_enable_shared_cache() is not recommended: "Shared cache is disabled by default. It is recommended that it stay that way. In other words, do not use this routine. This interface continues to be provided for historical compatibility, but its use is discouraged. Any use of shared cache is discouraged." If sqlite3.enable_shared_cache is not even documented, perhaps we could just deprecate and remove it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 17:58:38 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 05 Sep 2020 21:58:38 +0000 Subject: [issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries. In-Reply-To: <1599287033.27.0.142696776365.issue41724@roundup.psfhosted.org> Message-ID: <1599343118.32.0.517673090812.issue41724@roundup.psfhosted.org> Dennis Sweeney added the comment: Here's a reproducer. ---------- nosy: +Dennis Sweeney Added file: https://bugs.python.org/file49447/reproducer.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 18:39:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Sep 2020 22:39:11 +0000 Subject: [issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries. In-Reply-To: <1599287033.27.0.142696776365.issue41724@roundup.psfhosted.org> Message-ID: <1599345551.32.0.594431948042.issue41724@roundup.psfhosted.org> Serhiy Storchaka added the comment: PARSE_DECLTYPES does not work for generated fields. sqlite3_column_decltype() just returns NULL. PARSE_COLNAMES works only when the column name contains the column type in square brackets. For generated fields sqlite3_column_name() returns the expression used to evaluate it, e.g. "max(d)". It does not contain needed information. So we cannot do anything with this because SQLite just does not provide information needed to determine the type. It would be worth to document this limitation. ---------- nosy: +berker.peksag, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 19:48:02 2020 From: report at bugs.python.org (Elliott Balsley) Date: Sat, 05 Sep 2020 23:48:02 +0000 Subject: [issue41728] Add logfile() when debug is True Message-ID: <1599349682.16.0.1036411059.issue41728@roundup.psfhosted.org> New submission from Elliott Balsley : When you add a TarInfo object created directly in memory, for example from a byte string, there is no debug logging available. `tarfile.add()` logs the name of each file added when debug level is 1 or higher. I think it would be a good idea to do the same for `tarfile.addfile()`, perhaps with a higher debug level. It looks like debug=3 is currently unused, even though it's defined in the documentation. ---------- components: Library (Lib) messages: 376448 nosy: ebalsley priority: normal severity: normal status: open title: Add logfile() when debug is True type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 19:48:46 2020 From: report at bugs.python.org (Elliott Balsley) Date: Sat, 05 Sep 2020 23:48:46 +0000 Subject: [issue41728] Debug logging when adding a TarFile object In-Reply-To: <1599349682.16.0.1036411059.issue41728@roundup.psfhosted.org> Message-ID: <1599349726.23.0.489797125771.issue41728@roundup.psfhosted.org> Change by Elliott Balsley : ---------- title: Add logfile() when debug is True -> Debug logging when adding a TarFile object _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 19:57:11 2020 From: report at bugs.python.org (Elliott Balsley) Date: Sat, 05 Sep 2020 23:57:11 +0000 Subject: [issue41728] Debug logging when adding a TarFile object In-Reply-To: <1599349682.16.0.1036411059.issue41728@roundup.psfhosted.org> Message-ID: <1599350231.93.0.665883181621.issue41728@roundup.psfhosted.org> Change by Elliott Balsley : ---------- keywords: +patch pull_requests: +21200 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 19:59:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Sep 2020 23:59:41 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows Message-ID: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> New submission from Terry J. Reedy : f:\dev\3x>python -m test test.test_winconsoleio Running Debug|Win32 interpreter... 0:00:00 Run tests sequentially 0:00:00 [1/1] test.test_winconsoleio ??????????^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z ---- It quickly fails, prints seems garbage and several blanks lines, and hangs. Ditto for 3.9 and 3.8. When I ran entire suite, it was still hanging after 50 minutes. Victor's patch for issue 38325 skipped the tests that failed on Windows, but now the overall test is worse. One must interrupt with ^C to get the test summary for the suite. ---------- components: Tests, Windows messages: 376449 nosy: eryksun, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: test_winconsoleio fails and hangs on Windows type: crash versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 20:00:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 Sep 2020 00:00:27 +0000 Subject: [issue38325] [Windows] test_winconsoleio failures In-Reply-To: <1569849615.84.0.245223982483.issue38325@roundup.psfhosted.org> Message-ID: <1599350427.91.0.644259468765.issue38325@roundup.psfhosted.org> Terry J. Reedy added the comment: test_consoleio now fails and hangs for me. Issue 41729. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 21:33:59 2020 From: report at bugs.python.org (Mariatta) Date: Sun, 06 Sep 2020 01:33:59 +0000 Subject: [issue38585] defusedexpat not supported past python 3.3/3.4 In-Reply-To: <1571928342.44.0.0364587849841.issue38585@roundup.psfhosted.org> Message-ID: <1599356039.35.0.105261963404.issue38585@roundup.psfhosted.org> Mariatta added the comment: Thanks for the report and thanks Zackery for the PR. ---------- nosy: +Mariatta resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 22:23:09 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 06 Sep 2020 02:23:09 +0000 Subject: [issue41728] Debug logging when adding a TarFile object In-Reply-To: <1599349682.16.0.1036411059.issue41728@roundup.psfhosted.org> Message-ID: <1599358989.33.0.0863001283956.issue41728@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ethan.furman, lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 22:35:42 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 Sep 2020 02:35:42 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599359742.96.0.455388137924.issue41729@roundup.psfhosted.org> Terry J. Reedy added the comment: Running test -v test_winconsoleio showed that the hang is in test_cntl_z. With that commented out, I get failures in test_input (1st assert) and test_partial_reads and some bizarre console behavior. F:\dev\3x>python -m test -v test_winconsoleio Running Debug|Win32 interpreter... == CPython 3.10.0a0 (heads/master:1264d0465a, Sep 5 2020, 18:53:05) [MSC v.1900 32 bit (Intel)] == Windows-10-10.0.19041-SP0 little-endian == cwd: F:\dev\3x\build\test_python_7960? == CPU count: 12 == encodings: locale=cp1252, FS=utf-8 0:00:00 Run tests sequentially 0:00:00 [1/1] test_winconsoleio test_abc (test.test_winconsoleio.WindowsConsoleIOTests) ... ok test_conin_conout_names (test.test_winconsoleio.WindowsConsoleIOTests) ... ok test_conout_path (test.test_winconsoleio.WindowsConsoleIOTests) ... ok test_input (test.test_winconsoleio.WindowsConsoleIOTests) ... aaaaaaaaaabbbbbbbbbbcccccccccc111111111122222222223333333333 FAIL test_input_nonbmp (test.test_winconsoleio.WindowsConsoleIOTests) ... skipped 'Handling Non-BMP characters is broken' test_open_fd (test.test_winconsoleio.WindowsConsoleIOTests) ... ok test_open_name (test.test_winconsoleio.WindowsConsoleIOTests) ... ok test_partial_reads (test.test_winconsoleio.WindowsConsoleIOTests) ... FAIL test_partial_surrogate_reads (test.test_winconsoleio.WindowsConsoleIOTests) ... skipped 'Handling Non-BMP characters is broken' test_write_empty_data (test.test_winconsoleio.WindowsConsoleIOTests) ... ok ====================================================================== FAIL: test_input (test.test_winconsoleio.WindowsConsoleIOTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "f:\dev\3x\lib\test\test_winconsoleio.py", line 142, in test_input self.assertStdinRoundTrip('abc123') File "f:\dev\3x\lib\test\test_winconsoleio.py", line 138, in assertStdinRoundTrip self.assertEqual(actual, text) AssertionError: 'aaaaaaaaaabbbbbbbbbbcccccccccc111111111122222222223333333333' != 'abc123' - aaaaaaaaaabbbbbbbbbbcccccccccc111111111122222222223333333333 + abc123 ====================================================================== FAIL: test_partial_reads (test.test_winconsoleio.WindowsConsoleIOTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "f:\dev\3x\lib\test\test_winconsoleio.py", line 168, in test_partial_reads self.assertEqual(actual, expected, 'stdin.read({})'.format(read_count)) AssertionError: b'\r\n' != b'\xcf\xbc\xd1\x9e\xd0\xa2\xce\xbb\xd0\xa4\xd0\x99\r\n' : stdin.read(1) ---------------------------------------------------------------------- Ran 10 tests in 0.019s FAILED (failures=2, skipped=2) test test_winconsoleio failed test_winconsoleio failed == Tests result: FAILURE == 1 test failed: test_winconsoleio Total duration: 266 ms Tests result: FAILURE F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x>???????????????????????????????????????????????????????????? '????????????????????????????????????????????????????????????' is not recognized as an internal or external command, operable program or batch file. F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> F:\dev\3x> Even though behavior is the same in 3 different workspaces, and the file shows no obvious sign of corruption in Notepad++, I deleted it anyway (in master) with Windows Explorer 'delete' (not git delete) and then reverted the change. Still, someone should verify that this is not just my machine. Note that I just got the 2008 updates (last Tuesday?) to Win 10, 2004, some of which were apparently optional at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 23:39:36 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 06 Sep 2020 03:39:36 +0000 Subject: [issue41723] doc: issue in a sentence in py_compile In-Reply-To: <1599274393.95.0.247670918268.issue41723@roundup.psfhosted.org> Message-ID: <1599363576.67.0.777111790167.issue41723@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 5371a464ce88ffc88f3bb95cfd86f355b7d02953 by Zackery Spytz in branch 'master': closes bpo-41723: Fix an error in the py_compile documentation. (GH-22110) https://github.com/python/cpython/commit/5371a464ce88ffc88f3bb95cfd86f355b7d02953 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 23:39:42 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 06 Sep 2020 03:39:42 +0000 Subject: [issue41723] doc: issue in a sentence in py_compile In-Reply-To: <1599274393.95.0.247670918268.issue41723@roundup.psfhosted.org> Message-ID: <1599363582.26.0.900553345849.issue41723@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21201 pull_request: https://github.com/python/cpython/pull/22117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 23:40:36 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 06 Sep 2020 03:40:36 +0000 Subject: [issue41723] doc: issue in a sentence in py_compile In-Reply-To: <1599274393.95.0.247670918268.issue41723@roundup.psfhosted.org> Message-ID: <1599363636.32.0.299219820554.issue41723@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +21202 pull_request: https://github.com/python/cpython/pull/22118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 23:47:21 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 06 Sep 2020 03:47:21 +0000 Subject: [issue41723] doc: issue in a sentence in py_compile In-Reply-To: <1599274393.95.0.247670918268.issue41723@roundup.psfhosted.org> Message-ID: <1599364041.18.0.927200328174.issue41723@roundup.psfhosted.org> miss-islington added the comment: New changeset 4e581d64b8aff3e2eda99b12f080c877bb78dfca by Miss Islington (bot) in branch '3.8': closes bpo-41723: Fix an error in the py_compile documentation. (GH-22110) https://github.com/python/cpython/commit/4e581d64b8aff3e2eda99b12f080c877bb78dfca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 23:54:50 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 06 Sep 2020 03:54:50 +0000 Subject: [issue41723] doc: issue in a sentence in py_compile In-Reply-To: <1599274393.95.0.247670918268.issue41723@roundup.psfhosted.org> Message-ID: <1599364490.75.0.875892044311.issue41723@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset b6d2acb1b1a21f857c17cfb6e0e97a7b8bdc0171 by Benjamin Peterson in branch '3.9': [3.9] closes bpo-41723: Fix an error in the py_compile documentation. (GH-22118) https://github.com/python/cpython/commit/b6d2acb1b1a21f857c17cfb6e0e97a7b8bdc0171 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 5 23:54:50 2020 From: report at bugs.python.org (wyz23x2) Date: Sun, 06 Sep 2020 03:54:50 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix Message-ID: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> New submission from wyz23x2 : The tkinter.tix module was deprecated since Python 3.6, but nether DeprecationWarning nor PendingDeprecationWarning is warned. It should show a message and removal might be scheduled for 3.11/3.12. ---------- components: Tkinter messages: 376455 nosy: wyz23x2 priority: normal severity: normal status: open title: Show deprecation warnings for tkinter.tix type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 00:57:49 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 06 Sep 2020 04:57:49 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 Message-ID: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : When verbosity level is more than 1 the test tries to print the script_exec_args passed to script. It fails when the tuple has more than 1 elements and is used in formatting with %r. The two tests fail as below : ./python -m test test_cmd_line_script -vv ====================================================================== ERROR: test_package_error (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/cpython/Lib/test/test_cmd_line_script.py", line 368, in test_package_error self._check_import_error(["-m", "test_pkg"], msg, cwd=script_dir) File "/root/cpython/Lib/test/test_cmd_line_script.py", line 148, in _check_import_error print('Output from test script %r:' % script_exec_args) TypeError: not all arguments converted during string formatting ====================================================================== ERROR: test_package_recursion (test.test_cmd_line_script.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/cpython/Lib/test/test_cmd_line_script.py", line 379, in test_package_recursion self._check_import_error(["-m", "test_pkg"], msg, cwd=script_dir) File "/root/cpython/Lib/test/test_cmd_line_script.py", line 148, in _check_import_error print('Output from test script %r:' % script_exec_args) TypeError: not all arguments converted during string formatting ---------------------------------------------------------------------- Ran 44 tests in 4.936s FAILED (errors=2) test test_cmd_line_script failed test_cmd_line_script failed == Tests result: FAILURE == 1 test failed: test_cmd_line_script Total duration: 5.0 sec Tests result: FAILURE ---------- components: Tests messages: 376457 nosy: xtreak priority: normal severity: normal status: open title: test_cmd_line_script fails with verbosity level more than 1 type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 01:09:24 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 06 Sep 2020 05:09:24 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599368964.63.0.0546486376433.issue41672@roundup.psfhosted.org> Dong-hee Na added the comment: @norbertcyran Do you want to sand a patch that it update string to byte for this documentation? ---------- keywords: +newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 03:52:57 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 06 Sep 2020 07:52:57 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599378777.23.0.515590336638.issue41730@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The removal was suggested before but not merged in https://bugs.python.org/issue31371 ---------- nosy: +gpolo, serhiy.storchaka, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 05:06:52 2020 From: report at bugs.python.org (Diogo Flores) Date: Sun, 06 Sep 2020 09:06:52 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement Message-ID: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> New submission from Diogo Flores : Hi, Here's a patch that adds an iterator to memoryview, which makes iterating over memoryview objs considerably faster. The following values result from a compilation with debug ON. ------------------------------------------------------------------------ Without patch: cpython: ./python.exe -m timeit -s "a=memoryview(b'x'*1000000)" "for x in a: pass" 5 loops, best of 5: 98 msec per loop cpython: ./python.exe -m timeit -s "a=b'x'*1000000" "for x in a: pass" 5 loops, best of 5: 68.6 msec per loop With patch: cpython: ./python.exe -m timeit -s "a=memoryview(b'x'*1000000)" "for x in a: pass" 5 loops, best of 5: 68.1 msec per loop cpython: ./python.exe -m timeit -s "a=b'x'*1000000" "for x in a: pass" 5 loops, best of 5: 70 msec per loop ------------------------------------------------------------------------ Please let me know your thoughts regarding it. Diogo ---------- messages: 376460 nosy: dxflores priority: normal severity: normal status: open title: Custom iterator to memoryview - performance improvement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 05:19:12 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 06 Sep 2020 09:19:12 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599383952.57.0.315907408905.issue41732@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 05:20:15 2020 From: report at bugs.python.org (Diogo Flores) Date: Sun, 06 Sep 2020 09:20:15 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599384015.46.0.977653602162.issue41732@roundup.psfhosted.org> Change by Diogo Flores : ---------- keywords: +patch pull_requests: +21203 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22119 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 06:10:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Sep 2020 10:10:21 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599387021.19.0.360335484049.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818) https://github.com/python/cpython/commit/63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 06:10:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Sep 2020 10:10:37 +0000 Subject: [issue38325] [Windows] test_winconsoleio failures In-Reply-To: <1569849615.84.0.245223982483.issue38325@roundup.psfhosted.org> Message-ID: <1599387037.12.0.198915975103.issue38325@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 06:12:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Sep 2020 10:12:46 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599233772.93.0.299899979889.issue41718@roundup.psfhosted.org> Message-ID: <1599387166.24.0.227998273967.issue41718@roundup.psfhosted.org> STINNER Victor added the comment: > You could save/restore this data only when corresponded modules was imported, like it was done in clear_caches() in refleak.py. It was my first idea, but some large modules like multiprocessing and asyncio are only imported by tested when the test file is imported, whereas save_environment() is called (__enter__) before the import in libregrtest.runtest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 06:15:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Sep 2020 10:15:30 +0000 Subject: [issue30646] SQLite: sqlite3_enable_shared_cache() is deprecated In-Reply-To: <1497342853.76.0.499200677365.issue30646@psf.upfronthosting.co.za> Message-ID: <1599387330.73.0.941608624975.issue30646@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 08:48:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 06 Sep 2020 12:48:40 +0000 Subject: [issue41718] test.regrtest has way too many imports In-Reply-To: <1599387166.24.0.227998273967.issue41718@roundup.psfhosted.org> Message-ID: Serhiy Storchaka added the comment: > > Yes, but they should be imported after running the test. Note that the > default value in the example was changed from None to set(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 09:41:11 2020 From: report at bugs.python.org (Jason Chen) Date: Sun, 06 Sep 2020 13:41:11 +0000 Subject: [issue41733] ContextVar get value is unexpected Message-ID: <1599399671.9.0.0244607607619.issue41733@roundup.psfhosted.org> New submission from Jason Chen : import asyncio from contextvars import * var = ContextVar('VarTest', default=None) def get_var(tag=None): obj = var.get() if obj is None: obj = object() var.set(obj) print(f'{tag=}: get_var result is {obj=}') return obj async def get_var_object(tag): return get_var(tag) async def asyncio_main(): await asyncio.gather(*[get_var_object(id) for id in range(2)]) def test(get_var_before_run=False): print(f'{get_var_before_run=}') if get_var_before_run: get_var() asyncio.run(asyncio_main()) print() if __name__ == '__main__': test(get_var_before_run=False) test(get_var_before_run=True) ---- Output:------- tag=0: get_var result is obj= tag=1: get_var result is obj= get_var_before_run=True tag=None: get_var result is obj= tag=0: get_var result is obj= tag=1: get_var result is obj= --- my question: ------ -- all objects in get_var_before_run=True are same. -- my expected result is all objects should be different, because the code runs in different context. ---------- components: asyncio messages: 376464 nosy: asvetlov, chenzep, yselivanov priority: normal severity: normal status: open title: ContextVar get value is unexpected versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 12:30:27 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 06 Sep 2020 16:30:27 +0000 Subject: [issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore In-Reply-To: <1480592723.97.0.369129599105.issue28850@psf.upfronthosting.co.za> Message-ID: <1599409827.83.0.880844872697.issue28850@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch nosy: +iritkatriel nosy_count: 7.0 -> 8.0 pull_requests: +21205 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 12:31:30 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 06 Sep 2020 16:31:30 +0000 Subject: [issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore In-Reply-To: <1480592723.97.0.369129599105.issue28850@psf.upfronthosting.co.za> Message-ID: <1599409890.63.0.140743882223.issue28850@roundup.psfhosted.org> Irit Katriel added the comment: This issue only impacts container objects where the len(repr(o)) is less than width. If the length is greater than width, containers are handled by a different code path which is covered by a unit test and works correctly. For this case, indeed it works in Python 2 but not in Python 3. The PrettyPrinter._format code has been refactored quite a lot with respect to handling of containers. In both Python 2 and 3 this happens: PrettyPrinter.pprint([10]) calls PrettyPrinter._format([10]) which calls PrettyPrinter._repr([10]) which calls MyPrettyPrinter.format([10]) which calls PrettyPrinter.format([10]) which calls _safe_repr([10]) which calls _safe_repr(10) returns 10 returns [10] returns [10] returns [10] returns [10] But then they diverge - in Python 3 the [10] is returned as the result, but in Python 2 there is another piece of code (starting here https://github.com/python/cpython/blob/fdda200195f9747e411d3491aae0806bc1fcd919/Lib/pprint.py#L179) which overrides this result and recalculates the representation for containers. In our case it does: since issubclass(type([10]), list): # ignore the [10] calculated above, now call self._format(10) which calls PrettyPrinter._repr(10) which calls MyPrettyPrinter.format(10) returns 0xa returns 0xa returns 0xa returns [0xa] This explains the difference between Python 2 and 3. As to why the first calculation returns [10] and not [0xa]: This is because _safe_repr is defined at module scope, so once it is called we are no longer on the PrettyPrinter instance, and the format() override is no longer accessible. When _safe_repr needs to recurse on container contents, it calls itself. I think the solution is to make _safe_repr a method of PrettyPrinter, and make it call self.format() when it needs to recurse. The default self.format() just calls _safe_repr, so when there is no override the result is the same. The PR's diff looks substantial, but that's mostly due to the indentation of _safe_repr code. To make it easier to review, I split it into several commits, where the indentation is done in one commit as a noop change. The other commits have much smaller diffs. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 12:39:06 2020 From: report at bugs.python.org (Norbert Cyran) Date: Sun, 06 Sep 2020 16:39:06 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599410346.38.0.80883204299.issue41672@roundup.psfhosted.org> Norbert Cyran added the comment: @ericsmith Sure, I can create a PR and link it here when I'm done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 13:28:11 2020 From: report at bugs.python.org (Bar Harel) Date: Sun, 06 Sep 2020 17:28:11 +0000 Subject: [issue41571] Implement thread-related commands in pdb In-Reply-To: <1597708081.91.0.301663763083.issue41571@roundup.psfhosted.org> Message-ID: <1599413291.88.0.0514963280724.issue41571@roundup.psfhosted.org> Change by Bar Harel : ---------- nosy: +bar.harel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 13:29:22 2020 From: report at bugs.python.org (Bar Harel) Date: Sun, 06 Sep 2020 17:29:22 +0000 Subject: [issue23163] pdb docs need to contain a statement on threads/multithreaded debugging In-Reply-To: <1420366883.83.0.11703664982.issue23163@psf.upfronthosting.co.za> Message-ID: <1599413362.75.0.909948988115.issue23163@roundup.psfhosted.org> Change by Bar Harel : ---------- nosy: +bar.harel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 15:03:41 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 06 Sep 2020 19:03:41 +0000 Subject: [issue23163] pdb docs need to contain a statement on threads/multithreaded debugging In-Reply-To: <1420366883.83.0.11703664982.issue23163@psf.upfronthosting.co.za> Message-ID: <1599419021.79.0.329581291135.issue23163@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: See also https://bugs.python.org/issue41571 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 15:15:07 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 06 Sep 2020 19:15:07 +0000 Subject: [issue41734] Refactor b32{encode,decode} tests Message-ID: <1599419707.5.0.662940988901.issue41734@roundup.psfhosted.org> New submission from Filipe La?ns : As discussed in https://github.com/python/cpython/pull/20441, these tests could be improved by using the same format of the b32hex{encode,decode} tests. ---------- components: Tests messages: 376468 nosy: FFY00, p-ganssle priority: normal severity: normal status: open title: Refactor b32{encode,decode} tests type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 15:34:10 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Sun, 06 Sep 2020 19:34:10 +0000 Subject: [issue41734] Refactor b32{encode,decode} tests In-Reply-To: <1599419707.5.0.662940988901.issue41734@roundup.psfhosted.org> Message-ID: <1599420850.2.0.379315452533.issue41734@roundup.psfhosted.org> Change by Filipe La?ns : ---------- keywords: +patch pull_requests: +21206 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 15:49:13 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Sep 2020 19:49:13 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1599421753.15.0.364181784345.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : Removed file: https://bugs.python.org/file49398/test_hypot_commutativity.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 15:50:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Sep 2020 19:50:03 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1599421803.63.0.469647253307.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file49448/test_hypot_commutativity.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 17:13:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Sep 2020 21:13:09 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1599426789.31.0.775811948064.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +21207 pull_request: https://github.com/python/cpython/pull/22123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 17:41:40 2020 From: report at bugs.python.org (mohamed koubaa) Date: Sun, 06 Sep 2020 21:41:40 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599428500.39.0.77616133695.issue41713@roundup.psfhosted.org> mohamed koubaa added the comment: Sounds like there needs to be some python-wide global state that perhaps the signal module wraps rather than owns. I could try to prototype it if you agree ---------- nosy: +koubaa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 18:10:16 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Sep 2020 22:10:16 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1599430216.14.0.442225930341.issue41513@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 67c998de24985b36498b0fdac68d1beceb43aba7 by Raymond Hettinger in branch 'master': bpo-41513: Expand comments and add references for a better understanding (GH-22123) https://github.com/python/cpython/commit/67c998de24985b36498b0fdac68d1beceb43aba7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 19:53:25 2020 From: report at bugs.python.org (Eryk Sun) Date: Sun, 06 Sep 2020 23:53:25 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599436405.8.0.963583915505.issue41729@roundup.psfhosted.org> Eryk Sun added the comment: > ??????????^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z I don't know why Steve made write_input (PC/_testconsole.c) set wRepeatCount in each KeyEvent record to 10. Maybe it was a typo. Previous console implementations have ignored the repeat count, so it wasn't an issue. test_ctrl_z checks (1) that reading a non-ASCII character works when split across two reads and (2) that Ctrl+Z (0x1A) as the first character of a read is handled as EOF, regardless of where it occurs on the line as long as it's the first character in the buffer. The latter has to be tested because _WindowsConsoleIO has to manually implement the way that WinAPI ReadFile handles Ctrl+Z, a behavior that WinAPI ReadConsoleW does not itself implement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 19:55:48 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 06 Sep 2020 23:55:48 +0000 Subject: [issue38306] High level API for loop.run_in_executor(None, ...)? In-Reply-To: <1569681785.01.0.799144749415.issue38306@roundup.psfhosted.org> Message-ID: <1599436548.23.0.781124680885.issue38306@roundup.psfhosted.org> Guido van Rossum added the comment: Really closing. ---------- nosy: +gvanrossum stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 23:14:47 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 07 Sep 2020 03:14:47 +0000 Subject: [issue41735] Thread locks in zlib module may go wrong in rare case Message-ID: <1599448486.98.0.401518384343.issue41735@roundup.psfhosted.org> New submission from Ma Lin : The code in zlib module: self->zst.next_in = data->buf; // set next_in ... ENTER_ZLIB(self); // acquire thread lock `self->zst` is a `z_stream` struct defined in zlib, used to record states of a compress/decompress stream: typedef struct z_stream_s { Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ uLong total_in; /* total number of input bytes read so far */ Bytef *next_out; /* next output byte will go here */ uInt avail_out; /* remaining free space at next_out */ uLong total_out; /* total number of bytes output so far */ ... // Other states } z_stream; Setting `next_in` before acquiring the thread lock may mix up compress/decompress state in other threads. Moreover, modify `ENTER_ZLIB` macro, don't release the GIL when the thread lock can be acquired immediately. This behavior is the same as the bz2/lzma modules. ---------- components: Library (Lib) messages: 376473 nosy: malin priority: normal severity: normal status: open title: Thread locks in zlib module may go wrong in rare case type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 6 23:17:21 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 07 Sep 2020 03:17:21 +0000 Subject: [issue41735] Thread locks in zlib module may go wrong in rare case In-Reply-To: <1599448486.98.0.401518384343.issue41735@roundup.psfhosted.org> Message-ID: <1599448641.95.0.834186506344.issue41735@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +21208 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 03:36:00 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 07:36:00 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1599464160.07.0.453162380938.issue6721@roundup.psfhosted.org> Change by Jakub Kulik : ---------- pull_requests: -21197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 03:36:12 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 07:36:12 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1599464172.04.0.695726879094.issue6721@roundup.psfhosted.org> Change by Jakub Kulik : ---------- nosy: -kulikjak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 03:38:10 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 07:38:10 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1599464290.77.0.205702360931.issue36533@roundup.psfhosted.org> Change by Jakub Kulik : ---------- pull_requests: -21198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 03:38:17 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 07:38:17 +0000 Subject: [issue33802] Regression in logging configuration In-Reply-To: <1528412435.4.0.592728768989.issue33802@psf.upfronthosting.co.za> Message-ID: <1599464297.48.0.855305294927.issue33802@roundup.psfhosted.org> Change by Jakub Kulik : ---------- nosy: -kulikjak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 03:38:12 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 07:38:12 +0000 Subject: [issue33802] Regression in logging configuration In-Reply-To: <1528412435.4.0.592728768989.issue33802@psf.upfronthosting.co.za> Message-ID: <1599464292.31.0.59792562716.issue33802@roundup.psfhosted.org> Change by Jakub Kulik : ---------- pull_requests: -21199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 03:38:14 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 07:38:14 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1599464294.97.0.364484039371.issue36533@roundup.psfhosted.org> Change by Jakub Kulik : ---------- nosy: -kulikjak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 04:25:29 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 08:25:29 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1599467129.07.0.114540728315.issue41687@roundup.psfhosted.org> Change by Jakub Kulik : ---------- pull_requests: +21209 pull_request: https://github.com/python/cpython/pull/22128 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 04:28:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 08:28:03 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599467283.17.0.529954982626.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1aaa21ff818b08af2a68862b552b7ba0857492eb by Mohamed Koubaa in branch 'master': bpo-1635741 port zlib module to multi-phase init (GH-21995) https://github.com/python/cpython/commit/1aaa21ff818b08af2a68862b552b7ba0857492eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 04:31:23 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 08:31:23 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1599467483.8.0.417089096728.issue41687@roundup.psfhosted.org> Jakub Kulik added the comment: I just realized that the recently merged PR has broken error handling, so I opened another one with a followup fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 04:42:14 2020 From: report at bugs.python.org (Jakub Kulik) Date: Mon, 07 Sep 2020 08:42:14 +0000 Subject: [issue35520] Python won't build with dtrace enabled on some systems. In-Reply-To: <1545047330.52.0.788709270274.issue35520@psf.upfronthosting.co.za> Message-ID: <1599468134.24.0.649681680965.issue35520@roundup.psfhosted.org> Jakub Kulik added the comment: No more non-security related backports to 3.7 allowed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 04:49:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 08:49:06 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599468546.32.0.269889488895.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 426f2b4f13f392875e7861dbd7f34735731eff17 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _opcode module to multi-phase init (PEP 489) (GH-22050) https://github.com/python/cpython/commit/426f2b4f13f392875e7861dbd7f34735731eff17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 08:04:27 2020 From: report at bugs.python.org (=?utf-8?q?GR3_WEB_-_CRIA=C3=87=C3=83O_DE_SITE?=) Date: Mon, 07 Sep 2020 12:04:27 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP In-Reply-To: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> Message-ID: <1599480267.0.0.189167844972.issue40562@roundup.psfhosted.org> GR3 WEB - CRIA??O DE SITE added the comment: This problem on my website too. https://gr3web.com.br it seems that there is an SEO bug against the Python documentation - Google is truncating part of the title that informs if the documents are for Python 2 or Python 3 ---------- nosy: +gr3web versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 08:20:04 2020 From: report at bugs.python.org (Julien Palard) Date: Mon, 07 Sep 2020 12:20:04 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP In-Reply-To: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> Message-ID: <1599481204.11.0.232329540146.issue40562@roundup.psfhosted.org> Julien Palard added the comment: Hi Simon, thanks for reporting! This looks like a Google issue, not a Python documentation issue: Google tries to deduce something better than the URL to display to the user, and fails, please open the issue on the Google bug tracker instead. (As a side note, DuckDuckGo displays it correctly (see attached screenshot).) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed Added file: https://bugs.python.org/file49449/Screenshot_2020-09-07 sqlite3 row at DuckDuckGo.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:12:44 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:12:44 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599484364.37.0.429943835646.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2aabc3200bf03d2ec1aa987e1e20db704948111e by Mohamed Koubaa in branch 'master': bpo-1635741: Port _overlapped module to multi-phase init (GH-22051) https://github.com/python/cpython/commit/2aabc3200bf03d2ec1aa987e1e20db704948111e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:39:31 2020 From: report at bugs.python.org (David Steele) Date: Mon, 07 Sep 2020 13:39:31 +0000 Subject: [issue12806] argparse: Hybrid help text formatter In-Reply-To: <1313973978.37.0.422477813424.issue12806@psf.upfronthosting.co.za> Message-ID: <1599485971.34.0.776347097059.issue12806@roundup.psfhosted.org> Change by David Steele : ---------- keywords: +patch pull_requests: +21210 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:43:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:43:50 +0000 Subject: [issue15686] PEP 3121, 384 Refactoring applied to md5 module In-Reply-To: <1345107394.8.0.322253629344.issue15686@psf.upfronthosting.co.za> Message-ID: <1599486230.39.0.59764609109.issue15686@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: New changeset 63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818) https://github.com/python/cpython/commit/63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:46:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:46:46 +0000 Subject: [issue15733] PEP 3121, 384 Refactoring applied to winapi module In-Reply-To: <1345455591.0.0.532625871045.issue15733@psf.upfronthosting.co.za> Message-ID: <1599486406.6.0.375461430157.issue15733@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit 2aabc3200bf03d2ec1aa987e1e20db704948111e (HEAD -> master, upstream/master) Author: Mohamed Koubaa Date: Mon Sep 7 08:12:40 2020 -0500 bpo-1635741: Port _overlapped module to multi-phase init (GH-22051) Port the _overlapped extension module to multi-phase initialization (PEP 489). ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:47:13 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 07 Sep 2020 13:47:13 +0000 Subject: [issue41735] Thread locks in zlib module may go wrong in rare case In-Reply-To: <1599448486.98.0.401518384343.issue41735@roundup.psfhosted.org> Message-ID: <1599486433.27.0.0250252894593.issue41735@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +21211 pull_request: https://github.com/python/cpython/pull/22130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:48:02 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:48:02 +0000 Subject: [issue15680] PEP 3121 refactoring applied to audioop module In-Reply-To: <1345105315.06.0.844994480517.issue15680@psf.upfronthosting.co.za> Message-ID: <1599486482.47.0.467251078536.issue15680@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit 41fbf865a35d4fb64f047f98dc24690cb0c170fd Author: Hai Shi Date: Thu Mar 12 00:49:11 2020 +0800 bpo-1635741: Port audioop extension module to multiphase initialization (PEP 489) (GH-18608) Co-authored-by: Victor Stinner ---------- nosy: +vstinner resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:49:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:49:24 +0000 Subject: [issue15706] PEP 3121, 384 Refactoring applied to sha512 module In-Reply-To: <1345151573.12.0.0841074756342.issue15706@psf.upfronthosting.co.za> Message-ID: <1599486564.49.0.101121008973.issue15706@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: New changeset 63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818) https://github.com/python/cpython/commit/63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:50:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:50:24 +0000 Subject: [issue15704] PEP 3121, 384 Refactoring applied to sha1 module In-Reply-To: <1345151034.85.0.141930979711.issue15704@psf.upfronthosting.co.za> Message-ID: <1599486624.86.0.570790815031.issue15704@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: New changeset 63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _sha1, _sha512, _md5 to multiphase init (GH-21818) https://github.com/python/cpython/commit/63f102fe079ecb5cb7b921a1cf8bce4077a9d7e2 ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:50:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:50:05 +0000 Subject: [issue15706] PEP 3121, 384 Refactoring applied to sha512 module In-Reply-To: <1345151573.12.0.0841074756342.issue15706@psf.upfronthosting.co.za> Message-ID: <1599486605.89.0.559408542769.issue15706@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:51:47 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 07 Sep 2020 13:51:47 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599486707.21.0.667074568497.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21212 pull_request: https://github.com/python/cpython/pull/22131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:52:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:52:38 +0000 Subject: [issue15681] PEP 3121 refactoring applied to binascii module In-Reply-To: <1345105612.5.0.663032219905.issue15681@psf.upfronthosting.co.za> Message-ID: <1599486758.11.0.143215461187.issue15681@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit 33e71e01e95506cf8d93fd68251fc56352bc7b39 Author: Marcel Plch Date: Wed May 22 13:51:26 2019 +0200 bpo-31862: Port binascii to PEP 489 multiphase initialization (GH-4108) ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> Port the standard library to PEP 489 multiphase initialization _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:53:26 2020 From: report at bugs.python.org (Ma Lin) Date: Mon, 07 Sep 2020 13:53:26 +0000 Subject: [issue41735] Thread locks in zlib module may go wrong in rare case In-Reply-To: <1599448486.98.0.401518384343.issue41735@roundup.psfhosted.org> Message-ID: <1599486806.67.0.528447968882.issue41735@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +21213 pull_request: https://github.com/python/cpython/pull/22132 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:53:05 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:53:05 +0000 Subject: [issue31862] Port the standard library to PEP 489 multiphase initialization In-Reply-To: <1508857736.11.0.213398074469.issue31862@psf.upfronthosting.co.za> Message-ID: <1599486785.89.0.472824240463.issue31862@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-15681 "PEP 3121 refactoring applied to binascii module" as a duplicate of this issue. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:53:52 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:53:52 +0000 Subject: [issue31862] Port the standard library to PEP 489 multiphase initialization In-Reply-To: <1508857736.11.0.213398074469.issue31862@psf.upfronthosting.co.za> Message-ID: <1599486832.62.0.400399550646.issue31862@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-1635741 "Py_Finalize() doesn't clear all Python objects at exit": many extension modules have been ported to multi-phase initialization API (PEP 489) there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:55:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:55:38 +0000 Subject: [issue31862] Port the standard library to PEP 489 multiphase initialization In-Reply-To: <1508857736.11.0.213398074469.issue31862@psf.upfronthosting.co.za> Message-ID: <1599486938.75.0.00253081542692.issue31862@roundup.psfhosted.org> STINNER Victor added the comment: I prefer to track the work in a single issue. Even if bpo-1635741 contains many unrelated changes, I prefer to continue to use bpo-1635741 to track the work on "porting the standard library to PEP 489 multiphase initialization". ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:55:42 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:55:42 +0000 Subject: [issue15681] PEP 3121 refactoring applied to binascii module In-Reply-To: <1345105612.5.0.663032219905.issue15681@psf.upfronthosting.co.za> Message-ID: <1599486942.52.0.455280223685.issue15681@roundup.psfhosted.org> Change by STINNER Victor : ---------- superseder: Port the standard library to PEP 489 multiphase initialization -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:56:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:56:18 +0000 Subject: [issue15681] PEP 3121 refactoring applied to binascii module In-Reply-To: <1345105612.5.0.663032219905.issue15681@psf.upfronthosting.co.za> Message-ID: <1599486978.8.0.706282637809.issue15681@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: fixed -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:57:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:57:59 +0000 Subject: [issue15682] PEP 3121 refactoring applied to fpectl module In-Reply-To: <1345106026.62.0.405677878091.issue15682@psf.upfronthosting.co.za> Message-ID: <1599487079.35.0.87404819094.issue15682@roundup.psfhosted.org> STINNER Victor added the comment: Module removed in Python 3.7: bpo-29137. ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix fpectl-induced ABI breakage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 09:59:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 13:59:49 +0000 Subject: [issue15684] PEP 3121 refactoring applied to fpetest module In-Reply-To: <1345106353.01.0.354070403229.issue15684@psf.upfronthosting.co.za> Message-ID: <1599487189.59.0.32088271584.issue15684@roundup.psfhosted.org> STINNER Victor added the comment: Module removed in Python 3.7: bpo-29137. ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Fix fpectl-induced ABI breakage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:01:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:01:50 +0000 Subject: [issue15662] PEP 3121 refactoring applied to locale module In-Reply-To: <1345021532.95.0.601509802957.issue15662@psf.upfronthosting.co.za> Message-ID: <1599487310.41.0.0136410897575.issue15662@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: commit a158168a787e82c4b7b18f6833153188e93627a5 Author: Hai Shi Date: Thu Mar 12 00:46:06 2020 +0800 bpo-1635741: Port _locale extension module to multiphase initialization (PEP 489) (GH-18358) Co-authored-by: Petr Viktorin ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:02:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:02:55 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599487375.8.0.204888978294.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: I closed the following issues as duplicates of this issue: * bpo-15686: "PEP 3121, 384 Refactoring applied to md5 module" * bpo-15733: "PEP 3121, 384 Refactoring applied to winapi module" * bpo-15680: "PEP 3121 refactoring applied to audioop module" * bpo-15706: "PEP 3121, 384 Refactoring applied to sha512 module" * bpo-15704: "PEP 3121, 384 Refactoring applied to sha1 module" * bpo-15681: "PEP 3121 refactoring applied to binascii module" * bpo-15662: "PEP 3121 refactoring applied to locale module" and also: bpo-31862: "Port the standard library to PEP 489 multiphase initialization" (binascii). I also marked bpo-15682 "PEP 3121 refactoring applied to fpectl module" and bpo-15684 "PEP 3121 refactoring applied to fpetest module" as duplicates of bpo-29137: the fpectl module was removed in Python 3.7. Note: _sha256 module is not ported yet (bpo-15705). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:10:10 2020 From: report at bugs.python.org (David Steele) Date: Mon, 07 Sep 2020 14:10:10 +0000 Subject: [issue12806] argparse: Hybrid help text formatter In-Reply-To: <1313973978.37.0.422477813424.issue12806@psf.upfronthosting.co.za> Message-ID: <1599487810.45.0.35665459935.issue12806@roundup.psfhosted.org> David Steele added the comment: I've submitted FlexiHelpFormatter as PR22129. This adds the FlexiHelpFormatter class to argparse. It supports wrapping text, while preserving paragraphs. Bullet lists are supported. There are a number of differences, relative to the latest patch in the issue report: - single line feeds in a paragraph are allowed - the code is refactored to avoid duplication - test failure fixes (mostly whitespace) - Tests and documentation are included. >>> parser = argparse.ArgumentParser( ... prog='PROG', ... formatter_class=argparse.FlexiHelpFormatter, ... description=""" ... The FlexiHelpFormatter will wrap text within paragraphs ... when required to in order to make the text fit. ... ... Paragraphs are preserved. ... ... It also supports bulleted lists in a number of formats: ... * stars ... 1. numbers ... - ... and so on ... """) >>> parser.add_argument( ... "argument", ... help=""" ... Argument help text also supports flexible formatting, ... with word wrap: ... * See? ... """) >>> parser.print_help() usage: PROG [-h] option The FlexiHelpFormatter will wrap text within paragraphs when required to in order to make the text fit. Paragraphs are preserved. It also supports bulleted lists in a number of formats: * stars 1. numbers - ... and so on positional arguments: argument Argument help text also supports flexible formatting, with word wrap: * See? optional arguments: -h, --help show this help message and exit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:13:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:13:38 +0000 Subject: [issue41736] test_site: test_s_option() failed on AMD64 Windows8.1 Refleaks 3.7 Message-ID: <1599488018.49.0.898281203833.issue41736@roundup.psfhosted.org> New submission from STINNER Victor : It's not the first time that I see this error, but it looks random: * 2009-11-08: bpo-7283: "test_site failure when .local/lib/pythonX.Y/site-packages hasn't been created yet": x86-64 Ubuntu 14.04 ICC Debug 3.5, AppVeyor (Windows) * 2017-11-20: bpo-32091: "test_s_option() of test_site.HelperFunctionsTests failed on x86 Gentoo Refleaks 3.6" * 2018-07-21: bpo-34177: "test_site fails in macOS-PR VSTS builds for 3.7 branch" * 2019-09-16: bpo-38184: "test_site: test_s_option() failed on AMD64 Fedora Rawhide Refleaks 2.7 and AMD64 Fedora Stable Refleaks 3.7" * etc. Usually, I close the issue since it only occurs once and then hides for 1 year... --- AMD64 Windows8.1 Refleaks 3.7: https://buildbot.python.org/all/#/builders/63/builds/21 0:50:59 load avg: 4.70 [345/416/1] test_site failed -- running: test_multiprocessing_spawn (9 min 23 sec), test_importlib (1 min 11 sec) beginning 6 repetitions 123456 .test test_site failed -- Traceback (most recent call last): File "D:\buildarea\3.7.ware-win81-release.refleak\build\lib\test\test_site.py", line 205, in test_s_option self.assertIn(usersite, sys.path) AssertionError: 'C:\\Users\\buildworker\\AppData\\Roaming\\Python\\Python37\\site-packages' not found in ['D:\\buildarea\\3.7.ware-win81-release.refleak\\build', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\PCbuild\\amd64\\python37_d.zip', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\DLLs', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\lib', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\PCbuild\\amd64', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\lib\\site-packages'] (...) 1:10:20 load avg: 0.08 Re-running test_site in verbose mode beginning 6 repetitions 123456 ...... beginning 6 repetitions 123456 test__getuserbase (test.test_site.HelperFunctionsTests) ... ok (...) test_no_home_directory (test.test_site.HelperFunctionsTests) ... ok test_s_option (test.test_site.HelperFunctionsTests) ... FAIL test_abs_paths (test.test_site.ImportSideEffectTests) ... ok (...) test_underpth_nosite_file (test.test_site._pthFileTests) ... ok ====================================================================== FAIL: test_s_option (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.7.ware-win81-release.refleak\build\lib\test\test_site.py", line 205, in test_s_option self.assertIn(usersite, sys.path) AssertionError: 'C:\\Users\\buildworker\\AppData\\Roaming\\Python\\Python37\\site-packages' not found in ['D:\\buildarea\\3.7.ware-win81-release.refleak\\build', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\PCbuild\\amd64\\python37_d.zip', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\DLLs', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\lib', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\PCbuild\\amd64', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build', 'D:\\buildarea\\3.7.ware-win81-release.refleak\\build\\lib\\site-packages'] ---------------------------------------------------------------------- Ran 30 tests in 1.172s (...) ---------- components: Tests messages: 376496 nosy: corona10, pablogsal, vstinner priority: normal severity: normal status: open title: test_site: test_s_option() failed on AMD64 Windows8.1 Refleaks 3.7 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:16:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:16:31 +0000 Subject: [issue41401] Using non-ascii that require UTF-8 breaks AIX testing In-Reply-To: <1595772423.92.0.81107313537.issue41401@roundup.psfhosted.org> Message-ID: <1599488191.56.0.859450836403.issue41401@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 3.0 -> 4.0 pull_requests: +21215 pull_request: https://github.com/python/cpython/pull/22133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:17:28 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:17:28 +0000 Subject: [issue41401] Using non-ascii that require UTF-8 breaks AIX testing In-Reply-To: <1595772423.92.0.81107313537.issue41401@roundup.psfhosted.org> Message-ID: <1599488248.63.0.593228910756.issue41401@roundup.psfhosted.org> STINNER Victor added the comment: > Automatic backport does not work due to changes in the test.support module. Victor, do you mind to backport PR 21640 to 3.9 and 3.8? Why don't you want to do backport yourself? It's a trivial change, it only changes a single line. Anyway, I created PR 22133. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:30:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:30:08 +0000 Subject: [issue41713] _signal module leak: test_interpreters leaked [1424, 1422, 1424] references In-Reply-To: <1599213221.63.0.522110671593.issue41713@roundup.psfhosted.org> Message-ID: <1599489008.95.0.646295792171.issue41713@roundup.psfhosted.org> STINNER Victor added the comment: See also: * bpo-40600: "Add an option to disallow creating more than one instance of a module". * bpo-40288: [subinterpreters] atexit module should not be loaded more than once per interpreter ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:46:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:46:13 +0000 Subject: [issue41401] Using non-ascii that require UTF-8 breaks AIX testing In-Reply-To: <1595772423.92.0.81107313537.issue41401@roundup.psfhosted.org> Message-ID: <1599489973.44.0.536185454696.issue41401@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c73ee5acc96b4bbd6885156883b224b8cc3e470c by Victor Stinner in branch '3.9': bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133) https://github.com/python/cpython/commit/c73ee5acc96b4bbd6885156883b224b8cc3e470c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:46:28 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 07 Sep 2020 14:46:28 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599489988.84.0.686581647762.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21216 pull_request: https://github.com/python/cpython/pull/22134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 10:47:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 14:47:10 +0000 Subject: [issue41401] Using non-ascii that require UTF-8 breaks AIX testing In-Reply-To: <1595772423.92.0.81107313537.issue41401@roundup.psfhosted.org> Message-ID: <1599490030.85.0.927466214552.issue41401@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21217 pull_request: https://github.com/python/cpython/pull/22135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:14:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:14:35 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599491675.82.0.586683822298.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1baf030a902392fe92d934ed0fb6a385cf7d8869 by Mohamed Koubaa in branch 'master': bpo-1635741 port _curses_panel to multi-phase init (PEP 489) (GH-21986) https://github.com/python/cpython/commit/1baf030a902392fe92d934ed0fb6a385cf7d8869 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:27:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:27:25 +0000 Subject: [issue41401] Using non-ascii that require UTF-8 breaks AIX testing In-Reply-To: <1595772423.92.0.81107313537.issue41401@roundup.psfhosted.org> Message-ID: <1599492445.07.0.043213445378.issue41401@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 84105cbaa395923e3584a87d67ccce72c8420bb4 by Victor Stinner in branch '3.8': bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133) (GH-22135) https://github.com/python/cpython/commit/84105cbaa395923e3584a87d67ccce72c8420bb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:28:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:28:45 +0000 Subject: [issue41401] Using non-ascii that require UTF-8 breaks AIX testing In-Reply-To: <1595772423.92.0.81107313537.issue41401@roundup.psfhosted.org> Message-ID: <1599492525.69.0.323996104234.issue41401@roundup.psfhosted.org> STINNER Victor added the comment: It should now be fixed. Thanks. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:31:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:31:11 +0000 Subject: [issue41477] test_genericalias fails if ctypes is missing In-Reply-To: <1596553540.81.0.229958329134.issue41477@roundup.psfhosted.org> Message-ID: <1599492671.74.0.0563175407522.issue41477@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:33:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:33:03 +0000 Subject: [issue41473] test_gdb fails on AMD64 Fedora Rawhide 3.x [gdb 9.2 bug] In-Reply-To: <1596550767.43.0.215651378336.issue41473@roundup.psfhosted.org> Message-ID: <1599492783.22.0.544086264439.issue41473@roundup.psfhosted.org> STINNER Victor added the comment: https://bugzilla.redhat.com/show_bug.cgi?id=1866884 "AArch64: sometimes, gdb fails to load symbols of a dynamic library with a pending breakpoint": gdb bug has been confirmed. ---------- title: test_gdb fails on AMD64 Fedora Rawhide 3.x -> test_gdb fails on AMD64 Fedora Rawhide 3.x [gdb 9.2 bug] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:23:41 2020 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 07 Sep 2020 15:23:41 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599492221.78.0.290755330534.issue41561@roundup.psfhosted.org> Skip Montanaro added the comment: Has any progress been made on the Ubuntu 20.04 test_ssl failures? Is there any consensus about it being a Python or Ubuntu problem? ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:36:37 2020 From: report at bugs.python.org (Danny Lin) Date: Mon, 07 Sep 2020 15:36:37 +0000 Subject: [issue41737] Improper NotADirectoryError when opening a file under a fake directory Message-ID: <1599492997.14.0.974001441191.issue41737@roundup.psfhosted.org> New submission from Danny Lin : On Linux (tested on Ubuntu 16.04), if "/path/to/file" is an existing file, the code: open('/path/to/file/somename.txt') raises NotADirectoryError: [Errno 20] Not a directory: '/path/to/file/somename.txt' On Windows, similar code: open(r'C:\path\to\file\somename.txt') raises FileNotFoundError: [Errno 2] No such file or directory: 'C:\\path\\chrome\\to\\file\\somename.txt' I think the behavior on Linux is not correct. The user probably cares about the existence of the file to be opened, rather than whether its ancestor directories are valid. OTOH, if NotADirectoryError should be raised, it should mention '/path/to/file' rather then '/path/to/file/somename.txt'. But what if '/path/to' or '/path' is actually a file? Should it be '/path/to' or '/path' instead for the same reason? ---------- messages: 376505 nosy: danny87105 priority: normal severity: normal status: open title: Improper NotADirectoryError when opening a file under a fake directory type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:37:14 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:37:14 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1599493034.93.0.190137246659.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: Some related changes in modules: posix, _hashopenssl, _ast (Python-ast.c), zlib, _struct, tkinter, _curses_panel. commit b3966639d28313809774ca3859a347b9007be8d2 Author: Eddie Elizondo Date: Tue Nov 5 07:16:14 2019 -0800 bpo-35381 Remove all static state from posixmodule (GH-15892) After #9665, this moves the remaining types in posixmodule to be heap-allocated to make it compatible with PEP384 as well as modifying all the type accessors to fully make the type opaque. The original PR that got messed up a rebase: https://github.com/python/cpython/pull/10854. All the issues in that commit have now been addressed since https://github.com/python/cpython/pull/11661 got committed. This change also removes any state from the data segment and onto the module state itself. https://bugs.python.org/issue35381 Automerge-Triggered-By: @encukou commit df69e75edcc08475bc9a57a5a76df8a45bfc3c34 Author: Christian Heimes Date: Wed Sep 25 23:03:30 2019 +0200 bpo-38142: Updated _hashopenssl.c to be PEP 384 compliant (#16071) * Updated _hashopenssl.c to be PEP 384 compliant * Remove refleak test from test_hashlib. The updated type no longer accepts random arguments to __init__. commit ac46eb4ad6662cf6d771b20d8963658b2186c48c Author: Dino Viehland Date: Wed Sep 11 10:16:34 2019 -0700 bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957) Summary: This mostly migrates Python-ast.c to PEP384 and removes all statics from the whole file. This modifies the generator itself that generates the Python-ast.c. It leaves in the usage of _PyObject_LookupAttr even though it's not fully PEP384 compatible (this could always be shimmed in by anyone who needs it). commit a1ffad07195b8b976f8c371a92028240946d4e76 Author: Dino Viehland Date: Tue Sep 10 11:27:03 2019 +0100 bpo-38074: Make zlib extension module PEP-384 compatible (GH-15792) Updated zlibmodule.c to be PEP 384 compliant. commit 4f384af067d05b16a554bfd976934fca9f87a1cf Author: Dino Viehland Date: Tue Sep 10 11:18:37 2019 +0100 bpo-38076: Make struct module PEP-384 compatible (#15805) * PEP-384 _struct * More PEP-384 fixes for _struct Summary: Add a couple of more fixes for `_struct` that were previously missed such as removing `tp_*` accessors and using `PyBytesWriter` instead of calling `PyBytes_FromStringAndSize` with `NULL`. Also added a test to confirm that `iter_unpack` type is still uninstantiable. * ?? Added by blurb_it. commit d2217a83d4e2ee9aec1a0bf590820aa77b7ed5e7 Author: Andrew Svetlov Date: Tue Oct 30 22:49:16 2012 +0200 Issue #15721: apply PEP 384 Refactoring to tkinter module. commit bc07cb883e5c03b8c108c2c9d86bc0a158d62c27 Author: Martin v. L?wis Date: Thu Jun 14 16:01:23 2012 +0200 Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API. Patch by Robin Schreiber. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:38:07 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 07 Sep 2020 15:38:07 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1599493087.49.0.596105147505.issue6721@roundup.psfhosted.org> Change by mohamed koubaa : ---------- nosy: +koubaa nosy_count: 27.0 -> 28.0 pull_requests: +21218 pull_request: https://github.com/python/cpython/pull/21986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:38:07 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 07 Sep 2020 15:38:07 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1599493087.73.0.825735903965.issue36533@roundup.psfhosted.org> Change by mohamed koubaa : ---------- nosy: +koubaa nosy_count: 7.0 -> 8.0 pull_requests: +21219 pull_request: https://github.com/python/cpython/pull/21986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:38:07 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 07 Sep 2020 15:38:07 +0000 Subject: [issue33802] Regression in logging configuration In-Reply-To: <1528412435.4.0.592728768989.issue33802@psf.upfronthosting.co.za> Message-ID: <1599493087.81.0.108077492125.issue33802@roundup.psfhosted.org> Change by mohamed koubaa : ---------- nosy: +koubaa nosy_count: 7.0 -> 8.0 pull_requests: +21220 pull_request: https://github.com/python/cpython/pull/21986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:40:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:40:09 +0000 Subject: [issue41111] Convert a few stdlib extensions to the limited C API In-Reply-To: <1593075260.88.0.835474638855.issue41111@roundup.psfhosted.org> Message-ID: <1599493209.35.0.513228732883.issue41111@roundup.psfhosted.org> STINNER Victor added the comment: > See also bpo-40077: "Convert static types to PyType_FromSpec()". In bpo-1635741, many extension modules have been ported to the multi-phase initilization API (PEP 489), and many static types have been converted to heap types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:45:21 2020 From: report at bugs.python.org (Danny Lin) Date: Mon, 07 Sep 2020 15:45:21 +0000 Subject: [issue41738] MIME type for *.zip becomes application/x-zip-compressed on Windows Message-ID: <1599493521.86.0.992768213147.issue41738@roundup.psfhosted.org> New submission from Danny Lin : On Windows, command "python -m mimetypes foo.zip" outputs "type: application/x-zip-compressed encoding: None", while it's "type: application/zip encoding: None" on Linux. According to the mimetype.py in CPython source code, the MIME type for '.zip' is 'application/zip'. It seems to be overwritten somewhere on Windows. ---------- components: Windows messages: 376508 nosy: danny87105, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: MIME type for *.zip becomes application/x-zip-compressed on Windows type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:46:06 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:46:06 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Message-ID: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> New submission from STINNER Victor : s390x RHEL8 LTO + PGO 3.x: https://buildbot.python.org/all/#/builders/442/builds/399 0:01:43 load avg: 4.23 [229/423/1] test_logging failed (env changed) -- running: test_concurrent_futures (48.1 sec) Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Warning -- Dangling thread: Warning -- Dangling thread: <_MainThread(MainThread, started 4395867015984)> ---------- components: Tests messages: 376509 nosy: vstinner priority: normal severity: normal status: open title: test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:47:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 15:47:51 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) In-Reply-To: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> Message-ID: <1599493671.65.0.829699651825.issue41739@roundup.psfhosted.org> STINNER Victor added the comment: Same isuse on s390x RHEL7 LTO + PGO 3.x: https://buildbot.python.org/all/#/builders/244/builds/45 Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Warning -- Dangling thread: <_MainThread(MainThread, started 4396860012288)> Warning -- Dangling thread: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:50:03 2020 From: report at bugs.python.org (hai shi) Date: Mon, 07 Sep 2020 15:50:03 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) In-Reply-To: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> Message-ID: <1599493803.03.0.649169249313.issue41739@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:55:35 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Sep 2020 15:55:35 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ In-Reply-To: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> Message-ID: <1599494135.08.0.135452363309.issue41720@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +21221 pull_request: https://github.com/python/cpython/pull/22137 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:55:42 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Sep 2020 15:55:42 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ In-Reply-To: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> Message-ID: <1599494142.22.0.769219994311.issue41720@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21222 pull_request: https://github.com/python/cpython/pull/22138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 11:55:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Sep 2020 15:55:29 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ In-Reply-To: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> Message-ID: <1599494129.77.0.588779844148.issue41720@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset fd4cafd4700dc03cb05fc2e5263c2666d785d6e3 by Serhiy Storchaka in branch 'master': bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092) https://github.com/python/cpython/commit/fd4cafd4700dc03cb05fc2e5263c2666d785d6e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:25:54 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Sep 2020 16:25:54 +0000 Subject: [issue39610] memoryview.__len__ should raise an exception for 0d buffers In-Reply-To: <1581435772.39.0.91175671687.issue39610@roundup.psfhosted.org> Message-ID: <1599495954.7.0.328687030291.issue39610@roundup.psfhosted.org> Serhiy Storchaka added the comment: But iterating it raises different type of exception, wish obscure message. >>> import ctypes >>> mem_0d = memoryview(ctypes.c_uint8(42)) >>> list(mem_0d) Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format B' and just 'B'? Would not adding support of formats with specified endianess make 0-dimensional memoryview objects iterable? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:28:08 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Sep 2020 16:28:08 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ In-Reply-To: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> Message-ID: <1599496088.22.0.265084898025.issue41720@roundup.psfhosted.org> miss-islington added the comment: New changeset ebef6c0b50d94ca7daef6fdb38d043e0183ab7d1 by Miss Islington (bot) in branch '3.8': bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092) https://github.com/python/cpython/commit/ebef6c0b50d94ca7daef6fdb38d043e0183ab7d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:30:25 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Sep 2020 16:30:25 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ In-Reply-To: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> Message-ID: <1599496225.26.0.320443481088.issue41720@roundup.psfhosted.org> miss-islington added the comment: New changeset 1671b0e4e00061f23b6677e37e27a4ed44998329 by Miss Islington (bot) in branch '3.9': bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092) https://github.com/python/cpython/commit/1671b0e4e00061f23b6677e37e27a4ed44998329 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:35:37 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 07 Sep 2020 16:35:37 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599496537.02.0.485800633775.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21223 pull_request: https://github.com/python/cpython/pull/22139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:46:40 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Sep 2020 16:46:40 +0000 Subject: [issue41316] tarfile: Do not write full path in FNAME field In-Reply-To: <1594924643.04.0.7239005729.issue41316@roundup.psfhosted.org> Message-ID: <1599497200.55.0.104961890646.issue41316@roundup.psfhosted.org> miss-islington added the comment: New changeset 22748a83d927d3da1beaed771be30887c42b2500 by Artem Bulgakov in branch 'master': bpo-41316: Make tarfile follow specs for FNAME (GH-21511) https://github.com/python/cpython/commit/22748a83d927d3da1beaed771be30887c42b2500 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:46:48 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Sep 2020 16:46:48 +0000 Subject: [issue41316] tarfile: Do not write full path in FNAME field In-Reply-To: <1594924643.04.0.7239005729.issue41316@roundup.psfhosted.org> Message-ID: <1599497208.63.0.710420574955.issue41316@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21224 pull_request: https://github.com/python/cpython/pull/22140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:46:57 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 07 Sep 2020 16:46:57 +0000 Subject: [issue41316] tarfile: Do not write full path in FNAME field In-Reply-To: <1594924643.04.0.7239005729.issue41316@roundup.psfhosted.org> Message-ID: <1599497217.46.0.754927052107.issue41316@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21225 pull_request: https://github.com/python/cpython/pull/22141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 12:50:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Sep 2020 16:50:31 +0000 Subject: [issue41720] Missed "return NotImplemented" in Vec2D.__rmul__ In-Reply-To: <1599241313.26.0.364304470035.issue41720@roundup.psfhosted.org> Message-ID: <1599497431.38.0.889570649786.issue41720@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 13:01:17 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Sep 2020 17:01:17 +0000 Subject: [issue41734] Refactor b32{encode,decode} tests In-Reply-To: <1599419707.5.0.662940988901.issue41734@roundup.psfhosted.org> Message-ID: <1599498077.3.0.195076499491.issue41734@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think this change is not needed. The current code is shorter and works pretty well. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 13:12:13 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Sep 2020 17:12:13 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599498733.24.0.583903897239.issue38762@roundup.psfhosted.org> Serhiy Storchaka added the comment: So this will make logging depending on the multiprocess module? Even if you do not use multiprocessing it will be imported in any case when you use logging. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 13:17:49 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 07 Sep 2020 17:17:49 +0000 Subject: [issue39610] memoryview.__len__ should raise an exception for 0d buffers In-Reply-To: <1581435772.39.0.91175671687.issue39610@roundup.psfhosted.org> Message-ID: <1599499069.82.0.51852254334.issue39610@roundup.psfhosted.org> Stefan Krah added the comment: memoryview can store anything, but only access and display the native format. The reason is that conversions in the manner of the struct module are very expensive. You can construct all sorts of formats that memoryview cannot handle: >>> x = array(1, "c") >>> x array(b'1', dtype='|S1') >>> y = memoryview(x) >>> >>> list(y) Traceback (most recent call last): File "", line 1, in NotImplementedError: memoryview: unsupported format 1s I don't think that the message is obscure, since all these facts are documented. ---------- assignee: -> skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 13:22:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Sep 2020 17:22:29 +0000 Subject: [issue39610] memoryview.__len__ should raise an exception for 0d buffers In-Reply-To: <1581435772.39.0.91175671687.issue39610@roundup.psfhosted.org> Message-ID: <1599499349.49.0.157445756727.issue39610@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is surprising the endianess of byte matters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 13:25:22 2020 From: report at bugs.python.org (Stefan Krah) Date: Mon, 07 Sep 2020 17:25:22 +0000 Subject: [issue39610] memoryview.__len__ should raise an exception for 0d buffers In-Reply-To: <1581435772.39.0.91175671687.issue39610@roundup.psfhosted.org> Message-ID: <1599499522.32.0.105617679614.issue39610@roundup.psfhosted.org> Stefan Krah added the comment: list() has to *interpret* the endianness to display it. The endianness of the *native* format does not matter. The endianness of an explicit format matters, since list has to be able to convert non-native formats. I suggest to look at XND, which is a memoryview on steroids and has a lot of those features. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 13:29:44 2020 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 07 Sep 2020 17:29:44 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599499784.57.0.933246648745.issue41561@roundup.psfhosted.org> Skip Montanaro added the comment: This skips the breaking tests (but doesn't actually fix anything). ---------- keywords: +patch versions: +Python 3.10 -Python 3.8 Added file: https://bugs.python.org/file49450/test_ssl_ubuntu.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 13:42:21 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 07 Sep 2020 17:42:21 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599500541.61.0.791963173624.issue38762@roundup.psfhosted.org> Irit Katriel added the comment: As the PR currently is, it will, unless you turn this off by setting logging.logMultiprocessing=False. The other alternative we are discussing is: revert back to not importing multiprocessing if it's not there. If it's there we use it, but if it's not we set processName to something like f"pid={os.getpid()}" instead of "MainThread". (1) os is already imported in logging. (2) In most cases where multiprocessing is not imported it's because there is only one process, so processName will not likely be used as all. (3) In the edge case of shutdown or someone clearing sys.modules the processName will not be pretty, but it will at least be correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 14:24:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 07 Sep 2020 18:24:48 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599503088.25.0.634335778769.issue38762@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +21226 pull_request: https://github.com/python/cpython/pull/22142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 14:25:49 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 07 Sep 2020 18:25:49 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599503149.17.0.549466155794.issue38762@roundup.psfhosted.org> Irit Katriel added the comment: I just pushed a second PR with the alternative solution - it calculates the name on a best-effort basis, and doesn't import anything that's not already there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 15:07:03 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 07 Sep 2020 19:07:03 +0000 Subject: [issue40600] Add option to disallow > 1 instance of an extension module In-Reply-To: <1589235149.46.0.0630975096351.issue40600@roundup.psfhosted.org> Message-ID: <1599505623.9.0.597985807538.issue40600@roundup.psfhosted.org> mohamed koubaa added the comment: What about a new PyModuleDef_Slot function? ``` static int my_can_create(/*need any arg??, InterpreterState, etc?*/) { if (test_global_condition()) { return -1; //Don't allow creation } return 0; //Allow creation }; static PyModuleDef_Slot signal_slots[] = { {Py_mod_exec, my_exec}, {Py_mod_can_create, my_can_create}, {0,0} }; ``` ---------- nosy: +koubaa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 15:20:04 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 07 Sep 2020 19:20:04 +0000 Subject: [issue33337] Provide a supported Concrete Syntax Tree implementation in the standard library In-Reply-To: <1524445447.99.0.682650639539.issue33337@psf.upfronthosting.co.za> Message-ID: <1599506404.07.0.782156597663.issue33337@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 15:20:50 2020 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Sep 2020 19:20:50 +0000 Subject: [issue41639] Unpickling derived class of list does not call __init__() In-Reply-To: <1598424659.93.0.553984904692.issue41639@roundup.psfhosted.org> Message-ID: <1599506450.8.0.492845589861.issue41639@roundup.psfhosted.org> Andy Maier added the comment: Thanks for the clarification. Just for the record: I have implemented __setstate__() such that it completely restores the state from just the inherited list state. That makes it independent of whether __init__() or __new__() is called: def __getstate__(self): state = self.__dict__.copy() del state['_lc_list'] return state def __setstate__(self, state): self.__dict__.update(state) self._lc_list = _lc_list(self) This issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 15:21:29 2020 From: report at bugs.python.org (Phillip M. Feldman) Date: Mon, 07 Sep 2020 19:21:29 +0000 Subject: [issue41740] string concatenation via `sum` Message-ID: <1599506489.43.0.159938522754.issue41740@roundup.psfhosted.org> New submission from Phillip M. Feldman : I'm not sure whether this is a bug or a feature request, but it seems as though the following should produce the same result: In [1]: 'a' + 'b' + 'c' Out[1]: 'abc' In [2]: sum(('a', 'b', 'c')) TypeError Traceback (most recent call last) in ----> 1 sum(('a', 'b', 'c')) TypeError: unsupported operand type(s) for +: 'int' and 'str' The error message is confusing (there is no integer). ---------- components: Interpreter Core messages: 376526 nosy: Phillip.M.Feldman at gmail.com priority: normal severity: normal status: open title: string concatenation via `sum` type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 15:21:49 2020 From: report at bugs.python.org (Andy Maier) Date: Mon, 07 Sep 2020 19:21:49 +0000 Subject: [issue41639] Unpickling derived class of list does not call __init__() In-Reply-To: <1598424659.93.0.553984904692.issue41639@roundup.psfhosted.org> Message-ID: <1599506509.95.0.807156887024.issue41639@roundup.psfhosted.org> Andy Maier added the comment: And just to be complete: That did not require implementing __reduce__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 15:37:20 2020 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Mon, 07 Sep 2020 19:37:20 +0000 Subject: [issue41734] Refactor b32{encode,decode} tests In-Reply-To: <1599419707.5.0.662940988901.issue41734@roundup.psfhosted.org> Message-ID: <1599507440.58.0.76168796304.issue41734@roundup.psfhosted.org> Filipe La?ns added the comment: Yes, it is not needed, but it does provide a fair bit of enhancement. Using subtests makes more clear what failed when something fails. I am a bit confused, in PR 20441 I first just copied the current b32{encode,decode} tests but was given feedback which resulted in the proposed tests, but now I am being told the opposite, that the tests are better as they currently are. Anyway, this is not my call, let me know if something changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:14:39 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 07 Sep 2020 21:14:39 +0000 Subject: [issue41737] Improper NotADirectoryError when opening a file under a fake directory In-Reply-To: <1599492997.14.0.974001441191.issue41737@roundup.psfhosted.org> Message-ID: <1599513279.51.0.852089878271.issue41737@roundup.psfhosted.org> Eryk Sun added the comment: > if NotADirectoryError should be raised, it should mention '/path/to/file' > rather then '/path/to/file/somename.txt'. POSIX specifies that C open() should set errno to ENOTDIR when an existing path prefix component is neither a directory nor a symlink to a directory [1]. What you propose isn't possible to implement reliably unless the filesystem is locked or readonly, so it should be handled by the application instead of by the system or standard libraries. > FileNotFoundError: [Errno 2] No such file or directory: > 'C:\\path\\chrome\\to\\file\\somename.txt' Windows specifies that this case should fail as follows: "[i]f Link.File.FileType is not DirectoryFile, the operation MUST be failed with STATUS_OBJECT_PATH_NOT_FOUND" [2] (see Phase 6 in the linked pseudocode). The Windows API maps this status code to ERROR_PATH_NOT_FOUND (3), which is distinct from ERROR_FILE_NOT_FOUND (2). However, the C runtime maps both of these system error codes to POSIX ENOENT. All isn't lost, however, because it also saves the OS error in _doserrno. io.FileIO could preset _doserrno to 0, and if it's non-zero after calling _wopen, use its value with PyErr_SetExcFromWindowsErrWithFilenameObject instead of calling PyErr_SetFromErrnoWithFilenameObject. --- [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html [2] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fsa/8ada5fbe-db4e-49fd-aef6-20d54b748e40 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:27:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Sep 2020 21:27:02 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 In-Reply-To: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> Message-ID: <1599514022.98.0.869116117014.issue40744@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 207c321f13cea3fee7f378057864e8c6453f5adf by Erlend Egeberg Aasland in branch 'master': bpo-40744: Drop support for SQLite pre 3.7.3 (GH-20909) https://github.com/python/cpython/commit/207c321f13cea3fee7f378057864e8c6453f5adf ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:27:57 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Sep 2020 21:27:57 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 In-Reply-To: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> Message-ID: <1599514077.85.0.604255842248.issue40744@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Given the status of the 3.9 branch and given that this does not add anything new or fixes any specific bug, I would recommend to not backport this ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:29:10 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Sep 2020 21:29:10 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 In-Reply-To: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> Message-ID: <1599514150.52.0.696373230285.issue40744@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Feel free to re-open if i missed something :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:29:14 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 07 Sep 2020 21:29:14 +0000 Subject: [issue40744] Explicitly drop support for SQLite version < 3.7.3 In-Reply-To: <1590252054.91.0.549618457347.issue40744@roundup.psfhosted.org> Message-ID: <1599514154.0.0.644218183028.issue40744@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:33:49 2020 From: report at bugs.python.org (Marco Paolini) Date: Mon, 07 Sep 2020 21:33:49 +0000 Subject: [issue41740] string concatenation via `sum` In-Reply-To: <1599506489.43.0.159938522754.issue41740@roundup.psfhosted.org> Message-ID: <1599514429.02.0.429273178768.issue41740@roundup.psfhosted.org> Marco Paolini added the comment: This happens because the default value for the start argument is zero , hence the first operation is `0 + 'a'` ---------- nosy: +mpaolini _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:49:37 2020 From: report at bugs.python.org (Marco Paolini) Date: Mon, 07 Sep 2020 21:49:37 +0000 Subject: [issue41740] string concatenation via `sum` In-Reply-To: <1599506489.43.0.159938522754.issue41740@roundup.psfhosted.org> Message-ID: <1599515377.55.0.33688060043.issue41740@roundup.psfhosted.org> Marco Paolini added the comment: also worth noting, the start argument is type checked instead. Maybe we could apply the same checks to the items of the iterable? python3 -c "print(sum(('a', 'b', 'c'), start='d'))" Traceback (most recent call last): File "", line 1, in TypeError: sum() can't sum strings [use ''.join(seq) instead] see https://github.com/python/cpython/blob/c96d00e88ead8f99bb6aa1357928ac4545d9287c/Python/bltinmodule.c#L2310 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 17:50:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Sep 2020 21:50:53 +0000 Subject: [issue41741] test_peg_generator timed out (25 min) on x86 Gentoo Non-Debug with X 3.9 Message-ID: <1599515453.81.0.896157572076.issue41741@roundup.psfhosted.org> New submission from STINNER Victor : On the slow x86 Gentoo Non-Debug with X 3.9 buildbot, test_peg_generator timed out after 25 min, twice. https://buildbot.python.org/all/#/builders/51/builds/24 Either, we increase the buildbot timeouts, test_peg_parser is made faster, or the test is splitted into multiple test files. This buildbot worker is slow, so it sounds like a good idea to increase timeouts. 0:00:00 load avg: 4.79 Run tests in parallel using 2 child processes (timeout: 25 min, worker timeout: 30 min) (...) 0:46:55 load avg: 6.60 [263/425/1] test_peg_generator crashed (Exit code 1) -- running: test_lib2to3 (5 min 20 sec) Timeout (0:25:00)! Thread 0xb7bcd700 (most recent call first): File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/subprocess.py", line 1873 in _try_wait File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/subprocess.py", line 1915 in _wait File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/subprocess.py", line 1185 in wait File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/spawn.py", line 76 in spawn File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/ccompiler.py", line 910 in spawn File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/unixccompiler.py", line 117 in _compile File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/ccompiler.py", line 574 in compile File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 529 in build_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 474 in _build_extensions_serial File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 449 in build_extensions File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 340 in run File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Tools/peg_generator/pegen/build.py", line 91 in compile_c_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Tools/peg_generator/pegen/testutil.py", line 104 in generate_parser_c_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py", line 80 in build_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py", line 83 in run_test File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py", line 446 in test_soft_keywords_lookahead (...) 1:09:00 load avg: 6.25 Re-running test_peg_generator in verbose mode (...) 10 slowest tests: - test_tokenize: 7 min 54 sec - test_unparse: 7 min 16 sec - test_concurrent_futures: 6 min 44 sec - test_lib2to3: 5 min 42 sec - test_multiprocessing_spawn: 5 min 15 sec - test_asyncio: 5 min 10 sec - test_regrtest: 2 min 53 sec - test_multiprocessing_forkserver: 2 min 38 sec - test_unicodedata: 2 min 32 sec - test_capi: 2 min 27 sec 1 test failed: test_peg_generator (...) test_syntax_error_for_string (test.test_peg_generator.test_c_parser.TestCParser) ... ok test_ternary_operator (test.test_peg_generator.test_c_parser.TestCParser) ... ok test_with_stmt_with_paren (test.test_peg_generator.test_c_parser.TestCParser) ... Timeout (0:25:00)! Thread 0xb7bec700 (most recent call first): File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/subprocess.py", line 1873 in _try_wait File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/subprocess.py", line 1915 in _wait File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/subprocess.py", line 1185 in wait File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/spawn.py", line 76 in spawn File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/ccompiler.py", line 910 in spawn File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/unixccompiler.py", line 117 in _compile File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/ccompiler.py", line 574 in compile File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 529 in build_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 474 in _build_extensions_serial File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 449 in build_extensions File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/distutils/command/build_ext.py", line 340 in run File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Tools/peg_generator/pegen/build.py", line 91 in compile_c_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Tools/peg_generator/pegen/testutil.py", line 104 in generate_parser_c_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py", line 80 in build_extension File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py", line 83 in run_test File "/buildbot/buildarea/cpython/3.9.ware-gentoo-x86.nondebug/build/Lib/test/test_peg_generator/test_c_parser.py", line 343 in test_with_stmt_with_paren ... ---------- components: Tests messages: 376535 nosy: pablogsal, vstinner, zach.ware priority: normal severity: normal status: open title: test_peg_generator timed out (25 min) on x86 Gentoo Non-Debug with X 3.9 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 18:16:23 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 07 Sep 2020 22:16:23 +0000 Subject: [issue41740] Improve error message for string concatenation via `sum` In-Reply-To: <1599506489.43.0.159938522754.issue41740@roundup.psfhosted.org> Message-ID: <1599516983.75.0.295746236329.issue41740@roundup.psfhosted.org> Steven D'Aprano added the comment: As Marco says, the exception message is because the default value for start is 0, and you can't concatenate strings to the integer 0. You get the same error if you try to concatenate lists: py> sum([[], []]) TypeError: unsupported operand type(s) for +: 'int' and 'list' However, even if you provide a default of the empty string, "", sum will still reject string arguments. This is intentional, as repeatedly concatenating strings may be extremely inefficient and slow, depending on the specific circumstances. The default of 0 is documented, as is the intention that sum be used only for numeric addition. See `help(sum)` or the docs on the website. ---------- nosy: +steven.daprano title: string concatenation via `sum` -> Improve error message for string concatenation via `sum` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 18:24:45 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 07 Sep 2020 22:24:45 +0000 Subject: [issue41740] Improve error message for string concatenation via `sum` In-Reply-To: <1599506489.43.0.159938522754.issue41740@roundup.psfhosted.org> Message-ID: <1599517485.04.0.960018845499.issue41740@roundup.psfhosted.org> Steven D'Aprano added the comment: Marco, sum should be as fast as possible, so we don't want to type check every single element. But if it is easy enough, it might be worth checking the first element, and if it fails, report: cannot add 'type' to start value where 'type' is the type of the first element. If that is str, then concatenate (use ''.join(iterable) instead) to the error message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 18:32:09 2020 From: report at bugs.python.org (Marco Paolini) Date: Mon, 07 Sep 2020 22:32:09 +0000 Subject: [issue41740] Improve error message for string concatenation via `sum` In-Reply-To: <1599506489.43.0.159938522754.issue41740@roundup.psfhosted.org> Message-ID: <1599517929.56.0.455934316114.issue41740@roundup.psfhosted.org> Marco Paolini added the comment: I was thinking to just clarify a bit the error message that results from Py_NumberAdd. This won't make it slower in the "hot" path doing something like (not compile tested, sorry) --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -2451,8 +2451,13 @@ builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start) Py_DECREF(result); Py_DECREF(item); result = temp; - if (result == NULL) + if (result == NULL) { + if (PyUnicode_Check(item) || PyBytes_Check(item) || PyByteArray_Check(item)) + PyErr_SetString(PyExc_TypeError, + "sum() can't sum bytes, strings or byte-arrays [use .join(seq) instead]"); + } break; + } } Py_DECREF(iter); return result; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 19:27:44 2020 From: report at bugs.python.org (Phillip M. Feldman) Date: Mon, 07 Sep 2020 23:27:44 +0000 Subject: [issue41740] Improve error message for string concatenation via `sum` In-Reply-To: <1599517485.04.0.960018845499.issue41740@roundup.psfhosted.org> Message-ID: Phillip M. Feldman added the comment: I'd forgotten about ''.join; this is a good solution. I withdraw my comment. On Mon, Sep 7, 2020 at 3:25 PM Steven D'Aprano wrote: > > Steven D'Aprano added the comment: > > Marco, sum should be as fast as possible, so we don't want to type check > every single element. But if it is easy enough, it might be worth checking > the first element, and if it fails, report: > > cannot add 'type' to start value > > where 'type' is the type of the first element. If that is str, then > concatenate > > (use ''.join(iterable) instead) > > to the error message. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 19:44:27 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Sep 2020 23:44:27 +0000 Subject: [issue41714] multiprocessing.Queue deadlock In-Reply-To: <1599214787.05.0.21620669779.issue41714@roundup.psfhosted.org> Message-ID: <1599522267.24.0.333135929133.issue41714@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 20:08:26 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Sep 2020 00:08:26 +0000 Subject: [issue41702] Inconsistent behaviour in strftime In-Reply-To: <1599133552.94.0.223502406334.issue41702@roundup.psfhosted.org> Message-ID: <1599523706.24.0.73023001026.issue41702@roundup.psfhosted.org> Ned Deily added the comment: The behavior you see with a Python 3.7 is not universal. For example, on macOS: Python 3.7.9 (v3.7.9:13c94747c7, Aug 15 2020, 01:31:08) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.datetime.strptime("0020-10-05", "%Y-%m-%d").strftime("%Y-%m-%d") '0020-10-05' So there is apparently something different in the environments between the Python 3.6 and 3.7 you are using, rather than an issue in Python itself. Perhaps a comparison of the outputs between: python3.6 -m test.pythoninfo python3.7 -m test.pythoninfo will suggest something. In any case, as Josh notes, Python 3.7 is in the security-fix-only phase of its life cycle so even if there were an issue in Python itself it would likely not meet the criteria to be fixed in 3.7. ---------- nosy: +ned.deily resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 20:11:42 2020 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Sep 2020 00:11:42 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599523902.63.0.294055797256.issue41703@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +lukasz.langa versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 21:14:17 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Sep 2020 01:14:17 +0000 Subject: [issue41741] test_peg_generator timed out (25 min) on x86 Gentoo Non-Debug with X 3.9 In-Reply-To: <1599515453.81.0.896157572076.issue41741@roundup.psfhosted.org> Message-ID: <1599527657.86.0.25078321976.issue41741@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: These tests are expensive because they have to compile one C extension per test but I don't see any way to make them faster than does not complicate the whole setup considerably. I have tried to compile a shared object containing the common parts but it just saves 35% of the time and is a bit of a mess to keep that state around. Making the timeout bigger can be a possibility, certainly, but this also means the builder will get stuck more time in race conditions or deadlocks :( ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 21:43:51 2020 From: report at bugs.python.org (mohamed koubaa) Date: Tue, 08 Sep 2020 01:43:51 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599529431.01.0.247856556273.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21227 pull_request: https://github.com/python/cpython/pull/22145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 7 23:50:18 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 08 Sep 2020 03:50:18 +0000 Subject: [issue41740] Improve error message for string concatenation via `sum` In-Reply-To: <1599506489.43.0.159938522754.issue41740@roundup.psfhosted.org> Message-ID: <1599537018.66.0.237995349585.issue41740@roundup.psfhosted.org> Vedran ?a?i? added the comment: The fact that you've forgotten about it is exactly why sum tries to educate you (despite Python being "the language of consenting adults" in most other aspects). The problem (why it doesn't do a good job in that aspect) is that people usually expect sum to act like a 2-arg form of functools.reduce, while in fact it acts like a 3-arg form, with 0 as the initializer. I doubt that Python will change regarding that, but you can sharpen your intuition by asking yourself: what do you expect sum([]) to be? If 0, then you're inconsistent. :-) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 00:10:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Sep 2020 04:10:02 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599538202.61.0.925984161349.issue41729@roundup.psfhosted.org> Terry J. Reedy added the comment: After splitting the two reads onto two lines, the indefinite hang happens in the second one, stdin.readall. def test_ctrl_z(self): with open('CONIN$', 'rb', buffering=0) as stdin: source = '\xC4\x1A\r\n'.encode('utf-16-le') expected = '\xC4'.encode('utf-8') print('here') write_input(stdin, source) a = stdin.read(1) ## b = stdin.readall() self.assertEqual(expected[0:1], a) ## self.assertEqual(expected[1:], b) The resulting failure of the first assertion results in: FAIL: test_ctrl_z (__main__.WindowsConsoleIOTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "F:\dev\3x\lib\test\test_winconsoleio.py", line 197, in test_ctrl_z self.assertEqual(expected[0:1], a) AssertionError: b'\xc3' != b'\r' This minimal change would stop the hang crash, which is the first priority. However, changing the repeat from 10 to 1, to look like prec->Event.KeyEvent.wRepeatCount = 1; fixes all failures, including the hang. I will submit for CI testing. But two questions. Is this line needed with a repeat of 1, or should it be removed? Also, this file has a section added by arg clinic. Does it need to be regenerated for this change? If so, how? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 00:15:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Sep 2020 04:15:27 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599538527.21.0.695990773659.issue41729@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21228 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 00:45:49 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 08 Sep 2020 04:45:49 +0000 Subject: [issue40624] add support for != (not-equals) in ElementTree XPath In-Reply-To: <1589455502.16.0.216786525166.issue40624@roundup.psfhosted.org> Message-ID: <1599540349.75.0.56999888943.issue40624@roundup.psfhosted.org> Stefan Behnel added the comment: Agreed that adding "!=" would be a nice improvement, probably not very invasive. PR welcome. https://www.w3.org/TR/xpath-10/#booleans ---------- nosy: +scoder stage: -> needs patch type: -> enhancement versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 00:54:33 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 08 Sep 2020 04:54:33 +0000 Subject: [issue39714] ElementTree limitation In-Reply-To: <1582307998.92.0.808661201788.issue39714@roundup.psfhosted.org> Message-ID: <1599540873.45.0.978953535563.issue39714@roundup.psfhosted.org> Stefan Behnel added the comment: I'd suggest feeding the data into the parser in chunks, or letting it read from a file-like object, or something like that. Also, you probably want to do incremental processing on the data (see the XMLPullParser and iterparse), because reading 3.5GB of XML data into an in-memory tree can easily result in 10x the memory usage. You may have 40GB of RAM on your machine, but even then, I'd still recommend processing the data in incrementally. ---------- nosy: +scoder versions: +Python 3.10, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 00:55:41 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 08 Sep 2020 04:55:41 +0000 Subject: [issue39714] ElementTree parser limitation of input string size In-Reply-To: <1582307998.92.0.808661201788.issue39714@roundup.psfhosted.org> Message-ID: <1599540941.88.0.686328544342.issue39714@roundup.psfhosted.org> Change by Stefan Behnel : ---------- title: ElementTree limitation -> ElementTree parser limitation of input string size _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 01:01:02 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 08 Sep 2020 05:01:02 +0000 Subject: [issue19483] Allow more low-level parser configuration in ElementTree In-Reply-To: <1383476320.61.0.0930927196631.issue19483@psf.upfronthosting.co.za> Message-ID: <1599541262.73.0.16557602642.issue19483@roundup.psfhosted.org> Stefan Behnel added the comment: Changing subject to make it clear what this ticket is really about. ---------- title: Pure-Python ElementTree classes no longer available since 3.3 -> Allow more low-level parser configuration in ElementTree versions: +Python 3.10 -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 01:02:49 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 08 Sep 2020 05:02:49 +0000 Subject: [issue20198] xml.etree.ElementTree.ElementTree.write attribute sorting In-Reply-To: <1389231308.67.0.0933451284696.issue20198@psf.upfronthosting.co.za> Message-ID: <1599541369.41.0.470671266884.issue20198@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 01:59:25 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 08 Sep 2020 05:59:25 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599544765.51.0.152611666478.issue41729@roundup.psfhosted.org> Eryk Sun added the comment: > Is this line needed with a repeat of 1, or should it be removed? It's not documented what it means to write a key event with wRepeatCount set to 0. It happens to work, but I'd leave it set to 1, which means the key was pressed once. Ideally, there should also be a subsequent key-up event that's the same except bKeyDown is FALSE, but test_winconsoleio doesn't need it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 02:26:47 2020 From: report at bugs.python.org (Alex) Date: Tue, 08 Sep 2020 06:26:47 +0000 Subject: [issue41651] Pip: Wrong Showing of Progressbar when Downloading Modules In-Reply-To: <1598586276.58.0.803654971013.issue41651@roundup.psfhosted.org> Message-ID: <1599546407.58.0.244399991154.issue41651@roundup.psfhosted.org> Alex <2423067593 at qq.com> added the comment: @cryvate: Okay, and the new issue is crated at . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 03:21:27 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 08 Sep 2020 07:21:27 +0000 Subject: [issue40624] add support for != (not-equals) in ElementTree XPath In-Reply-To: <1589455502.16.0.216786525166.issue40624@roundup.psfhosted.org> Message-ID: <1599549687.77.0.249852389923.issue40624@roundup.psfhosted.org> Change by Ammar Askar : ---------- keywords: +patch nosy: +ammar2 nosy_count: 3.0 -> 4.0 pull_requests: +21229 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 03:28:59 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 08 Sep 2020 07:28:59 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599550139.17.0.609527144903.issue41732@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset b0ac5d75a59c356c44cfc9b25077da3049dd16e9 by dxflores in branch 'master': bpo-41732: add iterator to memoryview (GH-22119) https://github.com/python/cpython/commit/b0ac5d75a59c356c44cfc9b25077da3049dd16e9 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 04:21:34 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 08 Sep 2020 08:21:34 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599553294.86.0.662761193981.issue41732@roundup.psfhosted.org> Stefan Krah added the comment: It would have been nice to have had a chance to look at this, but apparently those days are over. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 04:21:48 2020 From: report at bugs.python.org (Stefan Krah) Date: Tue, 08 Sep 2020 08:21:48 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599553308.92.0.803486391426.issue41732@roundup.psfhosted.org> Change by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 04:45:15 2020 From: report at bugs.python.org (leveque) Date: Tue, 08 Sep 2020 08:45:15 +0000 Subject: [issue41742] Request for docs.python.org/3/library/configparser.html#exceptions improvement Message-ID: <1599554715.27.0.66152205525.issue41742@roundup.psfhosted.org> New submission from leveque : Hi, docs.python.org/3/library/configparser.html#exceptions does not mention KeyError which is mentioned under https://docs.python.org/3/library/configparser.html#mapping-protocol-access and https://docs.python.org/3/library/configparser.html#customizing-parser-behaviour. Could it be added ? Cheers, ---------- assignee: docs at python components: Documentation messages: 376551 nosy: docs at python, leveque priority: normal severity: normal status: open title: Request for docs.python.org/3/library/configparser.html#exceptions improvement type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 04:59:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 08:59:20 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599555560.1.0.881202252356.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 15dcdb211366e0788e831fc2a1f785e6a5ca2749 by Mohamed Koubaa in branch 'master': bpo-1635741: Port the termios to multi-phase init (PEP 489) (GH-22139) https://github.com/python/cpython/commit/15dcdb211366e0788e831fc2a1f785e6a5ca2749 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:00:17 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 09:00:17 +0000 Subject: [issue15709] PEP 3121, 384 Refactoring applied to termios module In-Reply-To: <1345152769.02.0.418210098076.issue15709@psf.upfronthosting.co.za> Message-ID: <1599555617.08.0.130496816512.issue15709@roundup.psfhosted.org> STINNER Victor added the comment: Fixed by: New changeset 15dcdb211366e0788e831fc2a1f785e6a5ca2749 by Mohamed Koubaa in branch 'master': bpo-1635741: Port the termios to multi-phase init (PEP 489) (GH-22139) https://github.com/python/cpython/commit/15dcdb211366e0788e831fc2a1f785e6a5ca2749 ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Py_Finalize() doesn't clear all Python objects at exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:00:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 09:00:36 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599555636.13.0.0255415262091.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-15709 "PEP 3121, 384 Refactoring applied to termios module" as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:07:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 09:07:48 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599556068.77.0.508424146233.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: I rejected the PR 19122 which tries to port the _datetime module to the multi-phase initialization API (PEP 489). We need first to enhance the PyCapsule C API to pass the module instance to C functions, somehow. Extension modules calling PyCapsule_New() in their init function: * _curses * _datetime * _decimal * _socket * pyexpat * unicodedata ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:16:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 09:16:18 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599556578.21.0.653124983676.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 52a2df135c0470b1dbf889edc51b7c556ae4bc80 by Mohamed Koubaa in branch 'master': bpo-1635741: Convert _sha256 types to heap types (GH-22134) https://github.com/python/cpython/commit/52a2df135c0470b1dbf889edc51b7c556ae4bc80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:19:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 09:19:11 +0000 Subject: [issue41741] test_peg_generator timed out (25 min) on x86 Gentoo Non-Debug with X 3.9 In-Reply-To: <1599515453.81.0.896157572076.issue41741@roundup.psfhosted.org> Message-ID: <1599556751.33.0.978624915444.issue41741@roundup.psfhosted.org> STINNER Victor added the comment: > Making the timeout bigger can be a possibility, certainly, but this also means the builder will get stuck more time in race conditions or deadlocks :( Race conditions and deadlocks are less likely than false alarms of builds failed because the timeout is too short. So far, I'm only aware of this specific buildbot worker which is too slow for "(timeout: 25 min, worker timeout: 30 min)". So just increase the timeout to 40 min, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:19:26 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 08 Sep 2020 09:19:26 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599556766.88.0.683429921392.issue41732@roundup.psfhosted.org> Dong-hee Na added the comment: Thanks, Diogo for working on this issue. And thank you for the mentoring guido! ---------- nosy: +gvanrossum resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:22:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 09:22:25 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599556945.42.0.104490894545.issue41732@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Diogo Flores, it's a nice optimization! Stefan Krah: "It would have been nice to have had a chance to look at this, but apparently those days are over." The PR has been approved by two core developers. It's a nice optimization, I don't see what is the problem here. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 05:25:07 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Sep 2020 09:25:07 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599557107.09.0.898250638853.issue41729@roundup.psfhosted.org> Terry J. Reedy added the comment: I was assuming that the default was 1, not 0. But now that CI tests pass code as is, I will leave it alone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 06:11:31 2020 From: report at bugs.python.org (Diogo Flores) Date: Tue, 08 Sep 2020 10:11:31 +0000 Subject: [issue41732] Custom iterator to memoryview - performance improvement In-Reply-To: <1599383212.96.0.797075491806.issue41732@roundup.psfhosted.org> Message-ID: <1599559891.18.0.658287379071.issue41732@roundup.psfhosted.org> Diogo Flores added the comment: Thank you Dong-hee Na and Victor. @Stefan Krah: I am sorry that you didn't had the chace to try out the patch before it got merged, however iff you are curious about the any aspect of the implementation (or the motivation behind it) I am happy to discuss it in depth. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 06:24:50 2020 From: report at bugs.python.org (Danny Lin) Date: Tue, 08 Sep 2020 10:24:50 +0000 Subject: [issue41737] Improper NotADirectoryError when opening a file under a fake directory In-Reply-To: <1599492997.14.0.974001441191.issue41737@roundup.psfhosted.org> Message-ID: <1599560690.25.0.207502419704.issue41737@roundup.psfhosted.org> Danny Lin added the comment: I'm not so familiar about the spec. If such behavior is confirmed due to implementation difference across OSes, and it's also not desirable to change the mapping of the OS error to Python exception, we can simplify left it as-is. However, this behavior difference can potentially cause cross-platform compatibility. For example, the code: try: open('/path/to/file/somename.txt') except FileNotFoundError: """do something""" would work on Windows but break on Linux (or POSIX?). The current (3.8) description for exception NotADirectoryError is: Raised when a directory operation (such as os.listdir()) is requested on something which is not a directory. Corresponds to errno ENOTDIR. According to this, a user probably won't expect to receive a NotADirectoryError for open('/path/to/file/somename.txt'), as this doesn't seem like a directory operation at all, unless he is expert enough to know about the implication of errno ENOTDIR. I think a note should at least be added to the documentation if we are not going to change the behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 07:18:21 2020 From: report at bugs.python.org (hai shi) Date: Tue, 08 Sep 2020 11:18:21 +0000 Subject: [issue41736] test_site: test_s_option() failed on AMD64 Windows8.1 Refleaks 3.7 In-Reply-To: <1599488018.49.0.898281203833.issue41736@roundup.psfhosted.org> Message-ID: <1599563901.33.0.360277005399.issue41736@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 07:33:13 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 08 Sep 2020 11:33:13 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599564793.06.0.370964728061.issue41730@roundup.psfhosted.org> E. Paine added the comment: +1 I think this would be very helpful as the only places I can find its deprecation are a small note at the top of the Tix Python docs [https://github.com/python/cpython/commit/bd63353] and a news entry a long way down the 3.6 release notes https://docs.python.org/3/whatsnew/3.6.html#id7 [https://github.com/python/cpython/commit/ba41c81]. While I agree with @Zachary's comment on #29125 that the injection bug probably would be a reasonable excuse to remove Tix, I believe we should first "properly" deprecate it (I can imagine a few users getting caught out if we remove it without raising a DeprecationWarning in previous versions). IMO, #31371 should be reopened once this has been merged to facilitate removal in a future version and allow discussion for which version removal should occur in. I also think that we should back-port this to 3.8/9 to give users more notice than they might otherwise get. @wyz23x2, are you alright to write a patch for this? (I assume no-one has any objections given that Tix is already deprecated) ---------- nosy: +epaine, zach.ware versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 07:36:42 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 08 Sep 2020 11:36:42 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599565002.91.0.478595600647.issue41631@roundup.psfhosted.org> Petr Viktorin added the comment: I also looked into Mercurial. They have a large list of modules [0] that don't work with the lazy-loading scheme. I don't think adding one more should be a big problem for them; but we'll reach out to them and confirm that. [0] https://www.mercurial-scm.org/repo/hg/file/tip/hgdemandimport/__init__.py#l26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 07:37:06 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 08 Sep 2020 11:37:06 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599565026.29.0.581378422539.issue41631@roundup.psfhosted.org> Petr Viktorin added the comment: We need this bug solved for 3.9.0 rc2. ?ukasz, you're the one to make the call about the approach; how can we make your job easier? My view is: - Victor's PR 21961 is going in the right direction. But, as far as I know (correct me if I'm wrong), Victor unfortunately has less time for CPython than usual, for personal reasons. So, the PR is unexpectedly stalled. I don't think there's enough time to fix and test it for RC 2. - My PR 21973 essentially just provides a better error message (and might prevent segfaults in more convoluted cases -- essentially ones where the _ast module is replaced maliciously). We can merge it, backport to 3.9; then iterate on Victor's PR to have a better solution in 3.10. But Pablo an Victor should chime in as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 07:45:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 11:45:39 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599565539.77.0.853058726334.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: 2020-06-22 16:58: "List of the 58 C extensions using the legacy API (...)" UPDATE: 56% of Modules/*.c modules are converted (48 on 85). Since June, 21 extension modules have been converted. There are now 37 remaining extensions which still use PyModule_Create(): $ grep -l '\ *(' Modules/*.c|wc -l 37 Modules/*.c: * 48 files use PyModuleDef_Init() * 37 files use PyModule_Create() * 9 files are not modules: Modules/config.c Modules/getaddrinfo.c Modules/getbuildinfo.c Modules/getnameinfo.c Modules/getpath.c Modules/main.c Modules/_math.c Modules/rotatingtree.c Modules/tkappinit.c -- Outside the Modules/ directory, there are 6 modules using PyModule_Create: $ grep -l '\ *(' */*.c|grep -v Modules Objects/unicodeobject.c PC/_msi.c PC/msvcrtmodule.c PC/winreg.c PC/winsound.c Python/import.c Python/marshal.c Python/_warnings.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 07:51:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 11:51:37 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599565897.89.0.577871750859.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21230 pull_request: https://github.com/python/cpython/pull/22148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 07:56:04 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 11:56:04 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599566164.63.0.539263817711.issue1635741@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21231 pull_request: https://github.com/python/cpython/pull/22149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 08:03:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 12:03:11 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599566591.67.0.980419128918.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: > Python/_warnings.c I'm not sure if it's a good idea to convert the _warnings module to multi-phase init, since it uses a state stored in the interpreter: /* Given a module object, get its per-module state. */ static WarningsState * warnings_get_state(void) { PyInterpreterState *interp = _PyInterpreterState_GET(); if (interp == NULL) { PyErr_SetString(PyExc_RuntimeError, "warnings_get_state: could not identify " "current interpreter"); return NULL; } return &interp->warnings; } For example, two _warnings instance would share the _warnings.filters list. Maybe it's ok, I don't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 08:09:30 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 08 Sep 2020 12:09:30 +0000 Subject: [issue41618] [C API] How many slots of static types should be exposed in PyType_GetSlot() In-Reply-To: <1598172498.12.0.869607269568.issue41618@roundup.psfhosted.org> Message-ID: <1599566970.68.0.125903755205.issue41618@roundup.psfhosted.org> Petr Viktorin added the comment: IMO, a slot should be exposed if there is some reason for exposing it. bpo-41073 talks about tp_dealloc, which is already exposed as Py_tp_dealloc. Recently, Py_bf_* slots were exposed (but not as part of the limited API), in bpo-40724 which links to the reasons for exposing them. Which other slots are we missing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 08:55:59 2020 From: report at bugs.python.org (Zachary Ware) Date: Tue, 08 Sep 2020 12:55:59 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP In-Reply-To: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> Message-ID: <1599569759.1.0.671596169461.issue40562@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg376478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 08:56:20 2020 From: report at bugs.python.org (Zachary Ware) Date: Tue, 08 Sep 2020 12:56:20 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP In-Reply-To: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> Message-ID: <1599569780.14.0.291732619345.issue40562@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg371208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 09:23:40 2020 From: report at bugs.python.org (David Williams) Date: Tue, 08 Sep 2020 13:23:40 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation Message-ID: <1599571420.09.0.38882357277.issue41743@roundup.psfhosted.org> New submission from David Williams : The Python documentation contains unnecessarily verbose and gendered language which does not enhance clarity, and rather, serves as non-inclusive to the LGTBQ community For example: https://www.python.org/dev/peps/pep-3136/ "Introduction The break statement allows the programmer to terminate a loop early, and the continue statement allows the programmer to move to the next iteration of a loop early. In Python currently, break and continue can apply only to the innermost enclosing loop. Motivation If the programmer wishes to move to the next iteration of an outer enclosing loop, or terminate multiple loops at once, he or she has a few less-than elegant options." There are 2 issues here. First is that break and continue don't allow the programmer to do anything, they cause the program control flow to change. Second, there is no reason to appeal to gendered pronouns which are antiquated. The motivation section could easily be rewritten to a more include and parsimonious form (less chatter): "Motivation Python syntax is limited when it comes to moving to the next iteration of an outer enclosing loop, or terminating multiple loops at once, " ---------- assignee: docs at python components: Documentation messages: 376569 nosy: docs at python, mobiusinversion priority: normal severity: normal status: open title: Remove Unnecessarily Gendered Language from the Documentation type: enhancement versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 09:26:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 13:26:31 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation In-Reply-To: <1599571420.09.0.38882357277.issue41743@roundup.psfhosted.org> Message-ID: <1599571591.12.0.720530997472.issue41743@roundup.psfhosted.org> STINNER Victor added the comment: Hi, https://www.python.org/dev/peps/pep-3136/ is not really directly part of Python. The document is hosted at https://github.com/python/peps/ and was authored by Matt Chisholm. I suggest you to propose a PR on the PEP document and try to get it reviewed by Matt Chisholm. See also https://github.com/python/devguide/issues/605 "List terms which should be avoided". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 09:33:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 13:33:35 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599572015.22.0.108337573379.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f by Victor Stinner in branch 'master': bpo-1635741: Port _string module to multi-phase init (GH-22148) https://github.com/python/cpython/commit/bb083d33f7ffe93cee9e1f63d1e526dc81a6e34f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 09:33:56 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Sep 2020 13:33:56 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599572036.05.0.193934970266.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f315142ddc61e54a59028db562aec5f62db783e1 by Victor Stinner in branch 'master': bpo-1635741: Port mashal module to multi-phase init (#22149) https://github.com/python/cpython/commit/f315142ddc61e54a59028db562aec5f62db783e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 10:05:58 2020 From: report at bugs.python.org (Manuel Jacob) Date: Tue, 08 Sep 2020 14:05:58 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599573958.76.0.352498701499.issue41631@roundup.psfhosted.org> Manuel Jacob added the comment: I couldn?t reproduce the problem with a freshly compiled Python 3.9.0rc1 on Arch Linux. Was this ever reproduced on a non-Red Hat system? ---------- nosy: +mjacob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 10:17:48 2020 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 08 Sep 2020 14:17:48 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599574668.24.0.64213589854.issue41631@roundup.psfhosted.org> Petr Viktorin added the comment: That is interesting. The original post here doesn't mention that the problem occurs in Mercurial's "make all", specifically when building documentation, in the command: /usr/bin/python3.9 gendoc.py "hgrc.5" > hgrc.5.txt.tmp Could you confirm `make all` works OK with python3.9 on Arch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 10:29:43 2020 From: report at bugs.python.org (Manuel Jacob) Date: Tue, 08 Sep 2020 14:29:43 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599575383.24.0.308136412644.issue41631@roundup.psfhosted.org> Manuel Jacob added the comment: I was running "make all" and I also ran the documentation generator command without an error. However, I tried it again and now it failed the same way as reported. With a debug build, I get "Python/Python-ast.c:231: get_ast_state: Assertion `state != NULL' failed.". Sorry for the noise! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 10:37:03 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 08 Sep 2020 14:37:03 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599575823.58.0.0305815339919.issue41703@roundup.psfhosted.org> Change by Mark Shannon : ---------- assignee: -> Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 10:47:41 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 08 Sep 2020 14:47:41 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599576461.92.0.714291177448.issue41703@roundup.psfhosted.org> Mark Shannon added the comment: https://bugs.python.org/issue39320 has a change note: https://docs.python.org/3.9/whatsnew/changelog.html#python-3-9-0-beta-3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:17:17 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 08 Sep 2020 15:17:17 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599578237.06.0.937722556932.issue41703@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +21232 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:33:50 2020 From: report at bugs.python.org (Vaclav Slavik) Date: Tue, 08 Sep 2020 15:33:50 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants Message-ID: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> New submission from Vaclav Slavik : NuGet automatically includes .props file from the build directory in the target using the package, but only if the file has the correct name: it must be $(id).props. This means that Python's support for this only works correctly in the python nuget packages, but not in pythonx86 and others, because the file is copied as python.props (instead of pythonx86.props etc) there too. ---------- components: Windows messages: 376577 nosy: paul.moore, steve.dower, tim.golden, vslavik, zach.ware priority: normal severity: normal status: open title: NuGet python.props only works in python nuget, not other variants type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:34:28 2020 From: report at bugs.python.org (Vaclav Slavik) Date: Tue, 08 Sep 2020 15:34:28 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1599579268.88.0.0313505596119.issue41744@roundup.psfhosted.org> Change by Vaclav Slavik : ---------- keywords: +patch pull_requests: +21233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:40:46 2020 From: report at bugs.python.org (Julian Berman) Date: Tue, 08 Sep 2020 15:40:46 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments Message-ID: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> New submission from Julian Berman : The following code succeeds "silently", which seems undesirable: from inspect import signature def two(): return 2 bound = signature(two).bind() bound.arguments["does_not_exist"] = 12 two(*bound.args, **bound.kwargs) where the mechanism for finally calling `two` is the recommended way shown in the docs for `inspect.BoundArguments`: https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.apply_defaults What's happened there is that: print(b.args, b.kwargs) "silently" ignored the non-existent argument. Somewhere along the line here it seems like something should complain. I don't see previous discussion of this from quickly searching on the bug tracker, but obviously if I've missed something let me know. I'm also not really sure what the desirable solution is. To me, it's possibly that BoundArguments should have a fully-managed way to invoke a callable rather than asking a user to unpack *args and *kwargs, and that that mechanism, say arguments.be_passed_to(callable) should do the error checking). Having `.arguments` full-on reject unknown parameters seems like another possibility but there may be reasons that's not a good idea (e.g. if you were to for some reason use a bound arguments object to call some other function that *did* take that additional argument). ---------- components: Library (Lib) messages: 376578 nosy: Julian priority: normal severity: normal status: open title: BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:47:37 2020 From: report at bugs.python.org (Julian Berman) Date: Tue, 08 Sep 2020 15:47:37 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments In-Reply-To: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> Message-ID: <1599580057.94.0.0395069609958.issue41745@roundup.psfhosted.org> Change by Julian Berman : ---------- nosy: +yselivanov versions: -Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:52:38 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 08 Sep 2020 15:52:38 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1599580358.1.0.753115065932.issue41744@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the contribution! I think I only ever tested this with the 64-bit package... :) Could you make it so that we include the file under both names? Just for anyone (like me) who has hard-coded the python.props name and parametrised the directory name. (If you want to go for bonus points, having the extra file just the other would be a nice touch, but not so important.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:52:32 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 08 Sep 2020 15:52:32 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599580352.87.0.617783072053.issue38762@roundup.psfhosted.org> Irit Katriel added the comment: We've decided for now to leave the code's behavior as it is (the alternatives are worse) and to keep only the test improvements. See discussion on PR 22142. ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 11:52:54 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 08 Sep 2020 15:52:54 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1599580374.49.0.504308728111.issue41744@roundup.psfhosted.org> Change by Steve Dower : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 12:43:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 08 Sep 2020 16:43:01 +0000 Subject: [issue41539] print blocks with multiprocessing and buffered output In-Reply-To: <1597311730.71.0.906884435677.issue41539@roundup.psfhosted.org> Message-ID: <1599583381.85.0.244882263416.issue41539@roundup.psfhosted.org> Irit Katriel added the comment: You're right, this is a different issue. I debugged it a bit and I think the race may be between your print statement and the util._flush_std_streams() in Popen.__init__() of Lib/multiprocessing/popen_fork.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 12:47:27 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 08 Sep 2020 16:47:27 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599583647.97.0.784299264689.issue41703@roundup.psfhosted.org> Mark Shannon added the comment: The change note for 33387 incorrectly referred to 32949 ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 13:01:23 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 08 Sep 2020 17:01:23 +0000 Subject: [issue41539] print blocks with multiprocessing and buffered output In-Reply-To: <1597311730.71.0.906884435677.issue41539@roundup.psfhosted.org> Message-ID: <1599584483.5.0.793899408284.issue41539@roundup.psfhosted.org> Irit Katriel added the comment: This may be relevant: https://stackoverflow.com/questions/9337711/subprocess-popen-not-thread-safe It points to print() being not thread safe and suggests to use sys.stdout.write instead. That worked for me with your script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 13:12:13 2020 From: report at bugs.python.org (Martijn Pieters) Date: Tue, 08 Sep 2020 17:12:13 +0000 Subject: [issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception In-Reply-To: <1493812414.86.0.361870744934.issue30256@psf.upfronthosting.co.za> Message-ID: <1599585133.53.0.981499038372.issue30256@roundup.psfhosted.org> Martijn Pieters added the comment: Might it be better to just *drop* the AutoProxy object altogether? All that it adds is a delayed call to MakeProxyType(f"AutoProxy[{typeid}]", exposed) (with exposed defaulting to public_methods(instance)), per instance per process. It could be replaced by a direct call to `MakeProxyType()`, using `public_methods` directly on the registered type. This wouldn't work for callables that are not classes or where instances add functions to the instance dict, but for those rare cases you can pass in the `exposed` argument. The advantage is that it would simplify the codebase; no more need to special-case the BaseProxy.__reduce__ method, removing the get_methods() method on the Server class, etc. Less surface for this class of bugs to happen in the future. ---------- nosy: +mjpieters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 14:01:16 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 08 Sep 2020 18:01:16 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation In-Reply-To: <1599571420.09.0.38882357277.issue41743@roundup.psfhosted.org> Message-ID: <1599588076.88.0.664350427526.issue41743@roundup.psfhosted.org> Steven D'Aprano added the comment: Hello David, I really don't think you speak for the entire LGBTQ community. You don't speak for me or my wife. You mention two issues here: "First is that break and continue don't allow the programmer to do anything, they cause the program control flow to change." And by changing program control flow, they allow the programmer to do many things. That's why we use them: because we want to do something, and the break and continue statements allow us to do so more conveniently that the alternatives. You say: "Second, there is no reason to appeal to gendered pronouns which are antiquated." If gendered pronouns are antiquated, why do people care about choosing their pronouns? David, I would like to assume good faith, but coming in here and declaring that pronouns are antiquated seems a bit... trollish. I am sure that there are many people who do not agree that pronouns are antiquated or irrelevant. I am pretty sure that there are some people in the mailing list who would be very upset if you misgendered them by insisting that they need no gendered pronouns. Many people consider their personal choice of pronoun important enough to list it in their mail signature or profile, at possible risk to their own safety. What you describe as "more include[sic] and parsimonious form (less chatter)" reads to me as a more passive, excessively terse, less inclusive form that is also incorrect, since "Python syntax is limited..." is not a *motivation*. Motivation must refer to human desire, and your version not only has no human desire, it has no reference to humans at all. It reads to me as a cold, abstract statement divorced from any motivation or human need. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 14:16:38 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 08 Sep 2020 18:16:38 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation In-Reply-To: <1599571420.09.0.38882357277.issue41743@roundup.psfhosted.org> Message-ID: <1599588998.62.0.188373354476.issue41743@roundup.psfhosted.org> Ammar Askar added the comment: The other issue aside, changing "If the programmer wishes to move to the next iteration of an outer enclosing loop, or terminate multiple loops at once, he or she has a few less-than elegant options." to "If the programmer wishes to move to the next iteration of an outer enclosing loop, or terminate multiple loops at once, they have a few less-than elegant options." seems pretty straight forward. But like Victor said, this discussion should be happening on an issue in the peps repo and not here. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 14:23:58 2020 From: report at bugs.python.org (David Williams) Date: Tue, 08 Sep 2020 18:23:58 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation In-Reply-To: <1599571420.09.0.38882357277.issue41743@roundup.psfhosted.org> Message-ID: <1599589438.49.0.900108913402.issue41743@roundup.psfhosted.org> David Williams added the comment: Thanks Victor, I will submit a change request for both of the documents you specified. https://www.python.org/dev/peps/pep-3136/ https://github.com/python/devguide/issues/605 Steven, it sounds like we agree to the change proposal, which is to remove gendered language from the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 14:24:38 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 08 Sep 2020 18:24:38 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation In-Reply-To: <1599571420.09.0.38882357277.issue41743@roundup.psfhosted.org> Message-ID: <1599589478.51.0.16127433308.issue41743@roundup.psfhosted.org> Change by Ammar Askar : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 14:26:07 2020 From: report at bugs.python.org (David Williams) Date: Tue, 08 Sep 2020 18:26:07 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation In-Reply-To: <1599571420.09.0.38882357277.issue41743@roundup.psfhosted.org> Message-ID: <1599589567.36.0.0204856073143.issue41743@roundup.psfhosted.org> David Williams added the comment: Thanks also for your input and feedback, Ammar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 14:44:39 2020 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 08 Sep 2020 18:44:39 +0000 Subject: [issue41733] ContextVar get value is unexpected In-Reply-To: <1599399671.9.0.0244607607619.issue41733@roundup.psfhosted.org> Message-ID: <1599590679.13.0.704351687472.issue41733@roundup.psfhosted.org> Yury Selivanov added the comment: > my expected result is all objects should be different, because the code runs in different context. Contexts "branch", so if you store something in the context before asyncio.run it will store it in the current thread state. And then asyncio.run will pick it up. Also I'd recommend using something else than object IDs - those can be reused and can be very confusing when browsing logs -- it might look like it was the same object, but in fact it could be to different objects sharing the same ID at different points of time. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 15:23:26 2020 From: report at bugs.python.org (Julian Berman) Date: Tue, 08 Sep 2020 19:23:26 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments In-Reply-To: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> Message-ID: <1599593006.89.0.816409373828.issue41745@roundup.psfhosted.org> Julian Berman added the comment: As a secondary behavior here, which is actually the one that matters more for my use case, the following seems surprising as well: import inspect s = inspect.signature(lambda **kwargs: kwargs).bind() s.arguments["foo"] = 12 will similarly silently drop "foo" when attempting to call the function (i.e. it will not appear in bound.kwargs). This behavior I suspect is the intention of the docs saying "Contains only explicitly bound arguments." but still seems easily misused when .arguments is being used as a frontend for adding additional arguments. To me just brainstorming again it seems it'd be useful to provide a harder-to-misuse frontend, e.g. `BoundArguments.with_arguments(*args, **kwargs)` that returns a bound arguments with some additional to-be-bound arguments which may end up in `kwargs`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 15:40:08 2020 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 08 Sep 2020 19:40:08 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599594008.13.0.00279949594469.issue38762@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 3fd69991f47a6672c510fafd76bf183f17ac52ec by Irit Katriel in branch 'master': bpo-38762: Extend logging.test_multiprocessing to cover missing cases. (GH-22142) https://github.com/python/cpython/commit/3fd69991f47a6672c510fafd76bf183f17ac52ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:31:17 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Sep 2020 20:31:17 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects Message-ID: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Casting incorrect elements pulled from asdl_seq objects has been a pain when developing the new PEG parser and is a source of spooky-bug-at-a-distance problems in which the consequences of an incorrect casting from void* are felt much later. I propose to add a new field to asdl_seq objects, which is an enumeration of the possible types it can contain. The main ideas are: * By default, the enumeration will have UNDEFINED type. * We can add some extra macros mirroring asdl_seq_GET and asdl_seq_SET that will receive the expected type and in debug mode will assert that the type is correct. Something like: expr_ty item = asdl_set_GET_TYPED(sequence, n, EXPR); * Usage of asdl_seq_GET and asdl_seq_SET do not do extra checks. * To set the type information, we can add a new constructor: asdl_seq_new_typed(size, arena, TYPE); I think this change is worth because is not very invasive (old usage remains the same), we can slowly migrate only the parts that we need/want and will add some extra debugging possibilities for cases that has been quite challenging. ---------- components: Interpreter Core messages: 376592 nosy: gvanrossum, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Add optional type information to asdl_seq objects versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:33:31 2020 From: report at bugs.python.org (Chary Chary) Date: Tue, 08 Sep 2020 20:33:31 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599597211.63.0.0294796533392.issue14243@roundup.psfhosted.org> Chary Chary added the comment: Dear all, are there any plans to move this quite old issue forward? I stumbled?across this issue, because I found that at the moment there is no out of the box solution to use??tempfile.NamedTemporaryFile in Windows in such scenario (which is often used in unit testing): * in test module: 1) create and open temporary file 2) write data to it 3) pass name of the temporary file to the operational code * In operational?code, being tested 1) open file, using name of the temporary file 2) read data from this temporary?file? ---------- nosy: +chary314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:38:57 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 08 Sep 2020 20:38:57 +0000 Subject: [issue41747] dataclasses: generated method's using the wrong qualname Message-ID: <1599597537.61.0.699248126431.issue41747@roundup.psfhosted.org> New submission from Batuhan Taskaya : $ cat t.py from dataclasses import dataclass @dataclass class Foo: bar: int Foo() $ python t.py Traceback (most recent call last): File "/home/isidentical/cpython/cpython/t.py", line 7, in Foo() TypeError: __create_fn__..__init__() missing 1 required positional argument: 'bar' ---------- components: Library (Lib) messages: 376594 nosy: BTaskaya, eric.smith priority: normal severity: normal status: open title: dataclasses: generated method's using the wrong qualname type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:42:52 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 08 Sep 2020 20:42:52 +0000 Subject: [issue41747] dataclasses: generated method's using the wrong qualname In-Reply-To: <1599597537.61.0.699248126431.issue41747@roundup.psfhosted.org> Message-ID: <1599597772.8.0.577261170518.issue41747@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +21234 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:45:50 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Sep 2020 20:45:50 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599597950.49.0.510479136901.issue41746@roundup.psfhosted.org> Raymond Hettinger added the comment: Let me know if I'm misunderstanding the proposal. Are you proposing a non-standard ASDL extension to that won't work with existing ASDL parsers? I thought the entire point of ASDL is that it was standard, portable, and had a fixed number of types easily implemented in many languages. FWIW, Here are some of my notes from a compiler project I worked on a while back: # ASDL's seven builtin types are: # - identifier, int, string, bytes, object, singleton, constant # - singleton: None, True or False # - constant can be None, whereas None means "no value" for object # # Resources for ASDL: # https://www.usenix.org/legacy/publications/library/proceedings/dsl97/full_papers/wang/wang.pdf # https://eli.thegreenplace.net/2014/06/04/using-asdl-to-describe-asts-in-compilers # https://www.oilshell.org/blog/2016/12/11.html ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:46:23 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 08 Sep 2020 20:46:23 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599597983.69.0.684939699572.issue41746@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:49:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Sep 2020 20:49:03 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599598143.7.0.80723410391.issue41746@roundup.psfhosted.org> Raymond Hettinger added the comment: Within standard ASDL, the sequences already have an ASDL type. Here's a snippet that shows both builtin types and derived types: start = Program(stmt* procs, expr* calls) stmt = Procedure(identifier name, identifier* params, bool is_test, stmt body) | Block(int blocknum, stmt* stmts) | Assign(lvalue target, expr value) | If(expr cond, stmt action) | Loop(int times, bool fixed, body stmt) | AbortLoop(int blocknum) | QuitBlock(int blocknum) expr = BinOp(expr value1, str op, expr value2) | Number(int x) | Bool(bool x) | Id(identifier name) | Call(identifier name, expr* args) | lvalue lvalue = Output(bool is_bool) | Cell(int i) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:51:28 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 08 Sep 2020 20:51:28 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599598288.3.0.0397094348264.issue41746@roundup.psfhosted.org> Batuhan Taskaya added the comment: We already have a specialized type for int (actually an enumeration); typedef struct { Py_ssize_t size; void *elements[1]; } asdl_seq; typedef struct { Py_ssize_t size; int elements[1]; } asdl_int_seq; Why not just include these in the Python-ast.h and auto-generate them in the asdl_c.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:52:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Sep 2020 20:52:02 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599598322.05.0.688205116215.issue41746@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Let me know if I'm misunderstanding the proposal. Are you proposing a non-standard ASDL extension to that won't work with existing ASDL parsers? No, I am not proposing any modification to the ASDL parsers nor the ASDL definition language. I am proposing a modification to the internal data structures we use internally to carry sequences of ASDL types. Currently, asdl_seq is a type that holds an array of void* pointers and the user is supposed to cast the individual items to the correct types, which is error prone. I am proposing to add a new field to our internal structures that allows the user to have some certainty over what these sequences contain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:53:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Sep 2020 20:53:11 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599598391.55.0.291203276026.issue41746@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Why not just include these in the Python-ast.h and auto-generate them in the asdl_c.py That's a possibility, but that would incur in a lot of new extra code, and some asdl_seq items in the parser contain non-standard types that only PEG uses, so is not possible to auto-generate them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:53:25 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 08 Sep 2020 20:53:25 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599598405.58.0.389120904649.issue41746@roundup.psfhosted.org> Batuhan Taskaya added the comment: The problem with asdl_seq_int was that it was hard-coded since there was no entity that transpods data between different traversers / node visitors. PR 20193 tries to implement a general-purpose metadata system to eliminate that issue, and can be easily extended for this too! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:54:32 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 08 Sep 2020 20:54:32 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599598472.67.0.818007361382.issue41746@roundup.psfhosted.org> Batuhan Taskaya added the comment: > That's a possibility, but that would incur in a lot of new extra code, and some asdl_seq items in the parser contain non-standard types that only PEG uses, so is not possible to auto-generate them. Well, since the extra code will be autogenerated, guess it wouldn't be much problematic. But I see about the PEG thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 16:57:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Sep 2020 20:57:07 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599598627.67.0.963042310612.issue41746@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Well, since the extra code will be autogenerated, guess it wouldn't be much problematic. It will because it means that generic functions that receive asdl_seq an need to cast aliased pointers because they will still receive asdl_seq* items and you now need to cars them to the appropriate type: int foo(asdl_seq* my_seq) { asdl_seq_expr* = (asdl_seq_expr*)my_seq } So you will end up with what I am proposing: a flag in asdl_seq that tells you of what type it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 17:04:39 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Sep 2020 21:04:39 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599599079.78.0.394339263425.issue41746@roundup.psfhosted.org> Raymond Hettinger added the comment: > No, I am not proposing any modification to the ASDL parsers nor > the ASDL definition language. I am proposing a modification to > the internal data structures we use internally to carry sequences > of ASDL types. Thanks for the clarification. Carry on :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 17:15:34 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Sep 2020 21:15:34 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599599734.41.0.180093048687.issue41746@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Well, since the extra code will be autogenerated, guess it wouldn't be much problematic. But I see about the PEG thing. On the other hand, having explicit types for the sequences will allow us to get compile errors instead of runtime errors for the standard types, so this may be a good possibility. Maybe some mixture of both: * asdl_seq objects can contain an enum describing what they are. * We have specific specializations for adding to ASDL types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 17:16:43 2020 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 08 Sep 2020 21:16:43 +0000 Subject: [issue41734] Refactor b32{encode,decode} tests In-Reply-To: <1599419707.5.0.662940988901.issue41734@roundup.psfhosted.org> Message-ID: <1599599803.05.0.898576215689.issue41734@roundup.psfhosted.org> Paul Ganssle added the comment: I agree with Filipe here ? I think the b32encode/b32decode tests were originally written before subtests were available, and this PR has this and other real improvements. I understand why you'd want to have a policy of "no refactoring for its own sake", but as I argued in the PR 20441 (https://github.com/python/cpython/pull/20441#issuecomment-634773049), it's safer to leave existing tests alone when making changes to the code under test, since there's the possibility that you both introduce an error *and* modify the tests in such a way that doesn't catch the error you introduced. In that case, "refactoring as you go" doesn't really work, and you need a separate PR for improvements like these. I'm re-opening the ticket for now because I think we should at least discuss this before rejecting it out of hand. > I am a bit confused, in PR 20441 I first just copied the current b32{encode,decode} tests but was given feedback which resulted in the proposed tests, but now I am being told the opposite, that the tests are better as they currently are. Sorry about the mixed messages. I think you simply chalk this up to the fact that Serhiy and I apparently disagree about test structure. I reviewed the previous PR and specifically asked for this change, so I think it was a bit rash to close the issue right away (though as someone who has probably prematurely closed his fair share of issues, I should probably not be tossing about stones in the vicinity of my decidedly double-paned domicile). ---------- resolution: rejected -> stage: resolved -> patch review status: closed -> open versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 17:53:02 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 08 Sep 2020 21:53:02 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599601982.12.0.160492594732.issue41746@roundup.psfhosted.org> Guido van Rossum added the comment: I know it's moot now, but still -- what benefit do we get from using a "standard" like ASDL? All our tooling for it is custom for Python only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 17:59:30 2020 From: report at bugs.python.org (Ademar Nowasky Junior) Date: Tue, 08 Sep 2020 21:59:30 +0000 Subject: [issue41748] HTMLParser: parsing error Message-ID: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> New submission from Ademar Nowasky Junior : HTML tags that have a attribute name starting with a comma character aren't parsed and break future calls to feed(). The problem occurs when such attribute is the second one or later in the HTML tag. Doesn't seems to affect when it's the first attribute. #POC: from html.parser import HTMLParser class MyHTMLParser(HTMLParser): def handle_starttag(self, tag, attrs): print("Encountered a start tag:", tag) parser = MyHTMLParser() #This is ok parser.feed('') #This breaks parser.feed('') #Future calls to feed() will not work parser.feed('') ---------- components: Library (Lib) messages: 376607 nosy: nowasky.jr priority: normal severity: normal status: open title: HTMLParser: parsing error type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 18:04:09 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 08 Sep 2020 22:04:09 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599602649.34.0.63593004292.issue41746@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > I know it's moot now, but still -- what benefit do we get from using a "standard" like ASDL? All our tooling for it is custom for Python only. I think there are other tools or implementations of Python that use standard parsers for our ASDL file. In any case, AFAIU we don't need to modify the current ASDL definition as it already has type information that we need. For instance: | Block(int blocknum, stmt* stmts) that says that stmts is a sequence of stmt objects, but unfortunately, this is translated as an "asdl_seq" type, losing the information that it can only contain stmt types. This is what I am planning to address here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 19:04:05 2020 From: report at bugs.python.org (Ademar Nowasky Junior) Date: Tue, 08 Sep 2020 23:04:05 +0000 Subject: [issue41748] HTMLParser: parsing error In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1599606245.83.0.564246000244.issue41748@roundup.psfhosted.org> Change by Ademar Nowasky Junior : ---------- type: crash -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 19:29:58 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 08 Sep 2020 23:29:58 +0000 Subject: [issue41743] Remove Unnecessarily Gendered Language from the Documentation In-Reply-To: <1599589438.49.0.900108913402.issue41743@roundup.psfhosted.org> Message-ID: <20200908232926.GG20309@ando.pearwood.info> Steven D'Aprano added the comment: On Tue, Sep 08, 2020 at 06:23:58PM +0000, David Williams wrote: > Steven, it sounds like we agree to the change proposal, which is to > remove gendered language from the documentation. What? Did you even read what I wrote? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 19:40:37 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 08 Sep 2020 23:40:37 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1599608437.82.0.0734080560159.issue19438@roundup.psfhosted.org> Change by Andr?s Delfino : ---------- keywords: +patch nosy: +adelfino nosy_count: 3.0 -> 4.0 pull_requests: +21235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22161 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 20:28:15 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 00:28:15 +0000 Subject: [issue41525] Python '--help' has corrupted text. In-Reply-To: <1597187988.07.0.0319767984896.issue41525@roundup.psfhosted.org> Message-ID: <1599611295.67.0.397169009431.issue41525@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +21236 pull_request: https://github.com/python/cpython/pull/22162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 20:28:26 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 00:28:26 +0000 Subject: [issue41525] Python '--help' has corrupted text. In-Reply-To: <1597187988.07.0.0319767984896.issue41525@roundup.psfhosted.org> Message-ID: <1599611306.74.0.645707648042.issue41525@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21237 pull_request: https://github.com/python/cpython/pull/22163 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 20:28:05 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 09 Sep 2020 00:28:05 +0000 Subject: [issue41525] Python '--help' has corrupted text. In-Reply-To: <1597187988.07.0.0319767984896.issue41525@roundup.psfhosted.org> Message-ID: <1599611285.98.0.399914317432.issue41525@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 58de1dd6a8677bd213802c19204b827cb7134695 by Serhiy Storchaka in branch 'master': bpo-41525: Make the Python program help ASCII-only (GH-21836) https://github.com/python/cpython/commit/58de1dd6a8677bd213802c19204b827cb7134695 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 20:41:11 2020 From: report at bugs.python.org (William Pickard) Date: Wed, 09 Sep 2020 00:41:11 +0000 Subject: [issue41525] Python '--help' has corrupted text. In-Reply-To: <1597187988.07.0.0319767984896.issue41525@roundup.psfhosted.org> Message-ID: <1599612071.26.0.435539274078.issue41525@roundup.psfhosted.org> Change by William Pickard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 20:46:48 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 00:46:48 +0000 Subject: [issue41525] Python '--help' has corrupted text. In-Reply-To: <1597187988.07.0.0319767984896.issue41525@roundup.psfhosted.org> Message-ID: <1599612408.77.0.531321181639.issue41525@roundup.psfhosted.org> miss-islington added the comment: New changeset 9171dc2827650a1a3c20dee994145e335befa00e by Miss Islington (bot) in branch '3.8': bpo-41525: Make the Python program help ASCII-only (GH-21836) https://github.com/python/cpython/commit/9171dc2827650a1a3c20dee994145e335befa00e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 20:47:56 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 00:47:56 +0000 Subject: [issue41525] Python '--help' has corrupted text. In-Reply-To: <1597187988.07.0.0319767984896.issue41525@roundup.psfhosted.org> Message-ID: <1599612476.46.0.522692249266.issue41525@roundup.psfhosted.org> miss-islington added the comment: New changeset 11a82c7220a29aa1cabd6a1b042742b44c9c9b91 by Miss Islington (bot) in branch '3.9': bpo-41525: Make the Python program help ASCII-only (GH-21836) https://github.com/python/cpython/commit/11a82c7220a29aa1cabd6a1b042742b44c9c9b91 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 21:09:29 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Sep 2020 01:09:29 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1599613769.54.0.882831120651.issue19438@roundup.psfhosted.org> Raymond Hettinger added the comment: I would support adding NoneType back to the types module. Am not sure why it was ever removed. It has a much reason to exists as types.FunctionType which is a clear, well-named short-cut for "type(lambda :None)". ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 21:32:52 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 09 Sep 2020 01:32:52 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1599615172.1.0.118332606947.issue19438@roundup.psfhosted.org> Andr?s Delfino added the comment: types.NoneType was removed here: https://github.com/python/cpython/commit/c9543e42330e5f339d6419eba6a8c5a61a39aeca#diff-0f021aec4e35b86a3160d44069dec997 The thing of adding NoneType to types that is somewhat unpleasing to me is that it's named exactly as the actual type. Seems confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 21:41:01 2020 From: report at bugs.python.org (mohamed koubaa) Date: Wed, 09 Sep 2020 01:41:01 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599615661.71.0.10997781579.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21238 pull_request: https://github.com/python/cpython/pull/22164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 21:43:01 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Sep 2020 01:43:01 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599615781.39.0.300954029052.issue41746@roundup.psfhosted.org> Raymond Hettinger added the comment: > I know it's moot now, but still -- what benefit do we get > from using a "standard" like ASDL? The "standard" part of it isn't important. AFAICT, ASDL has a low adoption rate and is not maintained. IMO, the part that matters is that ADSL was carefully balanced to be sufficiently expressive while keeping it easy to implement and easy to automatically translate into different languages. Presumably, this will not only help other Python implementations and third-party tooling, it will also make life easier for us in the long run. My understanding of the origin of ASDL is that it aspired to solve a common problem in language design where people commonly described their abstract syntax in way that was too tightly bound to underlying implementation language. This caused long-run problems when reimplementing in other languages and when trying to automatically update downstream tools that interoperate with the AST. In this regard, my personal experience with ASDL has been favorable. I view it as the JSON spec of the AST world, intentionally minimal yet expressive. That said, I think it failed to establish itself as a standard and almost no tooling was created for it. The original authors expected that ASDL would sit side-by-side with BNF and regex notation. That was a pipe dream. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 21:43:30 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Sep 2020 01:43:30 +0000 Subject: [issue41747] dataclasses: generated method's using the wrong qualname In-Reply-To: <1599597537.61.0.699248126431.issue41747@roundup.psfhosted.org> Message-ID: <1599615810.64.0.841460549046.issue41747@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 22:59:29 2020 From: report at bugs.python.org (mohamed koubaa) Date: Wed, 09 Sep 2020 02:59:29 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599620369.72.0.726996869902.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21239 pull_request: https://github.com/python/cpython/pull/22165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 23:28:57 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Sep 2020 03:28:57 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599622137.28.0.553760212701.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 3ff6975e2c0af0399467f234b2e307cc76efcfa9 by Mohamed Koubaa in branch 'master': bpo-1635741: port scproxy to multi-phase init (GH-22164) https://github.com/python/cpython/commit/3ff6975e2c0af0399467f234b2e307cc76efcfa9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 23:40:12 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 09 Sep 2020 03:40:12 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599622812.09.0.804054259987.issue41746@roundup.psfhosted.org> Guido van Rossum added the comment: I guess some of my gripes about ASDL have to do with our tooling. For example I find it annoying that the 'kind' enums overlap, so if I have a void* that I know points to an AST node I can't look at the kind to tell what it is. Anyway, regarding Pablo's proposal, I think that if we do it, we should do a full migration, not a piecemeal one. I think the vast majority of asdl_seq_GET calls are immediately preceded by a cast anyway, and the majority of asdl_seq_SET calls are in generated code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 23:56:25 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 09 Sep 2020 03:56:25 +0000 Subject: [issue41749] Little improve on imghdr library Message-ID: <1599623785.24.0.70056245504.issue41749@roundup.psfhosted.org> New submission from Emmanuel Arias : For the `what()` function, the `file` parameter is always needed. In despite of that users can use `h` for send a bytes stream to detect the kind of the image, the `file` parameter is need. Don't have sense ask for `file` parameter when this parameter will not any effect on the result of the `what` function. ---------- components: Library (Lib) messages: 376618 nosy: eamanu priority: normal severity: normal status: open title: Little improve on imghdr library type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 8 23:57:41 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 09 Sep 2020 03:57:41 +0000 Subject: [issue41749] Little improve on imghdr library In-Reply-To: <1599623785.24.0.70056245504.issue41749@roundup.psfhosted.org> Message-ID: <1599623861.81.0.635819756076.issue41749@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +21240 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 01:55:04 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Sep 2020 05:55:04 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599630904.87.0.480454251197.issue41746@roundup.psfhosted.org> Raymond Hettinger added the comment: That all makes sense (including the full migration). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 03:37:41 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Sep 2020 07:37:41 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1599637061.27.0.57995189533.issue19438@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the link. It looks like NoneType got inadvertently caught up in the sweep of names that had direct synonyms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 03:44:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Sep 2020 07:44:33 +0000 Subject: [issue41525] Python '--help' has corrupted text. In-Reply-To: <1597187988.07.0.0319767984896.issue41525@roundup.psfhosted.org> Message-ID: <1599637473.73.0.0927152048064.issue41525@roundup.psfhosted.org> STINNER Victor added the comment: xtreak: "serhiy , I can similar quotes present in Lib/pydoc_data/topics.py too which is autogenerated. Could this cause issues with pydoc too while reading topics?" If you consider that it is an issue, please open a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 03:48:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Sep 2020 07:48:46 +0000 Subject: [issue38447] test_multiprocessing_spawn: Dangling processes: {} on AMD64 RHEL7 Refleaks 3.7 In-Reply-To: <1570798904.01.0.669672054648.issue38447@roundup.psfhosted.org> Message-ID: <1599637726.48.0.629702841053.issue38447@roundup.psfhosted.org> STINNER Victor added the comment: Issue seen on x86 Windows7 3.8: https://buildbot.python.org/all/#/builders/270/builds/30 0:52:12 load avg: 6.48 [367/423/1] test_multiprocessing_spawn failed (env changed) (12 min 32 sec) Warning -- Dangling processes: {} I keep the issue closed since I spent a lot of time trying to reproduce it, and I failed. The failure looks rare and really hard to reproduce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 03:54:04 2020 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Sep 2020 07:54:04 +0000 Subject: [issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process In-Reply-To: <1573422795.72.0.548665383031.issue38762@roundup.psfhosted.org> Message-ID: <1599638044.18.0.124621786792.issue38762@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 04:00:16 2020 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Sep 2020 08:00:16 +0000 Subject: [issue40300] logging.Formatter crashes when default_msec_format is None. In-Reply-To: <1587031786.91.0.398301028125.issue40300@roundup.psfhosted.org> Message-ID: <1599638416.07.0.101491233962.issue40300@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 04:02:46 2020 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 09 Sep 2020 08:02:46 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1599638566.26.0.563620463945.issue35328@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 04:23:55 2020 From: report at bugs.python.org (Greg Lindahl) Date: Wed, 09 Sep 2020 08:23:55 +0000 Subject: [issue20468] resource module documentation is incorrect In-Reply-To: <1391208641.83.0.141932054107.issue20468@psf.upfronthosting.co.za> Message-ID: <1599639834.99.0.102852724974.issue20468@roundup.psfhosted.org> Greg Lindahl added the comment: I just tripped on the bug that the maxrss field is kilobytes on Linux and bytes on Darwin. I don't think referring to the C manpages is sufficient to prevent confusion. I don't actually use my package on a Mac, I just use Travis-CI to test it. ---------- nosy: +wumpus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 05:44:00 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 09 Sep 2020 09:44:00 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599644640.76.0.660536677978.issue41703@roundup.psfhosted.org> Ned Deily added the comment: Mark, PR 22151 needs to be merged to the 3.9 branch as well. You can add the "Needs backport to 3.9" label to the original PR. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 05:48:55 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 09 Sep 2020 09:48:55 +0000 Subject: [issue41726] Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat In-Reply-To: <1599320432.34.0.409671228483.issue41726@roundup.psfhosted.org> Message-ID: <1599644935.71.0.682013581311.issue41726@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 1e2f051a6127904cfee5f9e4021dd6e4a4d51c0f by Hai Shi in branch 'master': bpo-41726: Update the refcounts info of PyType_FromModuleAndSpec in refcounts.dat (GH-22112) https://github.com/python/cpython/commit/1e2f051a6127904cfee5f9e4021dd6e4a4d51c0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 05:48:58 2020 From: report at bugs.python.org (J Rt) Date: Wed, 09 Sep 2020 09:48:58 +0000 Subject: [issue41750] unpractical printing of datetimes by the interpreter Message-ID: <1599644937.99.0.824034115929.issue41750@roundup.psfhosted.org> New submission from J Rt : I think the way datetimes get printed by the interpreter is a bit unpractical. For example: datetime.datetime(2020, 9, 9, 8, 0, tzinfo=) The reason for the inpracticality is that this cannot be put right into python back: >>>datetime.datetime(2020, 9, 9, 8, 0, tzinfo=) File "", line 1 datetime.datetime(2020, 9, 9, 8, 0, tzinfo=) ^ SyntaxError: invalid syntax Would there be a way to make the output printed directly usable again in the interpreter? Printing datetime.datetime(2020, 9, 9, 8, 0, tzinfo=pytz.utc) for example, or something like that? ---------- components: Library (Lib) messages: 376626 nosy: jean.rblt priority: normal severity: normal status: open title: unpractical printing of datetimes by the interpreter type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 05:52:04 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 09 Sep 2020 09:52:04 +0000 Subject: [issue41750] unpractical printing of datetimes by the interpreter In-Reply-To: <1599644937.99.0.824034115929.issue41750@roundup.psfhosted.org> Message-ID: <1599645124.61.0.370133623562.issue41750@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 06:09:46 2020 From: report at bugs.python.org (Erez Zinman) Date: Wed, 09 Sep 2020 10:09:46 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict Message-ID: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> New submission from Erez Zinman : This bug occurs when copying/pickling an ordered-dict subtype that has default items. The initialization function that's returned is **not** `object.__new__` so the default items are set when the copied/pickled item is created. The problem I encountered is that when deleting an initial item, it appears in the copy. See the MWE below: ``` from collections import OrderedDict import copy class A(OrderedDict): def __init__(self): self['123'] = 123 a = A() del a['123'] copy.copy(a) # --> A([('123', 123)]) ``` This can cause other problems as well, because you don't assume that the class is re-initialized on deserialization/copy. ---------- components: Library (Lib) messages: 376627 nosy: erezinman priority: normal severity: normal status: open title: Error copying an instance of a subclass of OrderedDict type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 06:21:44 2020 From: report at bugs.python.org (Erez Zinman) Date: Wed, 09 Sep 2020 10:21:44 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599646904.13.0.158110957783.issue41751@roundup.psfhosted.org> Erez Zinman added the comment: Proposed solution - change OrderedDict's `__reduce_ex__ ` function. The code below works like expected if I override `__reduce_ex__` like so: ``` def __reduce_ex__(self, protocol): ret = list(super().__reduce_ex__(protocol)) ret[0] = type(self).__new__ ret[1] = type(self), return tuple(ret, ) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 07:03:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Sep 2020 11:03:39 +0000 Subject: [issue41750] unpractical printing of datetimes by the interpreter In-Reply-To: <1599644937.99.0.824034115929.issue41750@roundup.psfhosted.org> Message-ID: <1599649419.24.0.101468836976.issue41750@roundup.psfhosted.org> Serhiy Storchaka added the comment: The UTC timezone implementation in the stdlib works well: >>> import datetime >>> datetime.datetime(2020, 9, 9, 8, 0, tzinfo=datetime.timezone.utc) datetime.datetime(2020, 9, 9, 8, 0, tzinfo=datetime.timezone.utc) I guess you use a third-part implementation of the UTC timezone. In such case please report your issue to this implementation. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 07:18:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 09 Sep 2020 11:18:24 +0000 Subject: [issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore In-Reply-To: <1480592723.97.0.369129599105.issue28850@psf.upfronthosting.co.za> Message-ID: <1599650304.07.0.443856191612.issue28850@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 07:21:47 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Sep 2020 11:21:47 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599650507.35.0.781826767811.issue41751@roundup.psfhosted.org> Serhiy Storchaka added the comment: It would break the code which expect that __init__() be called (I do not know if there are much such code, but still). It also would not work with the original pure Python implementation of OrderedDict, which initializes the OrderedDict object in __init__(), not in __new__(). ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 07:24:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Sep 2020 11:24:39 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599650679.07.0.591833772451.issue41751@roundup.psfhosted.org> Serhiy Storchaka added the comment: So we are restricted by backward compatibility with the original pure Python implementation. Sometimes it is feasible to break backward compatibility, but there should be very good reasons for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 07:35:38 2020 From: report at bugs.python.org (Georg Brandl) Date: Wed, 09 Sep 2020 11:35:38 +0000 Subject: [issue28850] Regression in Python 3: Subclassing PrettyPrinter.format doesn't work anymore In-Reply-To: <1480592723.97.0.369129599105.issue28850@psf.upfronthosting.co.za> Message-ID: <1599651338.92.0.387970193191.issue28850@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 07:38:33 2020 From: report at bugs.python.org (Ademar Nowasky Junior) Date: Wed, 09 Sep 2020 11:38:33 +0000 Subject: [issue41748] HTMLParser: parsing error In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1599651513.13.0.431878379143.issue41748@roundup.psfhosted.org> Change by Ademar Nowasky Junior : ---------- type: security -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 08:31:05 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Sep 2020 12:31:05 +0000 Subject: [issue41749] Little improve on imghdr library In-Reply-To: <1599623785.24.0.70056245504.issue41749@roundup.psfhosted.org> Message-ID: <1599654665.86.0.48006376876.issue41749@roundup.psfhosted.org> Dong-hee Na added the comment: IMHO, those use cases are already intended. We can read such use case on test code but also documentation. It will break legacy usage. I am -1 on change the API signature. We should think deeply before changing this. ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 08:37:01 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Sep 2020 12:37:01 +0000 Subject: [issue41571] Implement thread-related commands in pdb In-Reply-To: <1597708081.91.0.301663763083.issue41571@roundup.psfhosted.org> Message-ID: <1599655021.95.0.811222637426.issue41571@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 08:37:53 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 09 Sep 2020 12:37:53 +0000 Subject: [issue41571] Implement thread-related commands in pdb In-Reply-To: <1597708081.91.0.301663763083.issue41571@roundup.psfhosted.org> Message-ID: <1599655073.01.0.0394685279112.issue41571@roundup.psfhosted.org> Dong-hee Na added the comment: I am +1 on this project :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 09:00:36 2020 From: report at bugs.python.org (Karel) Date: Wed, 09 Sep 2020 13:00:36 +0000 Subject: [issue41752] Wave shouldn't try to close an open file at all costs Message-ID: <1599656436.68.0.838572818257.issue41752@roundup.psfhosted.org> New submission from Karel : The standard `wave` library tries to close a file unconditionally. I believe this is wrong. >From the docs: Wave_write.close(): Make sure nframes is correct, and close the file if it was opened by wave. *This method is called upon object collection.* [...] This leads to problems when an exception is throw when a file is open. See the following MWE: ``` from io import BytesIO import wave audio_out = BytesIO() with wave.open(audio_out, "w") as file_out: raise Exception('aaa!') Error: # channels not specified ``` Even when I remove the context manager, so it shouldn't close the file automatically, it still does, the following: ``` file_out = wave.open(audio_out, "w") raise Exception('aaa!') ``` doesn't throw an error at me immediately, but when the file_out variable is running out of scope, I get a printout saying: `Exception ignored in: > [...] wave.Error: # channels not specified`. Expected behaviour: When I use a Wave_write object as a context manager, it tries to close the file unconditionally (as it does now). When I call `wave.open` manually, no automatic file closing is done. ---------- components: Library (Lib) messages: 376634 nosy: biosthezerg priority: normal severity: normal status: open title: Wave shouldn't try to close an open file at all costs type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 09:28:53 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 09 Sep 2020 13:28:53 +0000 Subject: [issue41571] Implement thread-related commands in pdb In-Reply-To: <1597708081.91.0.301663763083.issue41571@roundup.psfhosted.org> Message-ID: <1599658133.03.0.953263496074.issue41571@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 09:57:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Sep 2020 13:57:46 +0000 Subject: [issue41748] HTMLParser: parsing error In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1599659866.22.0.0213769977095.issue41748@roundup.psfhosted.org> STINNER Victor added the comment: HTML 5.2 specification says https://www.w3.org/TR/html52/syntax.html#elements-attributes "Attribute names must consist of one or more characters other than the space characters, U+0000 NULL, U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('), U+003E GREATER-THAN SIGN (>), U+002F SOLIDUS (/), and U+003D EQUALS SIGN (=) characters, the control characters, and any characters that are not defined by Unicode." It is confirmed in the "12.2 Parsing HTML documents" section of the "HTML Living Standard": """ 12.2.5.33 Attribute name state Consume the next input character: U+0009 CHARACTER TABULATION (tab) U+000A LINE FEED (LF) U+000C FORM FEED (FF) U+0020 SPACE U+002F SOLIDUS (/) U+003E GREATER-THAN SIGN (>) EOF Reconsume in the after attribute name state. U+003D EQUALS SIGN (=) Switch to the before attribute value state. ASCII upper alpha Append the lowercase version of the current input character (add 0x0020 to the character's code point) to the current attribute's name. U+0000 NULL This is an unexpected-null-character parse error. Append a U+FFFD REPLACEMENT CHARACTER character to the current attribute's name. U+0022 QUOTATION MARK (") U+0027 APOSTROPHE (') U+003C LESS-THAN SIGN (<) This is an unexpected-character-in-attribute-name parse error. Treat it as per the "anything else" entry below. Anything else Append the current input character to the current attribute's name. """ https://html.spec.whatwg.org/multipage/parsing.html#attribute-name-state I understand that "," *is* a legit character in a HTML attribute name. So "a," and ",a" *are* valid HTML attribute names. Do I understand correctly? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:04:59 2020 From: report at bugs.python.org (Erez Zinman) Date: Wed, 09 Sep 2020 14:04:59 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599660299.53.0.603196488048.issue41751@roundup.psfhosted.org> Erez Zinman added the comment: Looking at the implementation of `__init__` (https://github.com/python/cpython/blob/76553e5d2eae3e8a47406a6de4f354fe33ff370b/Lib/collections/__init__.py#L109), it seems that you can fix this bug while retaining backward compatibility if you would use `__new__` in the `__reduce__` function, followed by an `OrderedDict.__init__`. The difference is that you don't call `__class__.__init__`, but rather `OrderedDict.__init__`. Some thing like the following: def __reduce__(self): 'Return state information for pickling' inst_dict = vars(self).copy() for k in vars(OrderedDict()): inst_dict.pop(k, None) def initializer(): inst = __class__.__new__(__class__) OrderedDict.__init__(inst) return initializer, (), inst_dict or None, None, iter(self.items()) The items will "restored" later using the `odict_iter`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:06:40 2020 From: report at bugs.python.org (Erez Zinman) Date: Wed, 09 Sep 2020 14:06:40 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599660400.59.0.495493928216.issue41751@roundup.psfhosted.org> Erez Zinman added the comment: small correction: meant `self.__class__` in the above function. Also, it is based on https://github.com/python/cpython/blob/76553e5d2eae3e8a47406a6de4f354fe33ff370b/Lib/collections/__init__.py#L302 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:11:50 2020 From: report at bugs.python.org (Ademar Nowasky Junior) Date: Wed, 09 Sep 2020 14:11:50 +0000 Subject: [issue41748] HTMLParser: parsing error In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1599660710.49.0.202777393245.issue41748@roundup.psfhosted.org> Ademar Nowasky Junior added the comment: Yes, I understand that in the same way. Both are valid attr names. Maybe it's worth noting that Javascript has no problem handling this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:12:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Sep 2020 14:12:10 +0000 Subject: [issue41748] HTMLParser: parsing error In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1599660730.93.0.37644546306.issue41748@roundup.psfhosted.org> STINNER Victor added the comment: HTMLParser.check_for_whole_start_tag() uses locatestarttagend_tolerant regular expression to find the end of the start tag. This regex cuts the string at the first comma (","), but not if the comma is the first character of an attribute name * '
' => '
' => '
BUG The regex is quite complex: locatestarttagend_tolerant = re.compile(r""" <[a-zA-Z][^\t\n\r\f />\x00]* # tag name (?:[\s/]* # optional whitespace before attribute name (?:(?<=['"\s/])[^\s/>][^\s/=>]* # attribute name (?:\s*=+\s* # value indicator (?:'[^']*' # LITA-enclosed value |"[^"]*" # LIT-enclosed value |(?!['"])[^>\s]* # bare value ) (?:\s*,)* # possibly followed by a comma )?(?:\s|/(?!>))* )* )? \s* # trailing whitespace """, re.VERBOSE) endendtag = re.compile('>') The problem is that this part of the regex: #(?:\s*,)* # possibly followed by a comma The comma is not seen as part of the attribute name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:21:03 2020 From: report at bugs.python.org (pmp-p) Date: Wed, 09 Sep 2020 14:21:03 +0000 Subject: [issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout In-Reply-To: <1337960558.56.0.442179213708.issue14916@psf.upfronthosting.co.za> Message-ID: <1599661263.87.0.291736302681.issue14916@roundup.psfhosted.org> pmp-p added the comment: all PyRun_InteractiveOne* functions are also affected it is really annoying when implementing repl behaviour when embedding( use cases : pyodide, android, wasi ) But I think the correct patch is : - char *newtok = PyOS_Readline(stdin, stdout, tok->prompt); + char *newtok = PyOS_Readline(tok->fp? tok->fp : stdin, stdout, tok->prompt); ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:42:31 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Sep 2020 14:42:31 +0000 Subject: [issue41748] HTMLParser: parsing error In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1599662551.83.0.939590071021.issue41748@roundup.psfhosted.org> STINNER Victor added the comment: Also, there is no warning about security in the html.parser documentation? Is this module mature and maintained enough to be considered as reliable? Or should we warn users about possible issues on corner cases, and point to BeautilfulSoup for a more mature HTML parser? https://docs.python.org/dev/library/html.parser.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:44:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Sep 2020 14:44:21 +0000 Subject: [issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout In-Reply-To: <1337960558.56.0.442179213708.issue14916@psf.upfronthosting.co.za> Message-ID: <1599662661.33.0.605270613297.issue14916@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 10:47:01 2020 From: report at bugs.python.org (Ammar Askar) Date: Wed, 09 Sep 2020 14:47:01 +0000 Subject: [issue41688] Document how **= does not fall back on ** In-Reply-To: <1598990897.9.0.376254193992.issue41688@roundup.psfhosted.org> Message-ID: <1599662821.7.0.0025378593677.issue41688@roundup.psfhosted.org> Change by Ammar Askar : ---------- keywords: +patch nosy: +ammar2 nosy_count: 2.0 -> 3.0 pull_requests: +21241 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 11:20:27 2020 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 09 Sep 2020 15:20:27 +0000 Subject: [issue41748] HTMLParser: parsing error In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1599664827.96.0.666145053056.issue41748@roundup.psfhosted.org> Ezio Melotti added the comment: The html.parser follows the HTML 5 specs as closely as possible. There are a few corner cases where it behaves slightly differently but it's only while dealing with invalid markup, and the differences should be trivial and generally not worth the extra complexity to deal with them. In this case, if I recall correctly, the way the comma is handled is just a left-over from the previous version of the parser, that predates the HTML 5 specs. In tags like there was an ambiguous situation and parsing it was deemed a reasonable interpretation, so the comma was treated as an attribute separator (and there should be test cases for this). This likely caused the issue reported by the OP, and I think it should be fixed, even if technically it's a change in behavior and will break some of the tests. If I'm reading the specs[0] correctly: * should be parsed as , and * should be parsed as , where ',baz' is the attribute name > Also, there is no warning about security in the html.parser documentation? I'm not aware of any specific security issues, since html.parser just implements the parser described by the HTML 5 specs. If there are any security issues caused by divergences from the specs, they should be fixed. I'm not sure why a warning would be needed. > Is this module mature and maintained enough to be considered as reliable? Even though it hasn't been updated to the latest version of the specs (5.2 at the time of writing), it has been updated to implement the parsing rules described by the HTML 5 specs. I don't know if the parsing rules changed between 5.0 and 5.2. > Or should we warn users about possible issues on corner cases, and point to BeautilfulSoup for a more mature HTML parser? BeautifulSoup is built on top of html.parser (and can also use other parses, like lxml). BS uses the underlying parsers to parse the HTML, then builds the tree and provides, among other things, functions to search and edit it. When I upgraded html.parser to HTML 5 I worked with the author of BeautifulSoup (Leonard Richardson), to make sure that my changes were compatible with BS. We also discussed about some corner cases he found and other feature requests and issues he had with the old version of the parser. That said, a link to BS would be a nice addition, since it's a great library. [0] starting from https://www.w3.org/TR/html52/syntax.html#tokenizer-before-attribute-name-state ---------- nosy: +ezio.melotti stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 11:28:11 2020 From: report at bugs.python.org (Udi) Date: Wed, 09 Sep 2020 15:28:11 +0000 Subject: [issue40124] Clearer assertion error In-Reply-To: <1585654498.8.0.880221845215.issue40124@roundup.psfhosted.org> Message-ID: <1599665291.57.0.0320984823476.issue40124@roundup.psfhosted.org> Udi added the comment: I don't see anything in the documentation of drain() that states that it cannot be called from multiple tasks. I'm also not sure why this assertion is necessary. If self._drain_waiter is already set, could the other task just await on it? ---------- nosy: +udifuchs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 11:29:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Sep 2020 15:29:07 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599665347.64.0.691516593133.issue41751@roundup.psfhosted.org> Serhiy Storchaka added the comment: First, closures cannot be pickled. You have to pass self.__class__ as an argument. Second, it will break compatibility with older Python versions. Pickles created in new Python could not be unpickled in older Pythons. Third, it is the behavior which does not have precedents. Unpickling usually calls either just __new__() or both __new__() and __init__() of the same class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 11:57:24 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 Sep 2020 15:57:24 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599667044.56.0.876970721966.issue14243@roundup.psfhosted.org> Steve Dower added the comment: In general, if a bug here appears to be inactive, it's probably waiting on someone to volunteer to move it forward. Often merely posting to a thread is enough. For this case, I think the best thing we can probably do is change the default share mode for _all_ opens to include FILE_SHARE_DELETE. This would also help a number of other situations, as well as bringing the default Windows behaviour slightly more in line with how POSIX likes to do things. As far as I'm aware this would only be harmful in cases where people are trying to implicitly lock files on Windows by keeping an open handle, and are using a different code path on other platforms where that won't work. ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 12:31:35 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 16:31:35 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599669095.3.0.686334477238.issue41703@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21242 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 12:32:06 2020 From: report at bugs.python.org (Mark Shannon) Date: Wed, 09 Sep 2020 16:32:06 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1599669126.78.0.383275183009.issue41703@roundup.psfhosted.org> Mark Shannon added the comment: Thanks for the reminder. Tis' done. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 12:46:21 2020 From: report at bugs.python.org (Erez Zinman) Date: Wed, 09 Sep 2020 16:46:21 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599669981.81.0.335588549524.issue41751@roundup.psfhosted.org> Erez Zinman added the comment: The first argument can be remedied by creating a new method that deals with that (something like `def _new_init(cls)`, and passing the `cls` as argument). The third argument is not really an argument - there is a bug that needs a precedent to be solved. Concerning the second argument, I think it is only problematic when pickling in a new version of python and unpickling in an old one, and not vice versa (because the reduction from previous versions calls __init__). In the old->new direction, there wouldn't be much of a problem because the worst thing that happens, is that this bug could occur. If that doesn't satisfy you, I hope that this change can be made in the future, when a version that allows such a lack of backward-compatibility is released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 12:57:08 2020 From: report at bugs.python.org (Erez Zinman) Date: Wed, 09 Sep 2020 16:57:08 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599670628.49.0.498575787725.issue41751@roundup.psfhosted.org> Erez Zinman added the comment: Just to be clear, what I did is (works with both "copy" and "pickle"): ``` def _new_and_init(cls): inst = cls.__new__(cls) OrderedDict.__init__(inst) return inst class A(OrderedDict): def __reduce__(self): # This fixes a bug in Python 3.6 ret = list(super().__reduce__()) ret[0] = _new_and_init ret[1] = (self.__class__, ) return tuple(ret) ``` And that works... I also verified that indeed old->new pickling will just call _init__ on unpickling, so this would just retain the previous behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 13:04:01 2020 From: report at bugs.python.org (Chary Chary) Date: Wed, 09 Sep 2020 17:04:01 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599671041.51.0.679478842196.issue14243@roundup.psfhosted.org> Chary Chary added the comment: Steve Dower, thanks for looking at this. After reading the thread from my amature point of view I kind of liked suggestion of Daniel Lenski to replace the binary delete argument of the current NamedTemporaryFile implementation with finer-grained options https://bugs.python.org/issue14243#msg164369 This would also take care of the comment from Dave Abrahams, that <> https://bugs.python.org/issue14243#msg155457 As for your comment to include FILE_SHARE_DELETE. If the decision is taken to go this path, shall we also not include FILE_SHARE_READ and FILE_SHARE_WRITE? https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 13:20:04 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Sep 2020 17:20:04 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599672004.53.0.0360346841628.issue41751@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 13:41:08 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Sep 2020 17:41:08 +0000 Subject: [issue41751] Error copying an instance of a subclass of OrderedDict In-Reply-To: <1599646186.11.0.087964047368.issue41751@roundup.psfhosted.org> Message-ID: <1599673268.92.0.573273406851.issue41751@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not think there is a bug. If we ever decide to change the behavior, the changes can only go in future Python version. And if we decide to make changes, I think that it would be better to make the pure Python implementation using __new__() instead of __init__() and make __reduce__() using copyreg.__newobj__. ---------- type: behavior -> enhancement versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 13:54:01 2020 From: report at bugs.python.org (Kaushik G) Date: Wed, 09 Sep 2020 17:54:01 +0000 Subject: [issue41753] subprocess.run on windows does not convert path to string Message-ID: <1599674041.89.0.322905352297.issue41753@roundup.psfhosted.org> New submission from Kaushik G : a call of the form `subprocess.run([x, y, z])` where one of the elements is a `pathlib.Pat`h fails on windows because the path is not converted to a string as it should. This works fine (as expected) on macOS and Linux. A typical error message is: `TypeError: argument of type 'WindowsPath' is not iterable` ---------- components: Windows messages: 376651 nosy: kaushik.ghose, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.run on windows does not convert path to string type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 14:01:45 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 18:01:45 +0000 Subject: [issue41688] Document how **= does not fall back on ** In-Reply-To: <1598990897.9.0.376254193992.issue41688@roundup.psfhosted.org> Message-ID: <1599674505.47.0.543704731095.issue41688@roundup.psfhosted.org> miss-islington added the comment: New changeset 46bc21e1780016aaacd34e472f838dc792fb674c by Ammar Askar in branch '3.9': [3.9] bpo-41688: Document bug in **= dispatching in the language data? (GH-22172) https://github.com/python/cpython/commit/46bc21e1780016aaacd34e472f838dc792fb674c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 14:01:57 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 18:01:57 +0000 Subject: [issue41688] Document how **= does not fall back on ** In-Reply-To: <1598990897.9.0.376254193992.issue41688@roundup.psfhosted.org> Message-ID: <1599674517.4.0.797573776412.issue41688@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21243 pull_request: https://github.com/python/cpython/pull/22175 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 14:07:45 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 09 Sep 2020 18:07:45 +0000 Subject: [issue41753] subprocess.run on windows does not convert path to string In-Reply-To: <1599674041.89.0.322905352297.issue41753@roundup.psfhosted.org> Message-ID: <1599674865.44.0.361761270775.issue41753@roundup.psfhosted.org> Eric V. Smith added the comment: Among others, see: issue 41649 issue 31961 In general, I think the consensus is that the caller should convert each argument to a string. It's not subprocess's job to convert each parameter to a string. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 14:12:26 2020 From: report at bugs.python.org (Kaushik G) Date: Wed, 09 Sep 2020 18:12:26 +0000 Subject: [issue41753] subprocess.run on windows does not convert path to string In-Reply-To: <1599674041.89.0.322905352297.issue41753@roundup.psfhosted.org> Message-ID: <1599675146.08.0.185776701964.issue41753@roundup.psfhosted.org> Kaushik G added the comment: Thank you for your response. There are two concerns I have here. 1. Python's promise of being straightforward. In MOST cases pathlib.Path objects do the right thing, casting to a string such that pathlib.Path is a drop in replacement. This exception is unexpected. 2. Cross platform consistency. Looks like this works on macOS and Linux. Why should it fail on Windows? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 14:15:56 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 18:15:56 +0000 Subject: [issue41688] Document how **= does not fall back on ** In-Reply-To: <1598990897.9.0.376254193992.issue41688@roundup.psfhosted.org> Message-ID: <1599675356.85.0.565885351522.issue41688@roundup.psfhosted.org> miss-islington added the comment: New changeset 4c4c354de2c9a290afbd4e5fcba07e3696ca0396 by Miss Islington (bot) in branch '3.8': [3.8] [3.9] bpo-41688: Document bug in **= dispatching in the language data? (GH-22172) (GH-22175) https://github.com/python/cpython/commit/4c4c354de2c9a290afbd4e5fcba07e3696ca0396 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 14:16:16 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 09 Sep 2020 18:16:16 +0000 Subject: [issue41688] Document how **= does not fall back on ** In-Reply-To: <1598990897.9.0.376254193992.issue41688@roundup.psfhosted.org> Message-ID: <1599675376.31.0.0508787402506.issue41688@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 14:36:45 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 09 Sep 2020 18:36:45 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599676605.1.0.690351196903.issue14243@roundup.psfhosted.org> Eryk Sun added the comment: > For this case, I think the best thing we can probably do is change the > default share mode for _all_ opens to include FILE_SHARE_DELETE. The C runtime doesn't provide a way to share delete access, except for the O_TEMPORARY flag, so Python would have to re-implement open(). Also, this doesn't help with re-opening a temporary file in another process since most programs do not share file delete access. There could be an option to enable a context-manager delete that's independent of closing the file. For example, if delete=True and delete_on_close=False, then _TemporaryFileCloser.close doesn't delete the file. Instead the file would be deleted via os.unlink in _TemporaryFileWrapper.__exit__. The default would be delete=True and delete_on_close=True, which would use the O_TEMPORARY flag in Windows. Combining delete=False with delete_on_close=True would raise a ValueError. > bringing the default Windows behaviour slightly more in line with > how POSIX likes to do things. In Windows 10, using FILE_SHARE_DELETE is even closer to POSIX behavior when the filesystem is NTFS, which supports POSIX delete semantics by renaming the file to a hidden system directory ("\$Extend\$Deleted") and setting its delete disposition. WinAPI DeleteFileW has been updated to use POSIX semantics if the filesystem supports it: >>> f = tempfile.NamedTemporaryFile() >>> h = msvcrt.get_osfhandle(f.fileno()) >>> os.unlink(f.name) >>> info = GetFileInformationByHandleEx(h, FileStandardInfo) >>> info['DeletePending'] True >>> GetFinalPathNameByHandle(h, 0) '\\\\?\\C:\\$Extend\\$Deleted\\001800000002C4F4301F419F' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 15:05:06 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 09 Sep 2020 19:05:06 +0000 Subject: [issue41753] subprocess.run on windows does not convert path to string In-Reply-To: <1599674041.89.0.322905352297.issue41753@roundup.psfhosted.org> Message-ID: <1599678306.23.0.811881191759.issue41753@roundup.psfhosted.org> Eryk Sun added the comment: The underlying subprocess.Popen class was updated in 3.8 to support path-like objects in `args` (with shell=False) and `executable` on Windows [1]. This change was not backported to 3.6 and 3.7. --- [1] https://docs.python.org/3/library/subprocess.html#subprocess.Popen ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 15:30:04 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 09 Sep 2020 19:30:04 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1599679804.88.0.849684150258.issue41687@roundup.psfhosted.org> miss-islington added the comment: New changeset fa8c9e70104b0aef966a518eb3a80a4881906ae0 by Jakub Kul?k in branch 'master': bpo-41687: Fix error handling in Solaris sendfile implementation (GH-22128) https://github.com/python/cpython/commit/fa8c9e70104b0aef966a518eb3a80a4881906ae0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:02:44 2020 From: report at bugs.python.org (Chary Chary) Date: Wed, 09 Sep 2020 20:02:44 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599681764.78.0.698799431877.issue14243@roundup.psfhosted.org> Chary Chary added the comment: Why do we need to use this O_TEMPORARY flag at all? I understand that we are using OS functionality, available on Windows, rather than implementing it in Python. But why doing this, if we already do this for none-nt systems in Python any way? Doesn't it just complicate the code? https://github.com/python/cpython/blob/fa8c9e70104b0aef966a518eb3a80a4881906ae0/Lib/tempfile.py#L423 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:14:56 2020 From: report at bugs.python.org (Thijs Damsma) Date: Wed, 09 Sep 2020 20:14:56 +0000 Subject: [issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC In-Reply-To: <1548316625.2.0.852101004839.issue35815@roundup.psfhosted.org> Message-ID: <1599682496.48.0.77667317226.issue35815@roundup.psfhosted.org> Change by Thijs Damsma : ---------- nosy: +tda versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:23:33 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 09 Sep 2020 20:23:33 +0000 Subject: [issue41428] PEP 604 -- Allow writing union types as X | Y In-Reply-To: <1595975550.94.0.895278514403.issue41428@roundup.psfhosted.org> Message-ID: <1599683013.88.0.941914932296.issue41428@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 1b4552c5e8e925f24c15f707050f22c977171125 by Maggie Moss in branch 'master': bpo-41428: Implementation for PEP 604 (GH-21515) https://github.com/python/cpython/commit/1b4552c5e8e925f24c15f707050f22c977171125 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:24:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 09 Sep 2020 20:24:35 +0000 Subject: [issue41428] PEP 604 -- Allow writing union types as X | Y In-Reply-To: <1595975550.94.0.895278514403.issue41428@roundup.psfhosted.org> Message-ID: <1599683075.89.0.9920125105.issue41428@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Now that PR 21515 is landed, we should consider what sections of the docs/spec needs to be updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:24:42 2020 From: report at bugs.python.org (Chary Chary) Date: Wed, 09 Sep 2020 20:24:42 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599683082.47.0.815680051895.issue14243@roundup.psfhosted.org> Chary Chary added the comment: I am not sure, this is the correct place to ask this "educational" question, but I will do this any way: where is this O_TEMPORARY flag defined? if I looks at [tempfile.py](https://github.com/python/cpython/blob/3ff6975e2c0af0399467f234b2e307cc76efcfa9/Lib/tempfile.py#L539) then appears, that it is defined in the os.py module. But in [os.py](https://github.com/python/cpython/blob/3ff6975e2c0af0399467f234b2e307cc76efcfa9/Lib/os.py) I can't find it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:27:43 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 09 Sep 2020 20:27:43 +0000 Subject: [issue38572] Misleading AttributeError accessing fileno attribute in tarfile In-Reply-To: <1571900132.35.0.991486656774.issue38572@roundup.psfhosted.org> Message-ID: <1599683263.79.0.920048866359.issue38572@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +21244 pull_request: https://github.com/python/cpython/pull/22178 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:47:11 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 09 Sep 2020 20:47:11 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599684431.07.0.355345240347.issue14243@roundup.psfhosted.org> Eryk Sun added the comment: > Why do we need to use this O_TEMPORARY flag at all? Using the O_TEMPORARY flag isn't necessary, but it's usually preferred because it ensures the file gets deleted even if the process is terminated abruptly. However, it opens the file with delete access, and most Windows programs don't share delete access for normal file opens. This can be worked around in Python code by using an opener that calls CreateFileW with delete-access sharing. But it can't be worked around in general. I prefer to provide a way to omit O_TEMPORARY, but still use it by default. When it's omitted, I'd also like to be able to close the file within the context block without deleting it, for which one use case is to reopen the file in a program that doesn't share read or write access. A new delete_on_close option would support this case, in addition to providing a way to omit the O_TEMPORARY flag. For example: with tempfile.NamedTemporaryFile(delete_on_close=False) as f: f.close() subprocess.run([cmd, f.name]) The file will still be deleted by the context manager, but the tradeoff is that it's not as reliable as the default delete-on-close behavior that uses the O_TEMPORARY flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 16:58:15 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 Sep 2020 20:58:15 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599685095.99.0.00396599697704.issue14243@roundup.psfhosted.org> Steve Dower added the comment: Issue41490 can also be fixed by using FILE_SHARE_DELETE on all opened files (and that's a release blocker, so we need to fix it somehow), and if DeleteFile has been updated as you suggest then it might even help with the "pip replacing its own script executable" issue. Nothing preventing someone from contributing the flag on open as well. There's definitely value there, but I think it's a workaround when we can make things Just Work more transparently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 17:22:03 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 09 Sep 2020 21:22:03 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599686523.72.0.0581911355833.issue14243@roundup.psfhosted.org> Eryk Sun added the comment: > Nothing preventing someone from contributing the flag on open as well. To be clear, supporting delete-access sharing would require re-implementing C _wopen in terms of CreateFileW, _open_osfhandle, etc. It could be implemented as _Py_wopen in Python/fileutils.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 17:27:13 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 09 Sep 2020 21:27:13 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599686833.66.0.828819243241.issue14243@roundup.psfhosted.org> Steve Dower added the comment: The comment you quoted was referring to the NamedTemporaryFile(do_not_delete) flag. Yes, we'd have to reimplement the UCRT function using the system API. Ultimately, it's not a great compatibility layer if you want to match POSIX semantics and not just the C specification, which is why we do it so often :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 18:14:18 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Wed, 09 Sep 2020 22:14:18 +0000 Subject: [issue19438] Where is NoneType in Python 3? In-Reply-To: <1383078691.36.0.6145513581.issue19438@psf.upfronthosting.co.za> Message-ID: <1599689658.94.0.658381284037.issue19438@roundup.psfhosted.org> Andr?s Delfino added the comment: ammar2 found this mail mentioning the changes in that commit https://mail.python.org/pipermail/python-dev/2007-November/075386.html "I've removed the 'new' module from py3k and also removed a lot of types from the 'types' module in py3k. It only contains types that aren't easily available through builtins." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 19:04:27 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 09 Sep 2020 23:04:27 +0000 Subject: [issue40564] Using zipfile.Path with several files prematurely closes zip In-Reply-To: <1588952821.29.0.991302590341.issue40564@roundup.psfhosted.org> Message-ID: <1599692667.65.0.531260314198.issue40564@roundup.psfhosted.org> Jason R. Coombs added the comment: In jaraco/zipp, I've implemented three of the options above: - https://github.com/jaraco/zipp/tree/bugfix/bpo-40564-option-1 - https://github.com/jaraco/zipp/tree/bugfix/bpo-40564-option-2 - https://github.com/jaraco/zipp/tree/bugfix/bpo-40564-option-5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 21:20:05 2020 From: report at bugs.python.org (Bug Reporter) Date: Thu, 10 Sep 2020 01:20:05 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599700805.53.0.52372678308.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: I don't know if it matters, but I started having this problem when I switched from Ubuntu 18.04 (native python3.7) to 20.04 (native python3.8.2). I specify --prefix to a folder in my home directory, but while running make test Ubuntu gives a system error which refers to Ubuntu's python. I don't know exactly at what test it happens, approximately in the middle, but it should not happen at all because the tests should only call the python compiled by me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 23:17:26 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 10 Sep 2020 03:17:26 +0000 Subject: [issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds In-Reply-To: <1491349378.03.0.0671954460373.issue29988@psf.upfronthosting.co.za> Message-ID: <1599707846.56.0.524372641148.issue29988@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 9 23:22:36 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Sep 2020 03:22:36 +0000 Subject: [issue40288] [subinterpreters] atexit module should not be loaded more than once per interpreter In-Reply-To: <1586917009.7.0.806642420762.issue40288@roundup.psfhosted.org> Message-ID: <1599708156.03.0.980187887563.issue40288@roundup.psfhosted.org> Dong-hee Na added the comment: @vstineer I'd like to update PR 19562 not to create more than one instance. if the PR is updated, would you like to review this PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 00:41:33 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Sep 2020 04:41:33 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599712893.86.0.544747839698.issue41672@roundup.psfhosted.org> Dong-hee Na added the comment: Please ping me when you submit the PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 02:15:31 2020 From: report at bugs.python.org (Tony DiLoreto) Date: Thu, 10 Sep 2020 06:15:31 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX Message-ID: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> New submission from Tony DiLoreto : The following code does not work on many OSX installations of Python via homebrew: >>> import webbrowser >>> webbrowser.open("http://www.google.com") And throws the following error stack trace: File "/usr/local/opt/python at 3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/webbrowser.py", line 26, in register register_standard_browsers() File "/usr/local/opt/python at 3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/webbrowser.py", line 551, in register_standard_browsers raw_result = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) File "/usr/local/opt/python at 3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/local/opt/python at 3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "/usr/local/opt/python at 3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 854, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/opt/python at 3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1702, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings' The only workaround right now is to modify webbrowser.py via the instructions here: https://github.com/jupyter/notebook/issues/3746#issuecomment-489259515. Thank you for resolving. ---------- components: Library (Lib), macOS messages: 376672 nosy: ned.deily, ronaldoussoren, tony.diloreto priority: normal severity: normal status: open title: Webbrowser Module Cannot Find xdg-settings on OSX type: crash versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 02:55:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Sep 2020 06:55:34 +0000 Subject: [issue40288] [subinterpreters] atexit module should not be loaded more than once per interpreter In-Reply-To: <1586917009.7.0.806642420762.issue40288@roundup.psfhosted.org> Message-ID: <1599720934.25.0.415080797054.issue40288@roundup.psfhosted.org> STINNER Victor added the comment: I would prefer a more generic solution, if possible: > bpo-40600: "Add an option to disallow creating more than one instance of a module". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 04:58:38 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Sep 2020 08:58:38 +0000 Subject: [issue40600] Add option to disallow > 1 instance of an extension module In-Reply-To: <1589235149.46.0.0630975096351.issue40600@roundup.psfhosted.org> Message-ID: <1599728318.55.0.674187467215.issue40600@roundup.psfhosted.org> Dong-hee Na added the comment: One of my opinions is that Since module object supports detecting error during Py_mod_exec, The only thing we have to do is return -1 when the module has already existed. we should define new exception type and don't have to define new slots. The pros of this method is that we don't have to modify module object and no needs to write the new PEP but the cons of this method is that we should promise the standard exception when try to create multiple instances which is not allowed. ref: https://github.com/python/cpython/blob/788b79fa7b6184221e68d4f1a3fbe0b3270693f6/Objects/moduleobject.c#L399 On the other side, defining a Py_mod_exec_once that supports execution for just once can be a way. Although the usage is little, it will be fine because the use case will exist. Please point out what I missed :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 05:58:37 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 09:58:37 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599731917.31.0.641722231326.issue41730@roundup.psfhosted.org> wyz23x2 added the comment: OK. What should the message be? "tkinter.tix is deprecated (and will be removed in Python 3.x), use tkinter.ttk instead"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 06:00:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Sep 2020 10:00:12 +0000 Subject: [issue40600] Add option to disallow > 1 instance of an extension module In-Reply-To: <1589235149.46.0.0630975096351.issue40600@roundup.psfhosted.org> Message-ID: <1599732012.09.0.864420155588.issue40600@roundup.psfhosted.org> STINNER Victor added the comment: One option is to get the behavior before multi-phase initialization. We store extensions in a list. Once it's load, it cannot be unloaded before we exit Python. See _PyState_AddModule() and _PyState_AddModule(). Calling PyInit_xxx() the second time would simply return the existing module object. When we exit Python, the clear and/or free function of the module is called. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 06:18:25 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 10 Sep 2020 10:18:25 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599733105.41.0.610886778715.issue41730@roundup.psfhosted.org> E. Paine added the comment: As I believe planning for removal (including the version this should occur in) is better suited to #31371, I think it would be best to remain non-committal about the version. I would personally prefer something a little more vague (such as below), though as I keep saying, this is just my opinion. DeprecationWarning: the tkinter.tix module is deprecated in favour of tkinter.ttk and is set to be removed in the near-future It *may* also be nice to clarify in the docs why Tix is deprecated (i.e. unmaintained), though I will leave this (like the deprecation message) at your discretion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 06:31:03 2020 From: report at bugs.python.org (Vaclav Slavik) Date: Thu, 10 Sep 2020 10:31:03 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1599733863.09.0.101362302809.issue41744@roundup.psfhosted.org> Vaclav Slavik added the comment: Thank you, I didn't consider that situation. I forced-pushed an update to the PR now. I opted for duplicate file rather than including, because I think it imposes the least maintenance burden on keeping compatibility: the other alternative would mean - one more file - either a more complicated logic or the primary file including the compat one (so "normal" path slightly more convoluted) - tiny, but not 100% trivial difference between python nuget and the other ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:24:23 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:24:23 +0000 Subject: [issue41370] PEP 585 and ForwardRef In-Reply-To: <1595448974.26.0.905372860878.issue41370@roundup.psfhosted.org> Message-ID: <1599737063.89.0.218677521597.issue41370@roundup.psfhosted.org> Change by wyz23x2 : ---------- keywords: +patch nosy: +wyz23x2 nosy_count: 6.0 -> 7.0 pull_requests: +21245 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:26:49 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:26:49 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599737209.23.0.202056222134.issue41730@roundup.psfhosted.org> Change by wyz23x2 : ---------- keywords: +patch pull_requests: +21246 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:28:59 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:28:59 +0000 Subject: [issue41370] PEP 585 and ForwardRef In-Reply-To: <1595448974.26.0.905372860878.issue41370@roundup.psfhosted.org> Message-ID: <1599737339.11.0.443979318041.issue41370@roundup.psfhosted.org> Change by wyz23x2 : ---------- pull_requests: -21245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:30:17 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:30:17 +0000 Subject: [issue41370] PEP 585 and ForwardRef In-Reply-To: <1595448974.26.0.905372860878.issue41370@roundup.psfhosted.org> Message-ID: <1599737417.22.0.985889696993.issue41370@roundup.psfhosted.org> Change by wyz23x2 : ---------- pull_requests: +21247 pull_request: https://github.com/python/cpython/pull/22186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:31:19 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:31:19 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599737479.06.0.578331331127.issue41730@roundup.psfhosted.org> wyz23x2 added the comment: @epaine The doc (https://docs.python.org/3/library/tkinter.tix.html) states "This Tk extension is unmaintained and should not be used in new code.". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:49:22 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:49:22 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599738562.45.0.747066350233.issue41730@roundup.psfhosted.org> wyz23x2 added the comment: All tests have passed. Now it's time to merge! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:52:55 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:52:55 +0000 Subject: [issue41370] PEP 585 and ForwardRef In-Reply-To: <1595448974.26.0.905372860878.issue41370@roundup.psfhosted.org> Message-ID: <1599738775.6.0.635822434909.issue41370@roundup.psfhosted.org> Change by wyz23x2 : ---------- pull_requests: -21247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:53:35 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:53:35 +0000 Subject: [issue41370] PEP 585 and ForwardRef In-Reply-To: <1595448974.26.0.905372860878.issue41370@roundup.psfhosted.org> Message-ID: <1599738815.75.0.876806491722.issue41370@roundup.psfhosted.org> Change by wyz23x2 : ---------- pull_requests: +21248 pull_request: https://github.com/python/cpython/pull/22186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 07:58:46 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 11:58:46 +0000 Subject: [issue41370] PEP 585 and ForwardRef In-Reply-To: <1595448974.26.0.905372860878.issue41370@roundup.psfhosted.org> Message-ID: <1599739126.16.0.179781838195.issue41370@roundup.psfhosted.org> Change by wyz23x2 : ---------- pull_requests: -21248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 08:22:11 2020 From: report at bugs.python.org (Stefan Krah) Date: Thu, 10 Sep 2020 12:22:11 +0000 Subject: [issue19521] Parallel build race condition on AIX since python-2.7 In-Reply-To: <1383840294.95.0.0890053719997.issue19521@psf.upfronthosting.co.za> Message-ID: <1599740531.37.0.105064039465.issue19521@roundup.psfhosted.org> Stefan Krah added the comment: I have been asked to backport this to 3.8. There's a very small window of opportunity: 3.8.6: Monday, 2020-09-21 3.8.7rc1: Monday, 2020-11-02 3.8.7: Monday, 2020-11-16 (final version!) Backporting procedures since 3.8 are unclear and a source of constant friction, so most core developers seem to have stopped doing any backports at all. It is not a battle I'll choose, but if you get a second core dev to review this trivial patch I'll commit it. There's a simple solution for 3.8: Do not use the parallel build, the regular build takes around 4 min. For the buildbots you can ask the operator for a custom command line. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 08:33:32 2020 From: report at bugs.python.org (chen-y0y0) Date: Thu, 10 Sep 2020 12:33:32 +0000 Subject: [issue41716] SyntaxError: EOL while scanning string literal In-Reply-To: <1599221526.43.0.8824911096.issue41716@roundup.psfhosted.org> Message-ID: <1599741212.48.0.408029579024.issue41716@roundup.psfhosted.org> chen-y0y0 added the comment: Yep. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 08:35:16 2020 From: report at bugs.python.org (wyz23x2) Date: Thu, 10 Sep 2020 12:35:16 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599741316.79.0.347935924499.issue41730@roundup.psfhosted.org> wyz23x2 added the comment: Can any core reviewer review the PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 08:57:00 2020 From: report at bugs.python.org (Larry Hastings) Date: Thu, 10 Sep 2020 12:57:00 +0000 Subject: [issue41716] SyntaxError: EOL while scanning string literal In-Reply-To: <1599221526.43.0.8824911096.issue41716@roundup.psfhosted.org> Message-ID: <1599742620.75.0.754739389529.issue41716@roundup.psfhosted.org> Change by Larry Hastings : ---------- components: +Interpreter Core -Argument Clinic nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 09:22:00 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 10 Sep 2020 13:22:00 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599744120.2.0.661501152484.issue14243@roundup.psfhosted.org> Eryk Sun added the comment: > we'd have to reimplement the UCRT function using the system API. Could the implementation drop support for os.O_TEXT? I think Python 3 should have removed both os.O_TEXT and os.O_BINARY. 3.x has no need for the C runtime's ANSI text mode, with its Ctrl+Z behavior inherited from MS-DOS. I'd prefer that os.open always used _O_BINARY and raised a ValueError if passed any of the C runtime's text modes, including _O_TEXT, _O_WTEXT, _O_U16TEXT, and _O_U8TEXT. If _O_TEXT is supported, then we have to copy the C runtime's behavior, which truncates a Ctrl+Z from the end of the file if it's opened with read-write access. If Unicode text modes are supported, then we have to read the BOM, which can involve opening the file twice if the caller doesn't request read access. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 09:48:12 2020 From: report at bugs.python.org (mohamed koubaa) Date: Thu, 10 Sep 2020 13:48:12 +0000 Subject: [issue40600] Add option to disallow > 1 instance of an extension module In-Reply-To: <1589235149.46.0.0630975096351.issue40600@roundup.psfhosted.org> Message-ID: <1599745692.52.0.107309146635.issue40600@roundup.psfhosted.org> mohamed koubaa added the comment: Something like this? ``` static PyObject *def; PyMODINIT_FUNC PyInit_mymod(void) { if (def == NULL) { def = PyModuleDef_Init(&mymod); } return def; } ``` Then add a flag to PyModuleDef to indicate it is already exec? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 09:55:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Sep 2020 13:55:18 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599746118.3.0.903298401372.issue41631@roundup.psfhosted.org> STINNER Victor added the comment: About subinterpreters. In Python 3.8, _ast.AST type is a static type: static PyTypeObject AST_type = {...}; In Python 3.9, it's now a heap type: static PyType_Spec AST_type_spec = {...}; state->AST_type = PyType_FromSpec(&AST_type_spec); In Python 3.8, the same _ast.AST type was shared by all interpreters. With my PR 21961, the _ast.AST type is a heap type but it is also shared by all interpreters. Compared to Python 3.8, PR 21961 has no regression related to subinterpreters. It's not better nor worse. The minor benefit is that _ast.AST is cleared at Python exit (see _PyAST_Fini()). While I would be nice to make _ast.AST per interpreter, it would be an *enhancement*. I consider that it can wait for Python 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 10:09:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Sep 2020 14:09:12 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599746952.88.0.407629210667.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset f76d894dc5d5facce1a6c1b71637f6a2b3f9fd2b by Mohamed Koubaa in branch 'master': bpo-1635741: Port cmath to multi-phase init (PEP 489) (GH-22165) https://github.com/python/cpython/commit/f76d894dc5d5facce1a6c1b71637f6a2b3f9fd2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 10:30:16 2020 From: report at bugs.python.org (Mark Roseman) Date: Thu, 10 Sep 2020 14:30:16 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1599748216.74.0.710032894892.issue37149@roundup.psfhosted.org> Change by Mark Roseman : ---------- pull_requests: +21249 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 10:48:38 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 10 Sep 2020 14:48:38 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type In-Reply-To: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> Message-ID: <1599749318.45.0.00541315119446.issue41052@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +21250 pull_request: https://github.com/python/cpython/pull/22189 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 11:42:02 2020 From: report at bugs.python.org (Mark Roseman) Date: Thu, 10 Sep 2020 15:42:02 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1599752522.26.0.502294322599.issue39107@roundup.psfhosted.org> Change by Mark Roseman : ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 12:32:53 2020 From: report at bugs.python.org (pmp-p) Date: Thu, 10 Sep 2020 16:32:53 +0000 Subject: [issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout In-Reply-To: <1337960558.56.0.442179213708.issue14916@psf.upfronthosting.co.za> Message-ID: <1599755573.85.0.0110266268526.issue14916@roundup.psfhosted.org> Change by pmp-p : ---------- versions: +Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 12:37:43 2020 From: report at bugs.python.org (Vladyslav Bondar) Date: Thu, 10 Sep 2020 16:37:43 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599755863.84.0.259219809701.issue41561@roundup.psfhosted.org> Vladyslav Bondar added the comment: This will help to solve it https://stackoverflow.com/questions/61568215/openssl-v1-1-1-ubuntu-20-tlsv1-no-protocols-available But in my case I've defined: MinProtocol = None ---------- nosy: +Vladyslav.Bondar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 12:47:27 2020 From: report at bugs.python.org (pmp-p) Date: Thu, 10 Sep 2020 16:47:27 +0000 Subject: [issue14916] PyRun_InteractiveLoop fails to run interactively when using a Linux pty that's not tied to stdin/stdout In-Reply-To: <1337960558.56.0.442179213708.issue14916@psf.upfronthosting.co.za> Message-ID: <1599756447.78.0.142732027759.issue14916@roundup.psfhosted.org> Change by pmp-p : ---------- pull_requests: +21251 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 13:33:40 2020 From: report at bugs.python.org (Benjamin Wood) Date: Thu, 10 Sep 2020 17:33:40 +0000 Subject: [issue17254] add thai encoding aliases to encodings.aliases In-Reply-To: <1361360924.27.0.663240022367.issue17254@psf.upfronthosting.co.za> Message-ID: <1599759220.65.0.731289879424.issue17254@roundup.psfhosted.org> Benjamin Wood added the comment: Bumping this again. I'd like to try and understand why this change can not or has not been approved. I added the technical info here to the github PR. Is there a shortage of reviewers? What can I do to help speed up the process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 14:22:05 2020 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 10 Sep 2020 18:22:05 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599762125.28.0.835555129811.issue41561@roundup.psfhosted.org> Skip Montanaro added the comment: @Vladyslav.Bondar I can't tell where you are suggesting MinProtocol should be set. I don't see that particular string in any .c, .h or .py file in the Python source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 16:04:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Sep 2020 20:04:30 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1599768270.31.0.792937769094.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 06d0b8b67e8aebd8fe4c34e97d6915c11f4afa30 by Mark Roseman in branch 'master': bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188) https://github.com/python/cpython/commit/06d0b8b67e8aebd8fe4c34e97d6915c11f4afa30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 16:04:44 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Sep 2020 20:04:44 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1599768284.63.0.913358959498.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21253 pull_request: https://github.com/python/cpython/pull/22192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 16:04:51 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Sep 2020 20:04:51 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1599768291.82.0.826315422967.issue37149@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21254 pull_request: https://github.com/python/cpython/pull/22193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 16:19:36 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 10 Sep 2020 20:19:36 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1599769176.7.0.609023954064.issue37149@roundup.psfhosted.org> miss-islington added the comment: New changeset 1b4bdb4cd71df6339da3f247516e0c642f40c37e by Miss Islington (bot) in branch '3.9': bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188) https://github.com/python/cpython/commit/1b4bdb4cd71df6339da3f247516e0c642f40c37e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 16:21:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Sep 2020 20:21:41 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1599769301.34.0.40623757803.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 8a30bdd21dff6d1957df135c9d0b9983a0f61228 by Miss Islington (bot) in branch '3.8': bpo-37149: Change Shipman tkinter link from archive.org to TkDocs (GH-22188) (#22193) https://github.com/python/cpython/commit/8a30bdd21dff6d1957df135c9d0b9983a0f61228 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 16:28:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Sep 2020 20:28:23 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1599769703.83.0.0702019522649.issue37149@roundup.psfhosted.org> Terry J. Reedy added the comment: The tkdocs pages load in less than a second rather than in several seconds, have the obsolete link lined out, and include a short explanatory note. So I made the replacement. Ned, please backport to 3.7 and 3.6 if still built nightly. ---------- resolution: -> fixed stage: patch review -> resolved versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 16:29:13 2020 From: report at bugs.python.org (Thomas Guettler) Date: Thu, 10 Sep 2020 20:29:13 +0000 Subject: [issue41755] Docs: Please remove `from distutils.core import setup` Message-ID: <1599769753.52.0.764816611922.issue41755@roundup.psfhosted.org> New submission from Thomas Guettler : Please remove this page or at least the code snippet containing `from distutils.core import setup` on this page: https://docs.python.org/3/distutils/setupscript.html There is the more up to date doc here: https://packaging.python.org/tutorials/packaging-projects/#creating-setup-py Quoting Zen o Py: There should be one-- and preferably only one --obvious way to do it. Thank you very much! ---------- messages: 376695 nosy: guettli priority: normal severity: normal status: open title: Docs: Please remove `from distutils.core import setup` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 18:56:28 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Sep 2020 22:56:28 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1599778588.65.0.0288752304547.issue41744@roundup.psfhosted.org> Steve Dower added the comment: Thanks! Just need a NEWS file (click Details next to the failed check for the helper app). Something like "Fixes automatic import of props file when using the Nuget package" would be good. (Also posted on the PR) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 18:58:48 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Sep 2020 22:58:48 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599778728.04.0.924025135292.issue14243@roundup.psfhosted.org> Steve Dower added the comment: We'd CreateFile the file and then immediately pass it to _open_osfhandle, which would keep the semantics the same apart from the share flags. I'm not entirely against getting rid of O_TEXT support, but haven't taken the time to think through the implications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 21:10:36 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 11 Sep 2020 01:10:36 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine Message-ID: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> New submission from Vladimir Matveev : Currently async functions are more expensive to use comparing to their sync counterparts. A simple microbenchmark shows that difference could be quite significant: ``` import time def f(a): if a == 0: return 0 return f(a - 1) async def g(a): if a == 0: return 0 return await g(a - 1) N = 100000 C = 200 t0 = time.time() for _ in range(N): f(C) t1 = time.time() for _ in range(N): try: g(C).send(None) except StopIteration: pass t2 = time.time() print(f"Sync functions: {t1 - t0} s") print(f"Coroutines: {t2 - t1} s") ``` Results from master on my machine: Sync functions: 2.8642687797546387 s Coroutines: 9.172159910202026 s NOTE: Due to viral nature of async functions their number in codebase could become quite significant so having hundreds of them in a single call stack is not something uncommon. One of reasons of such performance gap is that async functions always return its results via raising StopIteration exception which is not cheap. This can be avoided if in addition to `_PyGen_Send` always return result via exception we could have another function that will allow us to distinguish whether value that was returned from generator is a final result (return case) of whether this is yielded value. In linked PR I've added function `_PyGen_SendNoStopIteration` with this behavior and updated ceval.c and _asynciomodule.c to use it instead of `_PyGen_Send` which resulted in a measurable difference: Sync functions: 2.8861589431762695 s Coroutines: 5.730362176895142 s ---------- messages: 376698 nosy: v2m, yselivanov priority: normal severity: normal status: open title: Do not always use exceptions to return result from coroutine type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 21:11:41 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 11 Sep 2020 01:11:41 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599786701.47.0.791534134184.issue41756@roundup.psfhosted.org> Change by Vladimir Matveev : ---------- keywords: +patch pull_requests: +21255 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 21:32:52 2020 From: report at bugs.python.org (Giordon Stark) Date: Fri, 11 Sep 2020 01:32:52 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed Message-ID: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> New submission from Giordon Stark : Hi, this is my first issue, so I hope to try my best to explain the problem. Unfortunately, I cannot get an easy minimum-reproducible-example of this because I can only seem to invoke this behavior using pytest (6.0.1) on two tests of our code. First, let me explain the issue. AttributeError: 'NoneType' object has no attribute '_alive' Exception ignored in: ._cb at 0x1696c2a70> Traceback (most recent call last): File "/Users/kratsg/.virtualenvs/pyhf-dev/lib/python3.7/weakref.py", line 55, in _cb if self._alive: occurs sometimes. Not always (feels like a race condition) and occurs after pytest has finished, which indicates it must be hitting garbage-collect. The backtrace isn't as helpful as it seems to jump from our code straight to the callback (indicating a garbage-collect): /Users/kratsg/pyhf/tests/test_validation.py(1082)test_optimizer_stitching() -> pdf = pyhf.simplemodels.hepdata_like([50.0], [100.0], [10]) /Users/kratsg/pyhf/src/pyhf/simplemodels.py(64)hepdata_like() -> return Model(spec, batch_size=batch_size) /Users/kratsg/pyhf/src/pyhf/pdf.py(590)__init__() -> config=self.config, batch_size=self.batch_size /Users/kratsg/pyhf/src/pyhf/pdf.py(339)__init__() -> self.config.auxdata_order, /Users/kratsg/pyhf/src/pyhf/parameters/paramview.py(66)__init__() -> self._precompute() /Users/kratsg/pyhf/src/pyhf/parameters/paramview.py(78)_precompute() -> self.allpar_viewer, self.selected_viewer, self.all_indices /Users/kratsg/pyhf/src/pyhf/parameters/paramview.py(27)extract_index_access() -> index_selection = baseviewer.split(indices, selection=subviewer.names) /Users/kratsg/pyhf/src/pyhf/tensor/common.py(59)split() -> data = tensorlib.einsum('...j->j...', tensorlib.astensor(data)) /Users/kratsg/pyhf/src/pyhf/tensor/numpy_backend.py(268)einsum() -> return np.einsum(subscripts, *operands) <__array_function__ internals>(6)einsum() > /Users/kratsg/.virtualenvs/pyhf-dev/lib/python3.7/weakref.py(56)_cb() -> if self._alive: Essentially, inside weakref.py's _cb(), I tried to figure out what "self" was: (Pdb) self (Pdb) !arg and it seems like the evaluation of "self._alive" is doomed to fail as self is None. So meth comes in, we take it apart into obj and func, define an inner function _cb that closes over a weakref to a weakref to obj and registers that function to fire when the underlying object gets gc'd. However, there seems to be an assumption that "self" is not None by the time the callback is fired. ------------------------------------------------------- Steps to reproduce: Clone: https://github.com/scikit-hep/pyhf Set up virtual env/install: python3 -m pip install -e .[complete] Run pytest: pytest tests/test_validation.py -vvvv -k "test_optimizer_stitching[scipy-numpy or test_optimizer_stitching[minuit-numpy" -s ---------- components: macOS messages: 376699 nosy: kratsg, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: weakmethod's ref is deleted before weakref's garbage-collect callback is executed type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 21:38:14 2020 From: report at bugs.python.org (Giordon Stark) Date: Fri, 11 Sep 2020 01:38:14 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed In-Reply-To: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> Message-ID: <1599788294.78.0.3022941799.issue41757@roundup.psfhosted.org> Giordon Stark added the comment: This PR seems highly related: https://github.com/python/cpython/pull/18189. Not sure if it should be linked to this issue or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 10 22:07:38 2020 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 11 Sep 2020 02:07:38 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599790058.19.0.654648260486.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: Big +1 from me. This is something I always wanted to do myself (since the time of PEP 492 & 525 implementations) and I think this is a necessary change. It's great that this isn't just a C API UX improvement but also yields a big perf improvement. ---------- nosy: +Mark.Shannon, lukasz.langa, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 03:57:19 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 11 Sep 2020 07:57:19 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1599811039.95.0.862094569051.issue14243@roundup.psfhosted.org> Eryk Sun added the comment: > We'd CreateFile the file and then immediately pass it to > _open_osfhandle Unlike _wopen, _open_osfhandle doesn't truncate Ctrl+Z (0x1A) from the last byte when the flags value contains _O_TEXT | _O_RDWR. _wopen implements this to allow appending data in text mode. The implementation is based on GetFileType (skip pipes and character devices), _lseeki64, _read, and _chsize[_s]. O_TEXT (ANSI text mode) has to be supported for now, but it doesn't properly fit in Python 3. The io module opens files using the CRT's binary mode. It doesn't implement newline translation for bytes I/O. And io.TextIOWrapper doesn't support Ctrl+Z as a logical EOF marker. As long as it's supported, O_TEXT should be made the default in os.open (but not in msvcrt.open_osfhandle), independent of the CRT default fmode (i.e. _get_fmode and _set_fmode). Many callers already assume that's the case. For example, tempfile.mkstemp with text=True uses tempfile._text_openflags, which doesn't include os.O_TEXT. That assumption is currently wrong if _set_fmode(_O_BINARY) is called. Thankfully, Python has never documented support for the _O_WTEXT, _O_U16TEXT, and _O_U8TEXT Unicode text modes in os.open. To my knownledge, there is no reasonable way to reimplement these modes. The C runtime doesn't expose a public interface to modify a file's internal text and Unicode modes, and _open_osfhandle only supports ANSI text mode. If _Py_wopen is implemented, it will have to fail the Unicode (UTF-16 or UTF-8) modes with EINVAL. Even without _Py_wopen, I'd prefer to modify os.open to fail them because wrapping a Unicode-mode fd with io.FileIO doesn't function reliably. FileIO doesn't guarantee wchar_t aligned reads and writes, which the CRT requires in Unicode mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 04:09:02 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 11 Sep 2020 08:09:02 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599811742.93.0.168881724595.issue41756@roundup.psfhosted.org> Stefan Behnel added the comment: Big +1 from me, too, for the same reasons Yury gave. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 04:26:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Sep 2020 08:26:43 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599812803.19.0.271896139352.issue41756@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 04:29:13 2020 From: report at bugs.python.org (Tushar Sadhwani) Date: Fri, 11 Sep 2020 08:29:13 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow Message-ID: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> New submission from Tushar Sadhwani : turtledemo.colormixer crashes after (what i'm assuming) 1000 changes to the state of a color bar. # Error: PS C:\Users\tusha> python -m turtledemo.colormixer Fatal Python error: Cannot recover from stack overflow. Python runtime state: initialized Current thread 0x00000f74 (most recent call first): File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 2761 in coords File "", line 1 in coords File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 755 in _pointlist File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 3158 in _goto File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1826 in sety File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2662 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 3195 in _goto File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1826 in sety File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 583 in _bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1240 in bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 35 in setbgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 32 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2662 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 3195 in _goto File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1826 in sety File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 583 in _bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1240 in bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 35 in setbgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 32 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 583 in _bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1240 in bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 35 in setbgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 32 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2662 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 3195 in _goto File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1826 in sety File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 583 in _bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1240 in bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 35 in setbgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 32 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2662 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 3195 in _goto File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1826 in sety File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 583 in _bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1240 in bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 35 in setbgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 32 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2662 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2459 in pen File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2291 in fillcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 31 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 2662 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 3195 in _goto File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1826 in sety File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 562 in _update File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 583 in _bgcolor File "C:\Users\tusha\.pyenv\pyenv-win\versions\3.8.1-amd64\lib\turtle.py", line 1240 in bgcolor ... ---------- components: Demos and Tools messages: 376704 nosy: tusharsadhwani priority: normal severity: normal status: open title: turtledemo.colormixer crashes with a stack overflow type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:10:30 2020 From: report at bugs.python.org (Vladyslav Bondar) Date: Fri, 11 Sep 2020 09:10:30 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599815430.19.0.24282730613.issue41561@roundup.psfhosted.org> Vladyslav Bondar added the comment: This is about openssl configuration in Ubuntu. In the latest Ubuntu, they disabled TLS 1.0/1.1. So to enable it back there is a workaround (taken from StackOverflow): You should modify openssl config: /etc/ssl/openssl.cnf You need to add this to the beginning of your config file: openssl_conf = default_conf And then this to the end: [ default_conf ] ssl_conf = ssl_sect [ssl_sect] system_default = ssl_default_sect [ssl_default_sect] MinProtocol = None CipherString = DEFAULT:@SECLEVEL=1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:22:51 2020 From: report at bugs.python.org (Freek de Kruijf) Date: Fri, 11 Sep 2020 09:22:51 +0000 Subject: [issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there Message-ID: <1599816171.47.0.67185595118.issue41759@roundup.psfhosted.org> New submission from Freek de Kruijf : In a function definition I have the following piece of code: try: with open(requests,'rt') as f: tree = ElementTree.parse(f) On execution I got: Traceback (most recent call last): File "/srv/www/bin/web.py", line 362, in build_db() File "/srv/www/bin/web.py", line 58, in build_db db_builder.build_DB() File "/srv/www/bin/db_builder.py", line 190, in build_DB tree = ElementTree.parse(f) TypeError: parse() missing 1 required positional argument: 'source' There is an assignment for requests like requests = '..' + os.path.sep + "/etc/signatures.xml" This gives requests the value ..//etc/signatures.xml while the program runs in /srv/www/bin/ When I run the small python script like: import xml.etree.ElementTree as ElementTree with open('/srv/www/etc/signatures.xml','rt') as f: tree = ElementTree.parse(f) all is well. Apparently open(requests,'rt') does not raise an error. ---------- components: Extension Modules messages: 376706 nosy: f.de.kruijf priority: normal severity: normal status: open title: ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:28:52 2020 From: report at bugs.python.org (wyz23x2) Date: Fri, 11 Sep 2020 09:28:52 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599816532.47.0.706168293652.issue41730@roundup.psfhosted.org> wyz23x2 added the comment: Ping? We will miss 3.8.6/3.9.0rc2 if it's too late! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:30:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 09:30:03 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1599816603.26.0.5980865651.issue41631@roundup.psfhosted.org> STINNER Victor added the comment: > Compared to Python 3.8, PR 21961 has no regression related to subinterpreters. Oh. I forgot that static types cannot be modified (in Python, but it's possible in C). So my PR still changed the behavior compared to 3.8: --- import _testcapi import _ast res = _testcapi.run_in_subinterp("import _ast; _ast.AST.x = 1") if res != 0: raise Exception("bug") print(_ast.AST.x) --- On Python 3.8, this code snippet fails with: TypeError: can't set attributes of built-in/extension type '_ast.AST' On master, it is possible to modify or add an _ast.AST attribute. Since PR 21961 moves back to a global strange, Petr is correct that a subinterpreter can now modify the state of another subinterpreter the _ast.AST type. So I modified my PR 21961 to revert partially the change which converted AST_type type from a static type to a heap type. My PR 21961 converts AST_type back to a static type, to avoid these problems. Sadly, it makes _ast module incompatible with PEP 384, but the priority is to fix this 3rd regression. We can reconsider converting PEP 384 back to a heap type later, but we will have to be careful with not reintroducing all these bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:31:29 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Sep 2020 09:31:29 +0000 Subject: [issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there In-Reply-To: <1599816171.47.0.67185595118.issue41759@roundup.psfhosted.org> Message-ID: <1599816689.76.0.0648059287124.issue41759@roundup.psfhosted.org> Serhiy Storchaka added the comment: parse() is an instance method. It should be called as tree.parse(f) (where tree is an instance of ElementTree), not ElementTree.parse(f). ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:37:46 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 11 Sep 2020 09:37:46 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599817066.03.0.528606980323.issue41561@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: issue38815 also reported similar issue in test_min_max_version_mismatch. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:47:08 2020 From: report at bugs.python.org (Matthias Klose) Date: Fri, 11 Sep 2020 09:47:08 +0000 Subject: [issue41760] 3.8.6 rc1 documentation fails to build with sphinx 3.2.1 Message-ID: <1599817628.06.0.2679531144.issue41760@roundup.psfhosted.org> New submission from Matthias Klose : the 3.8.6 rc1 documentation fails to build with sphinx 3.2.1: [...] reading sources... [ 98%] whatsnew/3.1 reading sources... [ 98%] whatsnew/3.2 reading sources... [ 98%] whatsnew/3.3 reading sources... [ 98%] whatsnew/3.4 reading sources... [ 98%] whatsnew/3.5 reading sources... [ 99%] whatsnew/3.6 reading sources... [ 99%] whatsnew/3.7 reading sources... [ 99%] whatsnew/3.8 reading sources... [ 99%] whatsnew/changelog reading sources... [100%] whatsnew/index /<>/Doc/tools/extensions/pyspecific.py:245: RemovedInSphinx40Warning: PyModulelevel is deprecated. Please check the implementation of return PyModulelevel.run(self) /<>/Doc/tools/extensions/pyspecific.py:277: RemovedInSphinx40Warning: PyClassmember is deprecated. Please check the implementation of return PyClassmember.run(self) /<>/Doc/tools/extensions/pyspecific.py:289: RemovedInSphinx40Warning: PyClassmember is deprecated. Please check the implementation of return PyClassmember.run(self) /<>/Doc/tools/extensions/pyspecific.py:271: RemovedInSphinx40Warning: PyModulelevel is deprecated. Please check the implementation of return PyModulelevel.run(self) /<>/Doc/tools/extensions/pyspecific.py:283: RemovedInSphinx40Warning: PyClassmember is deprecated. Please check the implementation of return PyClassmember.run(self) /<>/Doc/tools/extensions/pyspecific.py:302: RemovedInSphinx40Warning: PyClassmember is deprecated. Please check the implementation of return PyClassmember.run(self) Warning, treated as error: /<>/Doc/library/string.rst:311:duplicate token description of sign, other instance in library/functions make[1]: *** [Makefile:52: build] Error 2 ---------- components: Build messages: 376711 nosy: doko priority: normal severity: normal status: open title: 3.8.6 rc1 documentation fails to build with sphinx 3.2.1 versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 05:47:51 2020 From: report at bugs.python.org (Matthias Klose) Date: Fri, 11 Sep 2020 09:47:51 +0000 Subject: [issue41760] 3.8.6 rc1 documentation fails to build with sphinx 3.2.1 In-Reply-To: <1599817628.06.0.2679531144.issue41760@roundup.psfhosted.org> Message-ID: <1599817671.11.0.108549679035.issue41760@roundup.psfhosted.org> Change by Matthias Klose : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:28:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:28:20 +0000 Subject: [issue41025] C implementation of ZoneInfo cannot be subclassed In-Reply-To: <1592490411.18.0.433446521396.issue41025@roundup.psfhosted.org> Message-ID: <1599820100.97.0.124780753405.issue41025@roundup.psfhosted.org> STINNER Victor added the comment: Paul: What is the status of this issue? Is it already fixed? It is the release blocker priority. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:29:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:29:48 +0000 Subject: [issue41183] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures In-Reply-To: <1593614146.46.0.384684767233.issue41183@roundup.psfhosted.org> Message-ID: <1599820188.82.0.932872891053.issue41183@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.5.10 has been released, so I understand that this issue has been fixed. Thanks Christian Heimes for fixes ;-) ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:31:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:31:13 +0000 Subject: [issue40964] Connection to IMAP server cyrus.andrew.cmu.edu hangs In-Reply-To: <1591987386.88.0.623611449873.issue40964@roundup.psfhosted.org> Message-ID: <1599820273.52.0.715413292812.issue40964@roundup.psfhosted.org> STINNER Victor added the comment: The tests have been disabled, so I understand that the "release blocker" priority is no longer needed. It would be nice to reenable these tests, but I consider that it should not block the next 3.9 release. ---------- nosy: +vstinner priority: release blocker -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:34:01 2020 From: report at bugs.python.org (Larry Hastings) Date: Fri, 11 Sep 2020 10:34:01 +0000 Subject: [issue41183] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures In-Reply-To: <1593614146.46.0.384684767233.issue41183@roundup.psfhosted.org> Message-ID: <1599820441.37.0.560604223348.issue41183@roundup.psfhosted.org> Larry Hastings added the comment: Nope, it's not fixed. ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:37:24 2020 From: report at bugs.python.org (Dominik Schmid) Date: Fri, 11 Sep 2020 10:37:24 +0000 Subject: [issue41761] multiprocessing.Queue prevents program exit when containing a reasonable amount of data Message-ID: <1599820644.84.0.266224553021.issue41761@roundup.psfhosted.org> New submission from Dominik Schmid : Reproduction steps: run the attached queue_busted.py expected result: "done." is printed and the program terminates. actual result: "done." is printed and the program does not terminate. Documentation link for your convenience: https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.Queue.close The lowest to trigger the bug seems to be 1639 42's in the queue. If I put numpy.array([42]) into the queue instead of 42, I need much fewer items to trigger the bug. When q.close() is called explicitly, it always terminates but sometimes prints a BrokenPipeError. Reproduced on windows (Python 3.7.2) and Debian (Python 2.7.16). ---------- components: Library (Lib) files: queue_busted.py messages: 376716 nosy: Dominik Schmid priority: normal severity: normal status: open title: multiprocessing.Queue prevents program exit when containing a reasonable amount of data type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file49451/queue_busted.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:40:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:40:49 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1599820849.55.0.99618543438.issue39651@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch nosy: +vstinner nosy_count: 6.0 -> 7.0 pull_requests: +21256 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:45:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:45:24 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec Message-ID: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> New submission from STINNER Victor : https://travis-ci.com/github/python/cpython/jobs/383579366 Warning, treated as error: /home/travis/build/python/cpython/Doc/library/string.rst:311:duplicate token description of format_spec, other instance in reference/lexical_analysis ---------- assignee: docs at python components: Documentation messages: 376717 nosy: docs at python, vstinner priority: normal severity: normal status: open title: Documentation job fails on CIs: duplicate token description of format_spec versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:49:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:49:11 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599821351.78.0.754063522245.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: There are two format_spec definitions: "format_spec ::= [[fill]align][sign][#][0][width][grouping_option][.precision][type]" https://docs.python.org/dev/library/string.html#format-specification-mini-language "format_spec ::= (literal_char | NULL | replacement_field)*" https://docs.python.org/dev/reference/lexical_analysis.html#formatted-string-literals ---------- nosy: +BTaskaya, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:55:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:55:39 +0000 Subject: [issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8) In-Reply-To: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> Message-ID: <1599821739.06.0.574146261596.issue40746@roundup.psfhosted.org> STINNER Victor added the comment: gdb doesn't work fully when Python is built with -Og. I don't think that there is much that we can do. I suggest to skip test_gdb on 32-bit ARM when Python is built with -Og. I don't think that this regular requires the "release blocker" priority. It would be nice to fix but it should not hold the 3.9.0 final release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:56:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 10:56:49 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1599821809.42.0.257425154791.issue41490@roundup.psfhosted.org> STINNER Victor added the comment: The CI failed on the PR on the master branch: https://github.com/python/cpython/pull/21748 First, the Travis CI job didn't start. I closed/opened the issue: Travis CI ran. New issue: bpo-41762. Once bpo-41762 will be fixed, it should be possible to attempt again to merge this PR. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 06:57:11 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 11 Sep 2020 10:57:11 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599821831.3.0.0576839485154.issue41756@roundup.psfhosted.org> Stefan Behnel added the comment: Copying some of the design discussion from the PR here (https://github.com/python/cpython/pull/22196/files#r486730457), because it belongs into the ticket. Yury Selivanov proposed to add a new C-API function for this (naming changes by me): typedef enum {PYGEN_RETURN, PYGEN_ERROR, PYGEN_NEXT} PyGenSendStatus; PyGenSendStatus PyGen_Send(PyGenObject *gen, PyObject *arg, PyObject **result); Mark Shannon and I agreed that the status code should be the return value, with some confusion whether "PyGen_" or "PyCoro_" would be appropriate prefixes. Mark Shannon wrote: I don't think [the C-API function] should be public, as a possible further improvement is to stop passing exceptions through a side channel, but in result. Maybe we don't want to do that, but lets' not add to the (already rather large) C-API. However, I think this will be demanded and used by extensions, including Cython implemented ones, so it seems better to make them use a public function than a private one. Let's continue these lines of discussion here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 07:09:55 2020 From: report at bugs.python.org (Matthias Klose) Date: Fri, 11 Sep 2020 11:09:55 +0000 Subject: [issue41760] 3.8.6 rc1 documentation fails to build with sphinx 3.2.1 In-Reply-To: <1599817628.06.0.2679531144.issue41760@roundup.psfhosted.org> Message-ID: <1599822595.77.0.270432697974.issue41760@roundup.psfhosted.org> Change by Matthias Klose : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 07:16:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 11:16:19 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599822979.54.0.595404149875.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: I failed to reproduce the issue locally. I tried: cd Doc make clean make venv PYTHON=../python ./venv/bin/python -m pip install sphinx==2.2.0 blurb python-docs-theme make check suspicious html SPHINXOPTS="-q -W -j4" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 07:18:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 11:18:34 +0000 Subject: [issue41183] [3.5] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures In-Reply-To: <1593614146.46.0.384684767233.issue41183@roundup.psfhosted.org> Message-ID: <1599823114.32.0.408933873647.issue41183@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.5.10 is not the last 3.5 release? * https://devguide.python.org/#status-of-python-branches * https://www.python.org/dev/peps/pep-0478/ ---------- title: Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures -> [3.5] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 07:35:52 2020 From: report at bugs.python.org (Larry Hastings) Date: Fri, 11 Sep 2020 11:35:52 +0000 Subject: [issue41183] [3.5] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures In-Reply-To: <1593614146.46.0.384684767233.issue41183@roundup.psfhosted.org> Message-ID: <1599824152.22.0.998764678173.issue41183@roundup.psfhosted.org> Larry Hastings added the comment: It depends on whether or not I get any more fixes for the rest of the month. (Theoretically 3.5 support ends on Sep 13, but I decided to extend it to the end of the month.) I filed this on July 1, so it's already been two months, and the developer who would handle this has stopped replying. If I don't get a fix for this issue before the end of the month, then 3.5.10 will be the last release of 3.5 and this will simply go unfixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 07:42:37 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 11 Sep 2020 11:42:37 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1599824557.48.0.893839502609.issue35293@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +21257 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 07:46:45 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 11 Sep 2020 11:46:45 +0000 Subject: [issue31686] GZip library doesn't properly close files In-Reply-To: <1507074488.46.0.213398074469.issue31686@psf.upfronthosting.co.za> Message-ID: <1599824805.84.0.153816867131.issue31686@roundup.psfhosted.org> Irit Katriel added the comment: The documentation states that: Calling a GzipFile object?s close() method does not close fileobj, since you might wish to append more material after the compressed data. This also allows you to pass an io.BytesIO object opened for writing as fileobj, and retrieve the resulting memory buffer using the io.BytesIO object?s getvalue() method. (https://docs.python.org/3.8/library/gzip.html) It's reasonable that, since you opened the file, you would also be responsible for closing it. ---------- components: +Library (Lib) nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 07:50:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 11:50:50 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599825050.03.0.423682242798.issue41762@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +21258 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 08:07:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Sep 2020 12:07:33 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599826053.11.0.170562147433.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: Oh. It seems like the warning only occurs randomly!? It is gone on one of my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 08:13:42 2020 From: report at bugs.python.org (Freek de Kruijf) Date: Fri, 11 Sep 2020 12:13:42 +0000 Subject: [issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there In-Reply-To: <1599816689.76.0.0648059287124.issue41759@roundup.psfhosted.org> Message-ID: <3441773.HjUo2NBRHr@eiktum> Freek de Kruijf added the comment: Op vrijdag 11 september 2020 11:31:29 CEST schreef u: > Serhiy Storchaka added the comment: > > parse() is an instance method. It should be called as tree.parse(f) (where > tree is an instance of ElementTree), not ElementTree.parse(f). > > ---------- I have no idea how to make tree an instance. Reading the documentation, https://docs.python.org/2/library/xml.etree.elementtree.html, it shows as an example: import xml.etree.ElementTree as ET tree = ET.parse('country_data.xml') which is exactly what the program looks like and what my small python script does without an error. -- fr.gr. Freek de Kruijf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 08:18:31 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 11 Sep 2020 12:18:31 +0000 Subject: [issue31686] GZip library doesn't properly close files In-Reply-To: <1507074488.46.0.213398074469.issue31686@psf.upfronthosting.co.za> Message-ID: <1599826711.8.0.360719337673.issue31686@roundup.psfhosted.org> Irit Katriel added the comment: As for the bug you report - I was unable to reproduce it on windows (python 3.10) or linux (python 3.7). Can you check again to see if you still observe it, and give info on the system and python version if so? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 09:07:17 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 11 Sep 2020 13:07:17 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1599829637.02.0.0689121320472.issue41490@roundup.psfhosted.org> Jason R. Coombs added the comment: > I haven't yet figured out whether there's a convenient way for the reader to not keep the ZIP open for as long as it exists, but I think that's going to be the safest fix. You may be right here. I don't fully understand the repro, but it seems to me like you're trying to delete a zip file while you have resources open in that zip file. I think we need a separate issue to capture the underlying defect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 09:39:30 2020 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 11 Sep 2020 13:39:30 +0000 Subject: [issue41025] C implementation of ZoneInfo cannot be subclassed In-Reply-To: <1592490411.18.0.433446521396.issue41025@roundup.psfhosted.org> Message-ID: <1599831570.58.0.0932286628247.issue41025@roundup.psfhosted.org> Paul Ganssle added the comment: This is fixed in the 3.9 and master branches, it needs to be cherry-picked into the 3.9.0 release (at ?ukasz's discretion, of course). ?ukasz: If you cherry-pick GH-20965/GH-21876 into the 3.9.0 release, please also cherry-pick GH-21907/GH-21912, since that fixes the refleak. (PRs are listed as "master"/"backport" since I don't know your workflow). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 09:41:46 2020 From: report at bugs.python.org (Paul Moore) Date: Fri, 11 Sep 2020 13:41:46 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1599831706.36.0.0400671680427.issue41490@roundup.psfhosted.org> Paul Moore added the comment: I think this reproduces the underlying issue: >>> import zipfile >>> from pathlib import Path >>> p = zipfile.Path("tst.zip") >>> Path("tst.zip").unlink() Traceback (most recent call last): File "", line 1, in File "C:\Users\UK03306\AppData\Local\Programs\Python\Python38\lib\pathlib.py", line 1321, in unlink self._accessor.unlink(self) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'tst.zip' >>> Basically, zipfile.Path objects don't have any way to close the underlying zipfile, so you have to delete the path object to free up the file for deletion. In the context of importlib, maybe permanently holding a reference to the zipfile.Path object can't work, and it needs to be re-opened each time it's needed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 11:06:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Sep 2020 15:06:43 +0000 Subject: [issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there In-Reply-To: <1599816171.47.0.67185595118.issue41759@roundup.psfhosted.org> Message-ID: <1599836803.49.0.593828544987.issue41759@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was not clear what you do without code and full traceback. The example uses *function* parse() from *module* ElementTree. Your code seems uses *method* parse() of *class* ElementTree. https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.parse https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.ElementTree.parse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 11:37:15 2020 From: report at bugs.python.org (Mark Roseman) Date: Fri, 11 Sep 2020 15:37:15 +0000 Subject: [issue28694] tkinter interface to fontchooser In-Reply-To: <1479174800.7.0.200377827869.issue28694@psf.upfronthosting.co.za> Message-ID: <1599838635.85.0.849249594351.issue28694@roundup.psfhosted.org> Change by Mark Roseman : ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 11:39:13 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 11 Sep 2020 15:39:13 +0000 Subject: [issue41763] IDLE: scale font to Windows' "zoom" factor Message-ID: <1599838753.63.0.774381112035.issue41763@roundup.psfhosted.org> New submission from E. Paine : Following #33656, IDLE now "lies" to Windows and declares it has system DPI awareness to achieve a *sharper* look. System dpi is in effect: DPI_AWARENESS_UNAWARE * Windows' zoom factor Therefore, for IDLE to scale to the Windows' zoom/scale factor (System > Display > Scale and layout > Change the size of text, apps and other items), we need multiply the user's chosen font size by the zoom factor. Unfortunately I cannot quote the docs about the multiplication I gave above but have extensively tested and found this to hold true (the docs are not very explanatory but a link and small snippet can be found below): DPI_AWARENESS Return value DPI_AWARENESS_UNAWARE 96 DPI_AWARENESS_SYSTEM_AWARE The system DPI. [https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdpiforwindow] We can use the GetDpiForWindow function to get the system dpi and divide it by 96 (DPI_AWARENESS_UNAWARE) to get the scale factor for the font. This keeps IDLE sharp while allowing it to respect the user's scaling preferences. I was not intending for this to not be an option (it would happen on any Windows system unless the user digs through the source), though appreciate that it could cause a significant change on first-load. I considered adding this logic to the idlelib.run.fix_scaling method (which already modifies tkinter font size) but thought that users would not want this if their application was not set as DPI aware so settled on extending the idlelib.config.IdleConf.GetFont method instead. My motivation for this is that currently that the user has to manually change their font size to match their Windows zoom factor (IDLE, without the user changing their font size, remains the same size regardless of what setting the user chooses as their scale factor). I have prepared a branch if this change is something that would interest you Terry. Eryk, I have nosied you as I believe you are the person for Windows API calls (please do remove yourself if I am wrong). ---------- assignee: terry.reedy components: IDLE messages: 376733 nosy: epaine, eryksun, taleinat, terry.reedy priority: normal severity: normal status: open title: IDLE: scale font to Windows' "zoom" factor type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 12:00:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 11 Sep 2020 16:00:10 +0000 Subject: [issue24792] zipimporter masks import errors In-Reply-To: <1438764662.95.0.423222705195.issue24792@psf.upfronthosting.co.za> Message-ID: <1599840010.41.0.509189498879.issue24792@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch nosy: +iritkatriel nosy_count: 6.0 -> 7.0 pull_requests: +21259 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 12:04:43 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 11 Sep 2020 16:04:43 +0000 Subject: [issue24792] zipimporter masks import errors In-Reply-To: <1438764662.95.0.423222705195.issue24792@psf.upfronthosting.co.za> Message-ID: <1599840283.66.0.90940862081.issue24792@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) type: enhancement -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 13:12:58 2020 From: report at bugs.python.org (ali) Date: Fri, 11 Sep 2020 17:12:58 +0000 Subject: [issue41764] sub function would not work without the flags but the search would work fine Message-ID: <1599844378.36.0.50803589802.issue41764@roundup.psfhosted.org> New submission from ali : it would work like this sub("pattern","replace", txt, flags= re.IGNORECASE | re.DOTALL) but it wouldnt work like this sub("pattern","replace", txt, re.IGNORECASE | re.DOTALL) ---------- components: Regular Expressions messages: 376734 nosy: bayat, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: sub function would not work without the flags but the search would work fine versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 13:19:55 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 11 Sep 2020 17:19:55 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599844795.21.0.963040154854.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: If I understand proposed shape of API correctly - it was not supposed to return exception via "result" so contract for new `PyGen_Send` function is something like: Return value | result | Comment ----------------------------------------------------- PYGEN_RETURN | not NULL | Returned value PYGEN_NEXT | not NULL | Yielded value PYGEN_ERROR | NULL | Regular PyErr_* functions should be used to work with error case ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 14:10:33 2020 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 11 Sep 2020 18:10:33 +0000 Subject: [issue41764] sub function would not work without the flags but the search would work fine In-Reply-To: <1599844378.36.0.50803589802.issue41764@roundup.psfhosted.org> Message-ID: <1599847833.86.0.677813750366.issue41764@roundup.psfhosted.org> Matthew Barnett added the comment: The arguments are: re.sub(pattern, repl, string, count=0, flags=0). Therefore: re.sub("pattern","replace", txt, re.IGNORECASE | re.DOTALL) is passing re.IGNORECASE | re.DOTALL as the count, not the flags. It's in the documentation and the interactive help. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 14:31:13 2020 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 11 Sep 2020 18:31:13 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599849073.05.0.562657019044.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: @Mark > Mark Shannon wrote: I don't think [the C-API function] should be public, as a possible further improvement is to stop passing exceptions through a side channel, but in result. Maybe we don't want to do that, but lets' not add to the (already rather large) C-API. Yeah, we can add it as a "private" function, I'm not entirely opposed to that. But... it would be great if Cython and C code could still depend on it and use it. And then... why should it be private? The corresponding Python API "gen.send()" and "gen.throw()" is public, why can't the C API be public too? We will not fundamentally change generators (it would be a major backwards incompatible change), so committing to a good C API sounds reasonable. @Mark > Remember that PyIter_Next() is pretty much the same, though, and it has the standard "return PyObject*" interface. These two would diverge then. Maybe we should call it `_PyIter_Send()`? While `.send()` is mostly about coroutines, regular generators have the method too, and it would be weird to call `_PyCoro_Send` on a generator object. @Vladimir > PYGEN_ERROR | NULL | Regular PyErr_* functions should be used to work with error case Correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 17:09:28 2020 From: report at bugs.python.org (Freek de Kruijf) Date: Fri, 11 Sep 2020 21:09:28 +0000 Subject: [issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there In-Reply-To: <1599836803.49.0.593828544987.issue41759@roundup.psfhosted.org> Message-ID: <3021586.cYln7Jv3Xv@eiktum> Freek de Kruijf added the comment: Op vrijdag 11 september 2020 17:06:43 CEST schreef u: > Serhiy Storchaka added the comment: > > It was not clear what you do without code and full traceback. > > The example uses *function* parse() from *module* ElementTree. Your code > seems uses *method* parse() of *class* ElementTree. > > https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.Eleme > ntTree.parse > https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.Elem > entTree.ElementTree.parse I have very little knowledge about class, instance and the other specific terms used in Python. I just try to use a Python script, I found and need, and ran into this problem. What it does looks simple to me. As simple as the 3 line script I showed, which works. Why does the larger script give this confusing error about a missing argument, which is present? It is a file name or file object as it should. What I understand is that tree becomes an instance. Of what? Is the problem caused by using ElementTree in "import xml.etree.ElementTree as ElementTree". Should I use "import xml.etree.ElementTree as ET" and "tree = ET.parse(f)"? -- fr.gr. Freek de Kruijf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 17:44:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 21:44:50 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1599860690.79.0.650948328557.issue38240@roundup.psfhosted.org> Terry J. Reedy added the comment: Vitaly, when you repost to posts by email, please delete the post you are responding to, expect possible for a particular line. The full post is already here on the web page above the response, and a duplicate copy is just noise that wastes screen space. ---------- nosy: +terry.reedy versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 17:54:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 21:54:59 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1599861299.9.0.174736852268.issue38240@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:05:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 22:05:33 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1599861933.73.0.819647086066.issue27071@roundup.psfhosted.org> Terry J. Reedy added the comment: Issue 38240 was closed as a duplicate of this. After reconsidering, I agree with leaving the name alone. Changing test assertXXX method names is a big nuisance, which we have done enough of. If one is using IDLE, >>> unittest.TestCase.assertCountEqual( displays a boxed calltip with the signature and the two line summary that seems clear enough to me. Good names are good; so are good docstring summaries. ________________________________________________________________________ |(self, first, second, msg=None) | |Asserts that two iterables have the same elements, the same number of | |times, without regard to order. | ------------------------------------------------------------------------ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:09:00 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:09:00 +0000 Subject: [issue25330] Docs for pkgutil.get_data inconsistent with semantics In-Reply-To: <1444187174.4.0.432847594977.issue25330@psf.upfronthosting.co.za> Message-ID: <1599862140.95.0.784022713957.issue25330@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:09:18 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:09:18 +0000 Subject: [issue25330] Docs for pkgutil.get_data inconsistent with semantics In-Reply-To: <1444187174.4.0.432847594977.issue25330@psf.upfronthosting.co.za> Message-ID: <1599862158.41.0.585607078274.issue25330@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:09:38 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 22:09:38 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599862178.39.0.37785462369.issue41729@roundup.psfhosted.org> Terry J. Reedy added the comment: Steve, as author of the file and line in question, do you have any objection to changing it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:10:31 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:10:31 +0000 Subject: [issue25643] Python tokenizer rewriting In-Reply-To: <1447723653.14.0.424824913135.issue25643@psf.upfronthosting.co.za> Message-ID: <1599862231.51.0.911599280792.issue25643@roundup.psfhosted.org> Brett Cannon added the comment: @serhiy: did you still want to commit this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:16:35 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:16:35 +0000 Subject: [issue25509] PyImport_ImportModule inaccurately described In-Reply-To: <1446120404.56.0.248022316134.issue25509@psf.upfronthosting.co.za> Message-ID: <1599862595.43.0.238060929334.issue25509@roundup.psfhosted.org> Change by Brett Cannon : ---------- versions: +Python 3.10 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:16:27 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:16:27 +0000 Subject: [issue25509] PyImport_ImportModule inaccurately described In-Reply-To: <1446120404.56.0.248022316134.issue25509@psf.upfronthosting.co.za> Message-ID: <1599862587.93.0.192842886156.issue25509@roundup.psfhosted.org> Brett Cannon added the comment: https://github.com/python/cpython/blob/45b34a04a577aa49fa4825421758c3e8eaa1625d/Python/import.c#L1474-L1485 shows that the docs could be simplified to point out that `PyImport_ImportModule()` is a wrapper around `PyImport_Import()` which takes `const char *`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:16:56 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:16:56 +0000 Subject: [issue25509] PyImport_ImportModule inaccurately described In-Reply-To: <1446120404.56.0.248022316134.issue25509@psf.upfronthosting.co.za> Message-ID: <1599862616.15.0.630106049569.issue25509@roundup.psfhosted.org> Change by Brett Cannon : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:17:29 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:17:29 +0000 Subject: =?utf-8?q?=5Bissue25467=5D_Put_=E2=80=9Cdeprecated=E2=80=9D_warnings_firs?= =?utf-8?q?t?= In-Reply-To: <1445621003.26.0.876373693451.issue25467@psf.upfronthosting.co.za> Message-ID: <1599862649.02.0.00603009302182.issue25467@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:18:01 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:18:01 +0000 Subject: [issue25702] Link Time Optimizations support for GCC and CLANG In-Reply-To: <1448269180.86.0.895879966461.issue25702@psf.upfronthosting.co.za> Message-ID: <1599862681.58.0.0441673048532.issue25702@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:17:49 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 22:17:49 +0000 Subject: [issue25343] Document atomic operations on builtin types In-Reply-To: <1444318986.11.0.257913016756.issue25343@psf.upfronthosting.co.za> Message-ID: <1599862669.77.0.951834294481.issue25343@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:20:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 22:20:13 +0000 Subject: [issue41725] bz2 would use a dedicated exception for data error In-Reply-To: <1599301574.54.0.309033165254.issue41725@roundup.psfhosted.org> Message-ID: <1599862813.56.0.128789050759.issue41725@roundup.psfhosted.org> Terry J. Reedy added the comment: An OSError for a file the OS can read seems a bit off. What is the accompanying message? Would something like ValueError("bz2 compressor failed with BZ_DATA_ERROR") be better? Micha?, are there precedents or models for this in the other file compression modules? ---------- nosy: +serhiy.storchaka, terry.reedy versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 18:42:29 2020 From: report at bugs.python.org (Mark Summerfield) Date: Fri, 11 Sep 2020 22:42:29 +0000 Subject: [issue41765] XFCE task switcher shows 'Tk' insteadl of Window title Message-ID: <1599864149.95.0.416329554824.issue41765@roundup.psfhosted.org> New submission from Mark Summerfield : This tiny test application illustrates the problem: ```python #!/usr/bin/env python3 import tkinter as tk app = tk.Tk() app.withdraw() app.title('Test App') app.deiconify() app.mainloop() ``` When run on Linux with XFCE the task bar entry shows the text 'Test App', but the task switcher shows 'Tk' rather than the title text. ---------- components: Tkinter messages: 376745 nosy: mark priority: normal severity: normal status: open title: XFCE task switcher shows 'Tk' insteadl of Window title type: behavior versions: Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:05:31 2020 From: report at bugs.python.org (neonene) Date: Fri, 11 Sep 2020 23:05:31 +0000 Subject: [issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows Message-ID: <1599865531.82.0.625715596762.issue41766@roundup.psfhosted.org> New submission from neonene : On Python3.10(64bit only) for Windows, flake8 (with .pyc cache) frequently crashes after output. e.g: python -m flake8 c:/Python3/Lib/turtle.py python -m pyflakes c:/Python3/Lib/turtle.py I think I encountered the crash after PR21293 applied. (bpo-41194: "Convert _ast extension to PEP 489") ---------- components: Interpreter Core, Windows messages: 376747 nosy: neonene, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python3.10 (x64) crashes after flake8/pyflakes on Windows type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:05:18 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 23:05:18 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599865518.11.0.923754868655.issue41731@roundup.psfhosted.org> Terry J. Reedy added the comment: I verified with master on Win10 debug 32 build. The relevant lines, 147-151, are if verbose > 1: print('Output from test script %r:' % script_exec_args) print(repr(err)) print('Expected output: %r' % expected_msg) self.assertIn(expected_msg.encode('utf-8'), err) Normally, 'script_exec_args' is singular, the absolute file name to be executed. In the two failing cases, file 'name' is an import name, preceded by -m. Line 148 prints an informational header, when very verbose is requested, that only serves to identify the following lines. It is *not* tested. Therefore, we need not worry about the exact format, just avoiding a spurious error. The following is equivalent except when the value is a list (which should have been a tuple), when is prints without error: print(f'Output from test script {script_exec_args!r:}') "Output from test script ['-m', 'test_pkg']:" seems clear enough for any human reader. I ran entire suite with -vv and did not find any other new, unexpected errors. PR to follow shortly. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:11:47 2020 From: report at bugs.python.org (neonene) Date: Fri, 11 Sep 2020 23:11:47 +0000 Subject: [issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows In-Reply-To: <1599865531.82.0.625715596762.issue41766@roundup.psfhosted.org> Message-ID: <1599865907.19.0.192954303968.issue41766@roundup.psfhosted.org> Change by neonene : ---------- nosy: +pablogsal, vstinner -paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:12:04 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 23:12:04 +0000 Subject: [issue25682] __package__ not set to None under pdb in Python 3 In-Reply-To: <1448035339.32.0.969832659097.issue25682@psf.upfronthosting.co.za> Message-ID: <1599865924.75.0.613194179994.issue25682@roundup.psfhosted.org> Change by Brett Cannon : ---------- components: +Library (Lib) -Extension Modules nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:13:21 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 23:13:21 +0000 Subject: [issue26060] Class __dict__ iteration order changing due to type instance key-sharing In-Reply-To: <1452344171.87.0.895462140972.issue26060@psf.upfronthosting.co.za> Message-ID: <1599866001.19.0.790621745424.issue26060@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:15:20 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 23:15:20 +0000 Subject: [issue26007] Support embedding the standard library in an executable In-Reply-To: <1451923993.52.0.708853061063.issue26007@psf.upfronthosting.co.za> Message-ID: <1599866120.62.0.0312219861454.issue26007@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:15:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 23:15:32 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599866132.74.0.858345073078.issue41731@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21260 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:15:15 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 23:15:15 +0000 Subject: [issue26007] Support embedding the standard library in an executable In-Reply-To: <1451923993.52.0.708853061063.issue26007@psf.upfronthosting.co.za> Message-ID: <1599866115.77.0.510341100143.issue26007@roundup.psfhosted.org> Brett Cannon added the comment: Update: PEP 432 was withdrawn, so this issue is now languishing and not blocked on something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:16:03 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 23:16:03 +0000 Subject: [issue25912] Use __spec__.__name__ instead of __name__ in the docs where appropriate In-Reply-To: <1450564740.33.0.258115296695.issue25912@psf.upfronthosting.co.za> Message-ID: <1599866163.29.0.337819817079.issue25912@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:15:47 2020 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Sep 2020 23:15:47 +0000 Subject: [issue25963] strptime not parsing some timezones In-Reply-To: <1451291533.28.0.979317956785.issue25963@psf.upfronthosting.co.za> Message-ID: <1599866147.9.0.435321007134.issue25963@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:23:46 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 23:23:46 +0000 Subject: [issue41737] Improper NotADirectoryError when opening a file in a fake directory In-Reply-To: <1599492997.14.0.974001441191.issue41737@roundup.psfhosted.org> Message-ID: <1599866626.58.0.137654635365.issue41737@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Improper NotADirectoryError when opening a file under a fake directory -> Improper NotADirectoryError when opening a file in a fake directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:26:33 2020 From: report at bugs.python.org (Norbert Cyran) Date: Fri, 11 Sep 2020 23:26:33 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599866793.06.0.166264116897.issue41672@roundup.psfhosted.org> Change by Norbert Cyran : ---------- keywords: +patch pull_requests: +21261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:28:32 2020 From: report at bugs.python.org (Norbert Cyran) Date: Fri, 11 Sep 2020 23:28:32 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599866912.49.0.458660082258.issue41672@roundup.psfhosted.org> Norbert Cyran added the comment: @corona10 PR added: https://github.com/python/cpython/pull/22207 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:37:37 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 11 Sep 2020 23:37:37 +0000 Subject: [issue41742] Request for docs.python.org/3/library/configparser.html#exceptions improvement In-Reply-To: <1599554715.27.0.66152205525.issue41742@roundup.psfhosted.org> Message-ID: <1599867457.51.0.37977468992.issue41742@roundup.psfhosted.org> Terry J. Reedy added the comment: https://docs.python.org/3/library/configparser.html#exceptions, like similar sections for other module docs, lists and explains the non-builtin exceptions defined and used in the module. Functions in all modules can potentially raise various builtin exceptions, and some of these may be mentioned. They are all documented in a beginning chapter the library doc, which users are expected to be familiar with. That said, I vaguely remember at least some Exceptions sections beginning with some like 'Additional exceptions defined in this module.' If you or someone thinks it worthwhile enough to check other modules, using the left sidebar ToC, to find such examples, I will consider making a PR. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:42:54 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Sep 2020 23:42:54 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1599867774.74.0.898051325642.issue41490@roundup.psfhosted.org> Steve Dower added the comment: If you look at the PR into 3.9, it includes a test for this exact case. Start by copying that into 3.10 and then make it pass and everything should be good :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 19:45:48 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 11 Sep 2020 23:45:48 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599867948.19.0.874901337363.issue41729@roundup.psfhosted.org> Steve Dower added the comment: No objections. I'd guess it was a typo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 20:09:30 2020 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 12 Sep 2020 00:09:30 +0000 Subject: [issue41646] shutil.copy documentation should clarify support for path-like objects In-Reply-To: <1598522026.83.0.0983078348702.issue41646@roundup.psfhosted.org> Message-ID: <1599869370.56.0.147041483389.issue41646@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +21263 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 20:17:04 2020 From: report at bugs.python.org (Anthony Sottile) Date: Sat, 12 Sep 2020 00:17:04 +0000 Subject: [issue41767] KeyError exception is more difficult to read due to quoting Message-ID: <1599869824.76.0.302997879758.issue41767@roundup.psfhosted.org> New submission from Anthony Sottile : For example: >>> import pwd >>> pwd.getpwnam("test") Traceback (most recent call last): File "", line 1, in KeyError: "getpwnam(): name not found: 'test'" An improvement would be something which doesn't have the extra set of quotes such as: >>> import pwd >>> pwd.getpwnam("test") Traceback (most recent call last): File "", line 1, in KeyError: getpwnam(): name not found: 'test' I understand this is due to the `KeyError` repr, I wonder if something could be done to improve this (maybe a subclass of KeyError? maybe a new optional named-only argument to KeyError?) Seems there are others which could be improved here as well: >>> import unicodedata >>> unicodedata.lookup('zzz') Traceback (most recent call last): File "", line 1, in KeyError: "undefined character name 'zzz'" ---------- messages: 376754 nosy: Anthony Sottile priority: normal severity: normal status: open title: KeyError exception is more difficult to read due to quoting versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 20:18:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 00:18:28 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments In-Reply-To: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> Message-ID: <1599869908.77.0.158760042416.issue41745@roundup.psfhosted.org> Terry J. Reedy added the comment: Bound is created with 5 public attributes: >>> dir(bound) [..., 'apply_defaults', 'args', 'arguments', 'kwargs', 'signature'] >>> bound.args () >>> bound.arguments {} >>> bound.kwargs {} msg376578: I don't understand 'non-existent' arguments, Nor 'what happened...print... ignored' as there is no previous print. msg376590: Given " Changes in arguments will reflect in args and kwargs.", I agree that changes to 'arguments' *apparently* not being reflected in 'args' and 'kwargs' is initally a bit puzzling . >>> bound.kwargs == bound.arguments True >>> bound.arguments['something'] = 'guess' >>> bound.kwargs {} >>> bound.arguments {'something': 'guess'} However, your 'two' function takes no arguments, so valid values of args and kwargs must be empty for them to be used in a call. In all cases, args() and kwargs() must look at the signature to see which key-value pairs they should extract from arguments. >>> def f(a): pass >>> signature(f).bind() # Must pass value arguments Traceback (most recent call last): ... TypeError: missing a required argument: 'a' >>> b = signature(f).bind(3) >>> b.arguments {'a': 3} >>> b.args (3,) # Because 'a' is positional. >>> b.kwargs {} # Because 'a' is not keyword only. >>> b.arguments['a']=5 >>> b.args (5,) # Legitimate change reflected here. Perhaps the doc could be improved, but I have no particular suggestion. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 20:42:28 2020 From: report at bugs.python.org (Julian Berman) Date: Sat, 12 Sep 2020 00:42:28 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments In-Reply-To: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> Message-ID: <1599871348.82.0.535815523457.issue41745@roundup.psfhosted.org> Julian Berman added the comment: Not sure I agree with it being just a doc issue -- happy to clarify if something was unclear, not sure from your message if it was or if you disagree, but e.g.: > However, your 'two' function takes no arguments, so valid values of args and kwargs must be empty for them to be used in a call. In all cases, args() and kwargs() must look at the signature to see which key-value pairs they should extract from arguments. Right, and that's "dangerous" behavior to me -- BoundArguments.arguments will happily let you add arguments to it, but does no error checking at that point, so does not raise an exception if you typo an argument that isn't in the signature of the callable, and then when you try to call the callable (via the only way possible, namely using .args and .kwargs), that argument that was never added is just dropped. Does that make sense? Or were you disagreeing with that being undesirable behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:10:24 2020 From: report at bugs.python.org (melwitt) Date: Sat, 12 Sep 2020 01:10:24 +0000 Subject: [issue41768] unittest.mock spec calls class properties Message-ID: <1599873024.24.0.929930382889.issue41768@roundup.psfhosted.org> New submission from melwitt : When async magic method support was added to unittest.mock.Mock to address issue #26467, it introduced a getattr call [1] that causes class properties to be called when the class is used as a mock spec. This caused a problem for a test in my project when running with Python 3.8 where previously the test worked OK with Python 3.6. The test aims to verify that a class instance is not created if the called code path does not access the class property and thus the class will not create a heavy object unless it's needed (lazy create on access via @property). As of Python 3.8, the @property is always called and is called by the mock spec process itself, even though the code path being tested does not access the class @property. Here is a code snippet that illustrates the @property calling from the mock spec alone: class SomethingElse(object): def __init__(self): self._instance = None @property def instance(self): if not self._instance: self._instance = 'object' ... def test_property_not_called_with_spec_mock(self): obj = SomethingElse() self.assertIsNone(obj._instance) mock = Mock(spec=obj) self.assertIsNone(obj._instance) $ ./python -m unittest -v unittest.test.testmock.testmock.MockTest.test_property_not_called_with_spec_mock test_property_not_called_with_spec_mock (unittest.test.testmock.testmock.MockTest) ... FAIL ====================================================================== FAIL: test_property_not_called_with_spec_mock (unittest.test.testmock.testmock.MockTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vagrant/cpython/Lib/unittest/test/testmock/testmock.py", line 2173, in test_property_not_called_with_spec_mock self.assertIsNone(obj._instance) AssertionError: 'object' is not None [1] https://github.com/python/cpython/blob/fb2718720346c8c7a0ad2d7477f20e9a5524ea0c/Lib/unittest/mock.py#L492 ---------- components: Library (Lib) messages: 376757 nosy: melwitt priority: normal severity: normal status: open title: unittest.mock spec calls class properties type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:18:37 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 01:18:37 +0000 Subject: [issue41749] Allow omission of imghdr.what file arg if bytes are given In-Reply-To: <1599623785.24.0.70056245504.issue41749@roundup.psfhosted.org> Message-ID: <1599873517.24.0.329877720479.issue41749@roundup.psfhosted.org> Terry J. Reedy added the comment: The opening message confused me by using 'need' as 'currently required to call' rather than 'required to compute (test) and necessarily needed to call'; but after reading the code, I believe I understand and modified title to match. More simply, one could call what(h=b'...') after the change instead of what(None, b'...'). This is the change in the tests (but the old form must still be tested also). I don't see how the change would affect correct legacy use. (The TypeError to ValueError change is wrong, and I don't understand the other exception change.) However, what('') should get the same error as currently (see additional change in review). However, what is very problemmatic is requiring 1 of 2 different arguments. For range, the first parameter is really 'start_or_stop', an int either way, with the interpretation depending on the presence of a second. This is a nuisance for understanding, but a convenience in usage. But I think requiring an argument (usually) passed positionally or an argument that now has to be passed by keyword, with an arbitrary letter name, is worse and less justified. So my current view is that this change should be rejected. ---------- nosy: +terry.reedy title: Little improve on imghdr library -> Allow omission of imghdr.what file arg if bytes are given type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:21:14 2020 From: report at bugs.python.org (melwitt) Date: Sat, 12 Sep 2020 01:21:14 +0000 Subject: [issue41768] unittest.mock spec calls class properties In-Reply-To: <1599873024.24.0.929930382889.issue41768@roundup.psfhosted.org> Message-ID: <1599873674.75.0.355705622468.issue41768@roundup.psfhosted.org> Change by melwitt : ---------- keywords: +patch pull_requests: +21264 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22209 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:25:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 01:25:10 +0000 Subject: [issue41753] subprocess.run on windows does not convert path to string In-Reply-To: <1599674041.89.0.322905352297.issue41753@roundup.psfhosted.org> Message-ID: <1599873910.41.0.0281299621569.issue41753@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Can't pass Path like objects to subprocess api's on Windows. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:25:43 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 01:25:43 +0000 Subject: [issue41753] subprocess.run on windows does not convert path to string In-Reply-To: <1599674041.89.0.322905352297.issue41753@roundup.psfhosted.org> Message-ID: <1599873943.09.0.726349042631.issue41753@roundup.psfhosted.org> Terry J. Reedy added the comment: Also, 3.7 only get security patches. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:28:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 01:28:59 +0000 Subject: [issue41649] Can't pass Path like objects to subprocess api's on Windows. In-Reply-To: <1598538318.99.0.184680655713.issue41649@roundup.psfhosted.org> Message-ID: <1599874139.02.0.60593493633.issue41649@roundup.psfhosted.org> Terry J. Reedy added the comment: I closed #41753 as a duplicate of this. On that issue, Eryk Sun said "The underlying subprocess.Popen class was updated in 3.8 to support path-like objects in `args` (with shell=False) and `executable` on Windows [1]. This change was not backported to 3.6 and 3.7." The latter is because 3.6 and 3.7 only get security patches. Jani, please verify that this is still an issue with 3.8 and/or 3.9. ---------- nosy: +terry.reedy versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:31:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 01:31:54 +0000 Subject: [issue41755] Docs: Please remove `from distutils.core import setup` In-Reply-To: <1599769753.52.0.764816611922.issue41755@roundup.psfhosted.org> Message-ID: <1599874314.38.0.208289832678.issue41755@roundup.psfhosted.org> Terry J. Reedy added the comment: There is discussion on pydev about formally deprecating distutils, which would deprecate that snippet. ---------- nosy: +dstufft, eric.araujo, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:33:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 01:33:35 +0000 Subject: [issue41760] 3.8.6 rc1 documentation fails to build with sphinx 3.2.1 In-Reply-To: <1599817628.06.0.2679531144.issue41760@roundup.psfhosted.org> Message-ID: <1599874415.45.0.83402608879.issue41760@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:34:12 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 12 Sep 2020 01:34:12 +0000 Subject: [issue41768] unittest.mock spec calls class properties In-Reply-To: <1599873024.24.0.929930382889.issue41768@roundup.psfhosted.org> Message-ID: <1599874452.21.0.0953676578449.issue41768@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 21:57:05 2020 From: report at bugs.python.org (Martin Panter) Date: Sat, 12 Sep 2020 01:57:05 +0000 Subject: [issue41767] KeyError exception is more difficult to read due to quoting In-Reply-To: <1599869824.76.0.302997879758.issue41767@roundup.psfhosted.org> Message-ID: <1599875825.12.0.592706966424.issue41767@roundup.psfhosted.org> Martin Panter added the comment: Perhaps a duplicate of Issue 2651, closed because it was too hard to fix without breaking compatibility. ---------- nosy: +martin.panter superseder: -> Strings passed to KeyError do not round trip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 22:10:38 2020 From: report at bugs.python.org (Anthony Sottile) Date: Sat, 12 Sep 2020 02:10:38 +0000 Subject: [issue41767] KeyError exception is more difficult to read due to quoting In-Reply-To: <1599869824.76.0.302997879758.issue41767@roundup.psfhosted.org> Message-ID: <1599876638.62.0.271998083843.issue41767@roundup.psfhosted.org> Change by Anthony Sottile : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 22:12:36 2020 From: report at bugs.python.org (Anthony Sottile) Date: Sat, 12 Sep 2020 02:12:36 +0000 Subject: [issue2651] Strings passed to KeyError do not round trip In-Reply-To: <1208453081.65.0.886847251895.issue2651@psf.upfronthosting.co.za> Message-ID: <1599876756.17.0.120603669486.issue2651@roundup.psfhosted.org> Anthony Sottile added the comment: (I know this is old and closed but I've just run into the same thing with pwd.getpwnam in issue41767) KeyError: "getpwnam(): name not found: 'test'" would it be possible / make sense to extend `KeyError` with a named-only-argument which would preserve the raw string in this case? something like (yeah the name is probably not great, I haven't had time to think much about this) raise KeyError("getpwnam(): name not found 'test'", preserve_msg=True) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 22:38:08 2020 From: report at bugs.python.org (Rafael Guterres Jeffman) Date: Sat, 12 Sep 2020 02:38:08 +0000 Subject: [issue41769] Positional arguments which use store boolean actions do not behave as other actions. Message-ID: <1599878288.06.0.921718987462.issue41769@roundup.psfhosted.org> New submission from Rafael Guterres Jeffman : argparse allow the use of `store_true` and `store_false` for positional arguments, and although it is weird, it should be fine, but using either action raises a behavior I believe is wrong. Given the following Python code: ``` import argparse arg = argparse.ArgumentParser() arg.add_argument("opt", action="store_false") arg.parse_args(["-h"]) ``` The output is: ``` usage: t.py [-h] positional arguments: opt optional arguments: -h, --help show this help message and exit ``` Note that the positional argument is not shown in the `usage` line. When any string parameter is given, the result is: ``` usage: t.py [-h] t.py: error: unrecognized arguments: ``` (add to the end of the output the value of the argument.) Even if the use of a positional value is not the best way to describe boolean parameter (optional arguments provide a much better interface for such values), if argparse is to support positional boolean values they should work as other positional arguments. I'd suggest raising an error if store_true or store_false is used along with positional values. ---------- components: Library (Lib) messages: 376764 nosy: rjeffman priority: normal severity: normal status: open title: Positional arguments which use store boolean actions do not behave as other actions. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 22:58:31 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Sep 2020 02:58:31 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599879511.49.0.475519264296.issue41762@roundup.psfhosted.org> Dong-hee Na added the comment: >>> sphinx.__version__ '3.2.1 I can reproduce this issue consistantly on my local machine with this environment. ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 23:00:15 2020 From: report at bugs.python.org (chen-y0y0) Date: Sat, 12 Sep 2020 03:00:15 +0000 Subject: [issue41770] Import module doesn't updated Message-ID: <1599879614.84.0.25424318959.issue41770@roundup.psfhosted.org> New submission from chen-y0y0 : # I create a module: # \sys.path\xxx.py a = 9 # And: >>> import xxx >>> xxx.a 9 # I delete this imported module and modified this module: del xxx # \sys.path\xxx.py a = 9 b = 8 # And re-import: >>> import xxx >>> xxx.b # But: Traceback (most recent call last): File "", line 1, in AttributeError: type object 'xxx' has no attribute 'b' ---------- components: Windows messages: 376766 nosy: paul.moore, prasechen, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Import module doesn't updated type: resource usage versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 23:06:23 2020 From: report at bugs.python.org (pmp-p) Date: Sat, 12 Sep 2020 03:06:23 +0000 Subject: [issue41770] Import module doesn't updated In-Reply-To: <1599879614.84.0.25424318959.issue41770@roundup.psfhosted.org> Message-ID: <1599879983.39.0.651142074095.issue41770@roundup.psfhosted.org> pmp-p added the comment: Hi, you just need to call del sys.modules['xxx'] and have a look at https://docs.python.org/3.7/library/importlib.html#importlib.invalidate_caches before importing again ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 23:10:58 2020 From: report at bugs.python.org (pmp-p) Date: Sat, 12 Sep 2020 03:10:58 +0000 Subject: [issue41770] Import module doesn't updated In-Reply-To: <1599879614.84.0.25424318959.issue41770@roundup.psfhosted.org> Message-ID: <1599880258.38.0.862382449996.issue41770@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: -pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 23:13:21 2020 From: report at bugs.python.org (Bug Reporter) Date: Sat, 12 Sep 2020 03:13:21 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599880401.78.0.829258453654.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: I followed Vladyslav Bondar's 2020-09-11 09:10:30 recommendations and it worked: Tests result: SUCCESS Thank you. It is not clear though how Canonical built its python-3.8.2 which comes with Ubuntu-20.04. Does anyone know someone at Canonical to ask this question? ---------- versions: +Python 3.8 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 23:19:17 2020 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Sat, 12 Sep 2020 03:19:17 +0000 Subject: [issue41725] bz2 would use a dedicated exception for data error In-Reply-To: <1599301574.54.0.309033165254.issue41725@roundup.psfhosted.org> Message-ID: <1599880757.39.0.980004712646.issue41725@roundup.psfhosted.org> Micha? G?rny added the comment: > An OSError for a file the OS can read seems a bit off. What is the accompanying message? For example: OSError: Invalid data stream (I've just put random string into a file, and opened it as bzip2) > Would something like ValueError("bz2 compressor failed with BZ_DATA_ERROR") be better? It would be a partial improvement. However, it would also break backwards compatibility with code already catching OSError. It might be better to go with custom exception type derived from OSError to keep existing code working. > Micha?, are there precedents or models for this in the other file compression modules? Python 3.8 has introduced BadGzipFile in gzip module, to replace their OSError. lzma has used LZMAError from day one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 11 23:20:20 2020 From: report at bugs.python.org (chen-y0y0) Date: Sat, 12 Sep 2020 03:20:20 +0000 Subject: [issue41719] Why does not range() support decimals? In-Reply-To: <1599234850.47.0.91793785644.issue41719@roundup.psfhosted.org> Message-ID: <1599880820.09.0.447397757204.issue41719@roundup.psfhosted.org> Change by chen-y0y0 : ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 00:14:28 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 12 Sep 2020 04:14:28 +0000 Subject: [issue41770] Import module doesn't updated In-Reply-To: <1599879614.84.0.25424318959.issue41770@roundup.psfhosted.org> Message-ID: <1599884068.48.0.604814123761.issue41770@roundup.psfhosted.org> Steven D'Aprano added the comment: This is not a bug, it is working as designed. Importing takes the module from the cache. You can either delete the module from the cache: del sys.modules['modulename'] import modulename # reloads from the module file or possibly simpler, use reload: importlib.reload(modulename) ---------- components: +Interpreter Core -Windows nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed type: resource usage -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 00:16:45 2020 From: report at bugs.python.org (Mark Hammond) Date: Sat, 12 Sep 2020 04:16:45 +0000 Subject: [issue41771] bdist_wininst doesn't execute postinstall script Message-ID: <1599884205.28.0.064503063783.issue41771@roundup.psfhosted.org> New submission from Mark Hammond : install.c tries to dynamically load PyCFunction_New at https://github.com/python/cpython/blob/fb2718720346c8c7a0ad2d7477f20e9a5524ea0c/PC/bdist_wininst/install.c#L686 - however, since 3.8 this no longer exists - PyCFunction_New is a #define which calls PyCFunction_NewEx ---------- assignee: mhammond messages: 376771 nosy: mhammond priority: normal severity: normal status: open title: bdist_wininst doesn't execute postinstall script type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 00:19:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 04:19:00 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1599884340.13.0.82152962361.issue41758@roundup.psfhosted.org> Terry J. Reedy added the comment: I cannot reproduce on Win 10, 32bit repository debug builds, amd64 machine, with either current master or 3.8, started from command prompt in normal environment with same command. I also used installed 3.9 a bit. Are .pyenv and pyenv-win your names or do they mean something possibly relevant? I presume PS is PowerShell, which should not be relevant. Did you get the stack trace upon startup, or thereafter, without touching the app? If not, what did you do, in detail? One time crash or repeatable? Either way, please try current release. If we cannot reproduce, we cannot test a fix. In the stacktrace, each cycle begins with a mouse-move event, handled by eventfun, which wraps and calls the user function (here 'shift) with event.x, event.y. The relevant code is def shift(self, x, y): self.sety(max(0,min(y,1))) self._color[self.x] = self.ycor() self.fillcolor(self._color) setbgcolor() def setbgcolor(): screen.bgcolor(red.ycor(), green.ycor(), blue.ycor()) Both sety (move turtle to y) and bgcolor require an update __call__ into tcl/tk. These normally should return and the call stack back to eventfun unwound. Instead, it appears that new event handlings get added. I suspect something peculiar about your system. The line 'File "", line 1 in coords' is extremely odd, as it looks like an interactive injection of a command. However, the previous trace line is '...turtle.py", line 755 in _pointlist', referring to turtle line cl = self.cv.coords(item) where cv is a tkinter canvas, and the 2761 in the top trace is the line within the coords methods calling tk. So maybe is an anomaly related to stack exhaustion. Another possible factor is the turtle _items list. It can grow, but I am not familiar with turtle internals. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 00:26:53 2020 From: report at bugs.python.org (Mark Hammond) Date: Sat, 12 Sep 2020 04:26:53 +0000 Subject: [issue41771] bdist_wininst doesn't execute postinstall script In-Reply-To: <1599884205.28.0.064503063783.issue41771@roundup.psfhosted.org> Message-ID: <1599884813.33.0.569755883854.issue41771@roundup.psfhosted.org> Change by Mark Hammond : ---------- keywords: +patch pull_requests: +21265 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22210 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 00:27:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 04:27:59 +0000 Subject: [issue41760] 3.8.6 rc1 documentation fails to build with sphinx 3.2.1 In-Reply-To: <1599817628.06.0.2679531144.issue41760@roundup.psfhosted.org> Message-ID: <1599884879.8.0.283155868505.issue41760@roundup.psfhosted.org> Terry J. Reedy added the comment: Two issues about Sphinx 3.2.1 failing with "duplicate token description" (posted on both) #41760 'sign', multiple people nosy, failed where? #41762 'format_spec', on Travis, PR by Victor Stinner (2.2.0 okay) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 00:28:16 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 04:28:16 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599884896.29.0.132234994101.issue41762@roundup.psfhosted.org> Terry J. Reedy added the comment: Two issues about Sphinx 3.2.1 failing with "duplicate token description" (posted on both) #41760 'sign', multiple people nosy, failed where? #41762 'format_spec', on Travis, PR by Victor Stinner (2.2.0 okay) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 01:12:45 2020 From: report at bugs.python.org (Jay Cee Garcia) Date: Sat, 12 Sep 2020 05:12:45 +0000 Subject: [issue40108] Improve error message for -m option when .py is present In-Reply-To: <1585526523.79.0.240338395586.issue40108@roundup.psfhosted.org> Message-ID: <1599887565.21.0.392036761671.issue40108@roundup.psfhosted.org> Change by Jay Cee Garcia : ---------- components: +XML type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 01:40:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 05:40:08 +0000 Subject: [issue41763] IDLE: scale font to Windows' "zoom" factor In-Reply-To: <1599838753.63.0.774381112035.issue41763@roundup.psfhosted.org> Message-ID: <1599889208.19.0.388420688693.issue41763@roundup.psfhosted.org> Terry J. Reedy added the comment: Are you the Elisha Paine that suggested the original fix? I am still interested in the subject, but there are a lot of factors to consider. Rereading #33656, I disagree that IDLE is lying; tk scales on startup and others agreed with the current setting, and even thought it should be made part of the Python install. I did a *lot* of testing, using a magnifier looking at IDLE, Firefox, and Command Prompt, and changing the properties settings. The minimum client for GetDpiForWindow is Windows 10, version 1607, whereas the current solution works for all Win 10 and likely Win 8, so it cannot replace the latter. Currently, when I change Settings / Display / Scale and layout, which is what I presume you mean by 'zoom factor' (100%, 125%, ...), IDLE 3.9 changes too, as I would expect. The text window change is not exactly in proportion to the Display dialog change, but the difference might be the layout white space. This is contrary to what you report. I have Win 10 2004 with Sept updates. When I downscale the resolution, the type for both the dialog and IDLE enlarges. I presume that this is to keep it smooth rather than becoming pixelated. I have access to system with 2 4k monitors. When I downscaled one, and moved Windows between them, the physical height was sometimes maintained, but sometimes changed. I will probably install Python on that system to see how IDLE and tkinter and turtledemo (without the fix) look, and repeat the above experiment. If people changes font face, they may need to adjust the 'size', and the physical size for a given 'size' varies between fonts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 01:52:06 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 05:52:06 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599889926.87.0.933630778652.issue41729@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 31c9828ec026e5d9b9122d55bf0aa7cb45bfecc5 by Terry Jan Reedy in branch 'master': bpo-41729: Fix test_winconsole failures (3) and hang (GH-22146) https://github.com/python/cpython/commit/31c9828ec026e5d9b9122d55bf0aa7cb45bfecc5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 01:52:25 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 05:52:25 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599889945.87.0.69412583358.issue41729@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21267 pull_request: https://github.com/python/cpython/pull/22212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 01:52:18 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 05:52:18 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599889938.04.0.541419386318.issue41729@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +21266 pull_request: https://github.com/python/cpython/pull/22211 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:09:16 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 06:09:16 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599890956.35.0.598690828153.issue41729@roundup.psfhosted.org> miss-islington added the comment: New changeset bbab34084e876291d96a65741f075db3adfa7733 by Miss Islington (bot) in branch '3.8': bpo-41729: Fix test_winconsole failures (3) and hang (GH-22146) https://github.com/python/cpython/commit/bbab34084e876291d96a65741f075db3adfa7733 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:09:57 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 06:09:57 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments In-Reply-To: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> Message-ID: <1599890997.79.0.354583939302.issue41745@roundup.psfhosted.org> Terry J. Reedy added the comment: I use signature for IDLE call tips, but have never used .bind and subsequent calls. After understanding the behavior, my question as initial reviewer is whether it is an *implementation* bug. Perhaps, but not obviously so. Whether or not it is a design wart serious enough to warrant an design change is a different question, which I am not going to judge. Maybe there is a reason for the current design we have not thought of. Or maybe it is an accident too painful to change. I am convinced that the doc could be better. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:19:02 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 06:19:02 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599891542.45.0.612690183917.issue41729@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset c2577b9e0e2f8652f079b4ac473347c63f15e25c by Miss Islington (bot) in branch '3.9': bpo-41729: Fix test_winconsole failures (3) and hang (GH-22146) https://github.com/python/cpython/commit/c2577b9e0e2f8652f079b4ac473347c63f15e25c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:19:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 06:19:44 +0000 Subject: [issue41729] test_winconsoleio fails and hangs on Windows In-Reply-To: <1599350381.8.0.512044336394.issue41729@roundup.psfhosted.org> Message-ID: <1599891584.05.0.464904807971.issue41729@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:25:43 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 06:25:43 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599891943.24.0.550278351109.issue41731@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 7e711ead26fea6465e0ef2e3b8880b57ba8fc129 by Terry Jan Reedy in branch 'master': bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206) https://github.com/python/cpython/commit/7e711ead26fea6465e0ef2e3b8880b57ba8fc129 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:25:59 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 06:25:59 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599891959.91.0.155721655464.issue41731@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21269 pull_request: https://github.com/python/cpython/pull/22214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:25:52 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 06:25:52 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599891952.52.0.936881622968.issue41731@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +21268 pull_request: https://github.com/python/cpython/pull/22213 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:38:10 2020 From: report at bugs.python.org (Amir Mohamadi) Date: Sat, 12 Sep 2020 06:38:10 +0000 Subject: [issue41772] Zipfile.testzip considers wrong password as correct Message-ID: <1599892690.25.0.248465863083.issue41772@roundup.psfhosted.org> Change by Amir Mohamadi : ---------- components: Library (Lib) nosy: Amir priority: normal severity: normal status: open title: Zipfile.testzip considers wrong password as correct type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:43:37 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 06:43:37 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599893017.33.0.258482516168.issue41731@roundup.psfhosted.org> miss-islington added the comment: New changeset 77901dc6c3d06dd31f6c84b2d3cb21dc26b1e351 by Miss Islington (bot) in branch '3.8': bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206) https://github.com/python/cpython/commit/77901dc6c3d06dd31f6c84b2d3cb21dc26b1e351 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:45:41 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 06:45:41 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599893141.95.0.247142260313.issue41731@roundup.psfhosted.org> miss-islington added the comment: New changeset 34e3c7592be70f652c293eb179593bf2928adeb4 by Miss Islington (bot) in branch '3.9': bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206) https://github.com/python/cpython/commit/34e3c7592be70f652c293eb179593bf2928adeb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:49:58 2020 From: report at bugs.python.org (Amir Mohamadi) Date: Sat, 12 Sep 2020 06:49:58 +0000 Subject: [issue41772] Zipfile.testzip considers wrong password as correct Message-ID: <1599893398.35.0.605473173287.issue41772@roundup.psfhosted.org> New submission from Amir Mohamadi : Zipfile.testzip sometimes works perfectly with wrong password. refer to poc.py I've a zip file with password '76453' and when I try a wrong password with extractall: myzip.setpassword('10006050') myzip.extractall() it raises a Bad CRC-32 exception. but when I try testzip instead of extractall: myzip.setpassword('10006050') myzip.testzip() no exception is raised ---------- Added file: https://bugs.python.org/file49452/poc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:50:14 2020 From: report at bugs.python.org (Amir Mohamadi) Date: Sat, 12 Sep 2020 06:50:14 +0000 Subject: [issue41772] Zipfile.testzip considers wrong password as correct In-Reply-To: <1599893398.35.0.605473173287.issue41772@roundup.psfhosted.org> Message-ID: <1599893414.07.0.411618573288.issue41772@roundup.psfhosted.org> Change by Amir Mohamadi : Added file: https://bugs.python.org/file49453/encrypted.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:50:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Sep 2020 06:50:26 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1599893426.75.0.00122587791992.issue39651@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1b0f0e3d7d03155da1cf9769a847874d559e57e3 by Victor Stinner in branch 'master': bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197) https://github.com/python/cpython/commit/1b0f0e3d7d03155da1cf9769a847874d559e57e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:50:54 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 06:50:54 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1599893454.71.0.845871726665.issue39651@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +21270 pull_request: https://github.com/python/cpython/pull/22215 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:51:02 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 06:51:02 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1599893462.45.0.618028799098.issue39651@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21271 pull_request: https://github.com/python/cpython/pull/22216 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:53:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Sep 2020 06:53:41 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1599893621.46.0.0290264148219.issue39651@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the bug report Ben Darnell, it's now fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:54:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Sep 2020 06:54:53 +0000 Subject: [issue41760] 3.8.6 rc1 documentation fails to build with sphinx 3.2.1 In-Reply-To: <1599817628.06.0.2679531144.issue41760@roundup.psfhosted.org> Message-ID: <1599893693.68.0.476465823835.issue41760@roundup.psfhosted.org> STINNER Victor added the comment: I close this issue as a duplicate of bpo-41762. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Documentation job fails on CIs: duplicate token description of format_spec _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:55:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Sep 2020 06:55:11 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599893711.0.0.927019119346.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: I closed bpo-41760 as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 02:55:55 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Sep 2020 06:55:55 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1599893755.1.0.116627944464.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: > I closed bpo-41760 as a duplicate of this issue. The error message was different but similar: Warning, treated as error: /<>/Doc/library/string.rst:311:duplicate token description of sign, other instance in library/functions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:00:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Sep 2020 07:00:24 +0000 Subject: [issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows In-Reply-To: <1599865531.82.0.625715596762.issue41766@roundup.psfhosted.org> Message-ID: <1599894024.64.0.260379282098.issue41766@roundup.psfhosted.org> STINNER Victor added the comment: If it's another _ast regression, see bpo-41631: I proposed PR 21961 to fix it. I failed to reproduce the issue on Linux with a debug build, on the development master branch: ./python -m venv env env/bin/python -m pip install pyflakes flake8 env/bin/python -m pyflakes Lib/turtle.py env/bin/python -m flake8 Lib/turtle.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:00:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 12 Sep 2020 07:00:58 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1599894058.02.0.552478539012.issue41756@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:10:01 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 07:10:01 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1599894601.34.0.396655655516.issue39651@roundup.psfhosted.org> miss-islington added the comment: New changeset 530d1105ed7b0aa5ef76e3116918fe39bc6a4823 by Miss Islington (bot) in branch '3.8': bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197) https://github.com/python/cpython/commit/530d1105ed7b0aa5ef76e3116918fe39bc6a4823 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:11:42 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 07:11:42 +0000 Subject: [issue39651] Exceptions raised by EventLoop.call_soon_threadsafe In-Reply-To: <1581871318.96.0.350376923794.issue39651@roundup.psfhosted.org> Message-ID: <1599894702.38.0.465616242576.issue39651@roundup.psfhosted.org> miss-islington added the comment: New changeset 7dfcc8e0795cce6a8cb42ae2a7f159a38da6b38a by Miss Islington (bot) in branch '3.9': bpo-39651: Fix asyncio proactor _write_to_self() (GH-22197) https://github.com/python/cpython/commit/7dfcc8e0795cce6a8cb42ae2a7f159a38da6b38a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:59:04 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Sep 2020 07:59:04 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599897544.14.0.290788126623.issue41672@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset c75330605d4795850ec74fdc4d69aa5d92f76c00 by Norbert Cyran in branch 'master': bpo-41672: Fix type mismatches in imaplib docs (GH-22207) https://github.com/python/cpython/commit/c75330605d4795850ec74fdc4d69aa5d92f76c00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:59:20 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 07:59:20 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599897560.98.0.0880290350668.issue41672@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21273 pull_request: https://github.com/python/cpython/pull/22218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:59:13 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 07:59:13 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599897553.29.0.398246064661.issue41672@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21272 pull_request: https://github.com/python/cpython/pull/22217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 03:59:43 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Sep 2020 07:59:43 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599897583.73.0.544983757975.issue41672@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 04:14:41 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 12 Sep 2020 08:14:41 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599898481.13.0.084450417973.issue41672@roundup.psfhosted.org> miss-islington added the comment: New changeset 98f6e67a3d6e57727177ec2fb5cb68ef9a468aca by Miss Islington (bot) in branch '3.9': bpo-41672: Fix type mismatches in imaplib docs (GH-22207) https://github.com/python/cpython/commit/98f6e67a3d6e57727177ec2fb5cb68ef9a468aca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 04:21:41 2020 From: report at bugs.python.org (Mark Summerfield) Date: Sat, 12 Sep 2020 08:21:41 +0000 Subject: [issue41765] XFCE task switcher shows 'Tk' insteadl of Window title In-Reply-To: <1599864149.95.0.416329554824.issue41765@roundup.psfhosted.org> Message-ID: <1599898901.95.0.657587016634.issue41765@roundup.psfhosted.org> Mark Summerfield added the comment: I just ran IDLE and it seems to have the same problem. Although the taskbar entry is 'Python 3.6.9 Shell' (ought really to be 'IDLE'), when context switching the switcher shows the correct icon but the title 'Toplevel'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 04:22:34 2020 From: report at bugs.python.org (Mark Summerfield) Date: Sat, 12 Sep 2020 08:22:34 +0000 Subject: [issue41765] XFCE task switcher shows 'Tk' insteadl of Window title In-Reply-To: <1599864149.95.0.416329554824.issue41765@roundup.psfhosted.org> Message-ID: <1599898954.4.0.698547600254.issue41765@roundup.psfhosted.org> Mark Summerfield added the comment: Same applied to IDLE for Python 3.8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 04:43:52 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Sep 2020 08:43:52 +0000 Subject: [issue23706] pathlib.Path.write_text should include a newline argument In-Reply-To: <1426757561.17.0.481870343329.issue23706@psf.upfronthosting.co.za> Message-ID: <1599900232.56.0.420773279636.issue23706@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.10 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 04:34:37 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 12 Sep 2020 08:34:37 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599899677.24.0.0919637124437.issue41731@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 04:54:26 2020 From: report at bugs.python.org (neonene) Date: Sat, 12 Sep 2020 08:54:26 +0000 Subject: [issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows In-Reply-To: <1599865531.82.0.625715596762.issue41766@roundup.psfhosted.org> Message-ID: <1599900866.08.0.816570048612.issue41766@roundup.psfhosted.org> neonene added the comment: I applied PR 21961 to master and comfirmed no crash. I'll close this issue. Thanks?for your quick reply. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 05:10:39 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 12 Sep 2020 09:10:39 +0000 Subject: [issue41731] test_cmd_line_script fails with verbosity level more than 1 In-Reply-To: <1599368269.38.0.401478917428.issue41731@roundup.psfhosted.org> Message-ID: <1599901839.91.0.636786640763.issue41731@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks Terry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 05:32:03 2020 From: report at bugs.python.org (Vaclav Slavik) Date: Sat, 12 Sep 2020 09:32:03 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1599903123.28.0.585717395425.issue41744@roundup.psfhosted.org> Vaclav Slavik added the comment: Sorry for the omission (fixed now), and thanks for your patience! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 07:04:53 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Sep 2020 11:04:53 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599908693.83.0.879257742818.issue41672@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 3a150c77c31da240f1b92cab9ec74f1fa701b869 by Miss Islington (bot) in branch '3.8': bpo-41672: Fix type mismatches in imaplib docs (GH-22207) (#22218) https://github.com/python/cpython/commit/3a150c77c31da240f1b92cab9ec74f1fa701b869 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 07:05:47 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 12 Sep 2020 11:05:47 +0000 Subject: [issue41672] imaplib: wrong return type documented In-Reply-To: <1598866871.14.0.71273864789.issue41672@roundup.psfhosted.org> Message-ID: <1599908747.03.0.561177980879.issue41672@roundup.psfhosted.org> Dong-hee Na added the comment: Thanks Norbert for the contribution! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 07:28:37 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 12 Sep 2020 11:28:37 +0000 Subject: [issue41765] tkinter: XFCE task switcher shows 'Tk' instead of Window title In-Reply-To: <1599864149.95.0.416329554824.issue41765@roundup.psfhosted.org> Message-ID: <1599910117.76.0.524584579251.issue41765@roundup.psfhosted.org> E. Paine added the comment: Thank you for reporting this issue. I wanted to start by pointing out a finer detail: the XFCE program title on the task switcher (the thing you're reporting and I don't have a clue how to describe) is not the same as the default window title (the program title is "Tk" and the default window title is "tk"). Going further, we can show this is not a tkinter issue by running wish and changing the window title (`wm title . {Test App}`). The result is the program title as "Wish" and the subtitle as "Test App". In short, tkinter sits on-top Tcl/Tk and it is quite probable that Tk is the program XFCE *saw* as reponsible for the window. I think its unlikely you could change this without modifying and compiling your own version of Tk (someone please do correct me if I'm wrong). Again, thank you for reporting this issue, though I think it should be closed. > the taskbar entry is 'Python 3.6.9 Shell' (ought really to be 'IDLE') I agree the current title is probably not ideal (there are lots people when first starting who think the IDLE shell *is the* Python shell) though I think we still need the version and word "shell" in it (e.g. "IDLE 3.6.9 Shell"). I personally don't see it as too big an issue, but have nosied Terry in case he wants to add something on this. ---------- nosy: +epaine, gpolo, serhiy.storchaka, terry.reedy title: XFCE task switcher shows 'Tk' insteadl of Window title -> tkinter: XFCE task switcher shows 'Tk' instead of Window title versions: +Python 3.10, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 11:31:17 2020 From: report at bugs.python.org (Ram Rachum) Date: Sat, 12 Sep 2020 15:31:17 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices Message-ID: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> New submission from Ram Rachum : I was recently tripped up by a bug caused by passing infinite weights to random.choices. I toyed around with that function, and it seemed that when it's given weights that include infinity or NaN, it selects a specific element, always without being random. That's regardless of whether multiple items have infinity weights. It chooses a different specific item if the infinity is negative. The specific item isn't always the one that has the infinite weight. I don't know whether that's the intended behavior for some reason, or whether it's even possible to define a logical behavior for infinite weights. If it's not possible, then maybe this function should raise an errors when given weights that include infinity or nan. I see that the documentation states that the weights must be non-negative; maybe we should have a check for that too. ---------- components: Library (Lib) messages: 376802 nosy: cool-RR priority: normal severity: normal status: open title: Clarify handling of infinity and nan in random.choices type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 11:33:14 2020 From: report at bugs.python.org (Ram Rachum) Date: Sat, 12 Sep 2020 15:33:14 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599924794.46.0.849231685297.issue41773@roundup.psfhosted.org> Change by Ram Rachum : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 12:20:35 2020 From: report at bugs.python.org (Sreedevi) Date: Sat, 12 Sep 2020 16:20:35 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right Message-ID: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> New submission from Sreedevi : Define a list which has all same elements. While removing the same element from list using for loop and by using remove() method, output should be empty list, but the output we get is one element is unremoved ---------- assignee: terry.reedy components: IDLE, Windows files: listrepxxx.py messages: 376803 nosy: paul.moore, sreedevi.ha, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: While removing element from list using for and remove(), which has same items output is not right type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49454/listrepxxx.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 12:27:23 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 Sep 2020 16:27:23 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599928043.8.0.622580905272.issue41774@roundup.psfhosted.org> Eric V. Smith added the comment: You should not mutate a list while iterating over it. See, for example https://stackoverflow.com/questions/6260089/strange-result-when-removing-item-from-a-list I couldn't find a place where this is mentioned in the python list docs. If it's not there, we should add something to the programming FAQ. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 12:27:42 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 Sep 2020 16:27:42 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599928062.08.0.138900131374.issue41774@roundup.psfhosted.org> Change by Eric V. Smith : ---------- components: +Documentation -IDLE, Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 12:28:51 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 Sep 2020 16:28:51 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599928131.21.0.0561046866285.issue41774@roundup.psfhosted.org> Eric V. Smith added the comment: Removing Windows and IDLE devs from nosy list, since this isn't related to either of those areas. ---------- nosy: -paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 12:53:36 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 12 Sep 2020 16:53:36 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599929616.2.0.662185584382.issue41774@roundup.psfhosted.org> Steven D'Aprano added the comment: You say: "output should be empty list" but that's not actually correct. You intend the output to be the empty list, but if you think carefully about what happens during iteration, you should see that the behaviour is correct. To make it easier to see what is happening, let's use different values: L = [20, 21, 22] On the first iteration, the interpreter looks at position 0, which is 20. You remove 20 from the list, which shrinks the list down to: L = [21, 22] Now it is 21 in position 0. But that iteration of the loop is finished, so the interpreter looks at position 1, which is 22. You remove 22 from the list, giving: L = [21] and the interpreter looks at position 2, which does not exist, so the loop finishes. >>> L = [20, 21, 22] >>> for i in L: ... L.remove(i) ... print('i', i, 'L is now:', L) ... i 20 L is now: [21, 22] i 22 L is now: [21] >>> L [21] So the interpreter did exactly what you told it to do. The problem is that what you told it to do is not what you wanted it to do. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 13:18:12 2020 From: report at bugs.python.org (Paul Moore) Date: Sat, 12 Sep 2020 17:18:12 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599931092.35.0.141009575736.issue41774@roundup.psfhosted.org> Change by Paul Moore : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 13:17:55 2020 From: report at bugs.python.org (Paul Moore) Date: Sat, 12 Sep 2020 17:17:55 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599931075.54.0.444567123398.issue41774@roundup.psfhosted.org> Paul Moore added the comment: There is a bug in your program. You should not mutate the list while looping over it. ---------- nosy: +paul.moore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 13:34:13 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 12 Sep 2020 17:34:13 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599932053.73.0.470215027369.issue41774@roundup.psfhosted.org> Steven D'Aprano added the comment: I think Eric left the issue open because he was hoping to update the FAQs and/or docs with information about this issue. I will leave it to someone else to decide whether or not to reopen it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 14:10:22 2020 From: report at bugs.python.org (hai shi) Date: Sat, 12 Sep 2020 18:10:22 +0000 Subject: [issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them In-Reply-To: <1579038882.16.0.589810918272.issue39337@roundup.psfhosted.org> Message-ID: <1599934222.27.0.304780801711.issue39337@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +21274 pull_request: https://github.com/python/cpython/pull/22219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 14:19:07 2020 From: report at bugs.python.org (Julian Berman) Date: Sat, 12 Sep 2020 18:19:07 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments In-Reply-To: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> Message-ID: <1599934747.16.0.356922687196.issue41745@roundup.psfhosted.org> Julian Berman added the comment: Totally fair! Sorry, was just making sure the label change wasn't intended to say it *wasn't* enough to warrant a design change :) (which I agree should be discussed with folks who do use that functionality, of which I only recently had to). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 14:42:25 2020 From: report at bugs.python.org (Paul Moore) Date: Sat, 12 Sep 2020 18:42:25 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599936145.5.0.691866853809.issue41774@roundup.psfhosted.org> Paul Moore added the comment: Yeah, apologies - I saw the email notification, but Eric removed me from the nosy list (quite reasonably) and I didn't notice there had been extra discussion :-( If someone wants to re-open the issue, feel free. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 15:25:28 2020 From: report at bugs.python.org (igs) Date: Sat, 12 Sep 2020 19:25:28 +0000 Subject: [issue8704] cgitb sends a bogus HTTP header if the app crashes before finishing headers In-Reply-To: <1273759972.28.0.178671810955.issue8704@psf.upfronthosting.co.za> Message-ID: <1599938728.95.0.724179917177.issue8704@roundup.psfhosted.org> igs added the comment: As mentioned above standard Apache does not accept the extra characters anymore and produces '500 internal error'. So the normal behaviour of this module makes things worse in most cases instead of being helpful. ---------- nosy: +igs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 17:14:56 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 12 Sep 2020 21:14:56 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599945296.57.0.47829755877.issue41773@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry, I don't see the point in cluttering the documentation or over-specifying the function for these non-sensensical toy experiments. AFAICT, no actual problem exists in practice. Also, we don't want to slow down the function by running scans for infinities or NaNs. That would make the function worse for all users and better for almost no one. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 18:40:34 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 12 Sep 2020 22:40:34 +0000 Subject: [issue41772] Zipfile.testzip considers wrong password as correct In-Reply-To: <1599893398.35.0.605473173287.issue41772@roundup.psfhosted.org> Message-ID: <1599950434.14.0.164348123817.issue41772@roundup.psfhosted.org> Eric V. Smith added the comment: I believe what testzip is doing is validating the structural integrity of the file, which appears can be tested without decrypting the contents. Although it is odd that if you don't call setpassword, even with the wrong password, testzip will raise a RuntimeError. See https://en.wikipedia.org/wiki/Zip_(file_format)#Encryption for a few scant details. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 19:35:42 2020 From: report at bugs.python.org (mohamed koubaa) Date: Sat, 12 Sep 2020 23:35:42 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599953742.78.0.469003700729.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21275 pull_request: https://github.com/python/cpython/pull/22220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 19:41:50 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 12 Sep 2020 23:41:50 +0000 Subject: [issue32218] add __iter__ to enum.Flag members In-Reply-To: <1512445452.31.0.213398074469.issue32218@psf.upfronthosting.co.za> Message-ID: <1599954110.6.0.24676598691.issue32218@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21276 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 20:02:05 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 00:02:05 +0000 Subject: [issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does In-Reply-To: <1537447163.92.0.956365154283.issue34750@psf.upfronthosting.co.za> Message-ID: <1599955325.94.0.694963361782.issue34750@roundup.psfhosted.org> Ethan Furman added the comment: Antony, My apologies for the delay. What I would like to see is a real example of how you would use this new feature if it were implemented. I'm guessing it would look something like: class MyEnum(Enum): locals.update(*some magic here*) def a_method(self): ... Am I right? If yes, what does *some magic here* look like? If no, what would your code actually look like? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 20:18:21 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 00:18:21 +0000 Subject: [issue31369] re.RegexFlag is not included in __all__, makes type inference less useful In-Reply-To: <1504730402.58.0.544251648863.issue31369@psf.upfronthosting.co.za> Message-ID: <1599956301.83.0.0833823282856.issue31369@roundup.psfhosted.org> Ethan Furman added the comment: Guido, do you have an opinion on adding `RegexFlag` to the `re` module's `__all__` and documenting it? There is also some discussion on making these types of int-to-Enum conversions use a `module.name` repr instead of `class.name`: used to be: >>> re.I is now: >>> re.I re.IGNORECASE I of course have no idea if that matters to typing one way or the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 20:22:31 2020 From: report at bugs.python.org (mohamed koubaa) Date: Sun, 13 Sep 2020 00:22:31 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1599956551.55.0.565088247058.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21277 pull_request: https://github.com/python/cpython/pull/22222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 21:17:12 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Sep 2020 01:17:12 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599959832.35.0.767013061693.issue41773@roundup.psfhosted.org> Raymond Hettinger added the comment: In general NaNs wreak havoc on any function that uses comparisons: >>> max(10, nan) 10 >>> max(nan, 10) nan It isn't the responsibility of the functions to test for NaNs. Likewise, it would not make sense to document the NaN behavior in every function that uses a comparison. That would clutter the docs and it puts the responsibility in the wrong place. It is the NaN itself that is responsible for the behavior you're seeing. It is up to the NaN documentation to discuss its effects on downstream code. For example, sorting isn't consistent when NaNs are present: >>> sorted([10, nan, 5]) [10, nan, 5] >>> sorted([5, nan, 10]) [ 5, nan, 10] Also, a NaN is just one of many possible objects that create weird downstream effects. For examples, sets have a partial ordering and would also create odd results with sorted(), bisect(), max(), min(), etc. The situation with Infinity is similar. It is a special object that has the unusual property that inf+1==inf, so bisection of cumulative sums will give the rightmost infinity. Consider a population 'ABC' and weights of [5, 7, 2]. We have Element Weight Cumulative Weight Range (half-open interval) ------- ------ ----------------- -------------------------- A 5 5 0.0 <= X < 5.0 B 7 12 5.0 <= X < 12.0 C 2 14 12.0 <= X < 14.0 ------ 14 The selector X comes from: random() * 14.0 which gives a range of: 0.0 <= X < 14.0. Now consider a population 'ABC' and weights of [5, 0, 2]. We have Element Weight Cumulative Weight Range (half-open interval) ------- ------ ----------------- -------------------------- A 5 5 0.0 <= X < 5.0 B 0 5 5.0 <= X < 5.0 C 2 7 5.0 <= X < 7.0 ------ 7 If X is 5.0, we have to choose C because B has a zero selection probabliity. So have to pick the rightmost (bottommost) range that has 5.0, giving the C. Now, replace B's weight with float('Inf'): Element Weight Cumulative Weight Range (half-open interval) ------- ------ ----------------- -------------------------- A 5 5 0.0 <= X < 5.0 B Inf Inf 5.0 <= X < Inf C 2 Inf Inf <= X < Inf ------ Inf Since Inf+2 is Inf and Inf==Inf, the latter two ranges are undifferentiated. The selector itself in always Inf because "X = random() * inf" always gives inf. Using the previous rule, we have to choose the rightmost Inf which is C. This is in fact what choices() does: >>> choices('ABC', [5, float('Inf'), 2]) ['C'] It isn't an error. That is the same behavior that bisect() has when searching for a infinite value (or any other object that universally compares larger than anything except itself): >>> bisect([10, 20, inf], inf) 3 >>> bisect([10, 20, 30], inf) 3 When searching for infinity, you always get the rightmost insertion point even if the cuts points are finite. Accordingly, it makes sense that if one of the weights is infinite, then the total infinite, and the selector is infinite, so you always get the rightmost value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 22:34:55 2020 From: report at bugs.python.org (Bug Reporter) Date: Sun, 13 Sep 2020 02:34:55 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1599964495.66.0.851672515742.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: Can test_ssl script determine which TLS versions are enabled in a particular Linux distribution and run tests only for enabled versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 22:39:57 2020 From: report at bugs.python.org (chen-y0y0) Date: Sun, 13 Sep 2020 02:39:57 +0000 Subject: [issue41770] Import module doesn't updated In-Reply-To: <1599879614.84.0.25424318959.issue41770@roundup.psfhosted.org> Message-ID: <1599964797.49.0.200261695793.issue41770@roundup.psfhosted.org> chen-y0y0 added the comment: --REOPEN-- >>> # I try: >>> import xxx >>> del sys.modules['xxx'] >>> # But: Traceback (most recent call last): File "", line 1, in del sys.modules['xxx'] NameError: name 'sys' is not found >>> # I try to import sys. >>> import sys >>> del sys.modules['xxx'] >>> import xxx >>> xxx.b Traceback (most recent call last): File "", line 1, in AttributeError: module 'xxx' has no attribute 'b' ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 22:43:25 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 13 Sep 2020 02:43:25 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1599965005.21.0.542358214226.issue41746@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +21278 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 12 22:52:45 2020 From: report at bugs.python.org (Caleb Hattingh) Date: Sun, 13 Sep 2020 02:52:45 +0000 Subject: [issue39232] asyncio crashes when tearing down the proactor event loop In-Reply-To: <1578335360.75.0.333919607495.issue39232@roundup.psfhosted.org> Message-ID: <1599965565.3.0.623881500403.issue39232@roundup.psfhosted.org> Change by Caleb Hattingh : ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 00:00:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Sep 2020 04:00:10 +0000 Subject: [issue41775] IDLE: change Shell window title Message-ID: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> New submission from Terry J. Reedy : The IDLE Shell window title is set with pyshell line 836 shell_title = "Python " + python_version() + " Shell" The python_version() part was added in March 2013 by the first patch for issue 17390: https://hg.python.org/cpython/rev/74d9a9507019. In issue 41765, Mark Summerfield suggested in a side-comment that the title should be 'IDLE'. E. Paine agreed that it should be changed, suggesting that it contributes to the fact that "there are lots people when first starting who think the IDLE shell *is the* Python shell". I have noticed this fact on Stackoverflow, where about half the questions tagged 'python-idle' have nothing to do with IDLE. (I regularly remove such mistaken tags.) I have wondered why and how to better counter this. For one thing, it results in users blaming IDLE for Python behavior, such as not running buggy code. I never noticed before that IDLE promotes the confusion a bit in the shell title. Issues such as #37903 (move prompt to shell sidebar, which I am planning to review soon) and #37892 (separate input area) will differentiate the IDLE Shell from the standard REPL even more. Paine suggested 'IDLE Shell'. I don't want to suggest that IDLE is independently versioned, and prefer 'IDLE Shell ()'. The parenthesized version is used for editor windows (and was also added by #17390). On Windows, mousing over a taskbar icon initially shows about 10-14 variable-width letters of the title. Is 'Shell' or '3.x.y' more important to be ensured of visibility? Other suggestions and comments? [If IDLE becomes a tabbed-window application, the window title would be 'IDLE (version)' and the shell would be on a 'Shell' tab.] ---------- assignee: terry.reedy components: IDLE messages: 376819 nosy: cheryl.sabella, epaine, taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: change Shell window title type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 00:02:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Sep 2020 04:02:33 +0000 Subject: [issue41765] tkinter: XFCE task switcher shows 'Tk' instead of Window title In-Reply-To: <1599864149.95.0.416329554824.issue41765@roundup.psfhosted.org> Message-ID: <1599969753.08.0.169973529382.issue41765@roundup.psfhosted.org> Terry J. Reedy added the comment: The Xfce task switcher appears to be showing the tk widget '_class' option. When tkinter create a tk widget, it by default sets the 'class' option to the tkinter class name. This is 'Tk' and 'Toplevel' respectively for the visible windows in the example code and for IDLE. (IDLE withdraws the original root Tk window.) Why Xfce shows the '-class' rather than the title is an issue between tcl/tx, Xfce, and maybe the OS, but should not involve tkinter. We are not going to change how it sets the 'class' option. So I am closing this. I opened issue 41775 for changing the IDLE Shell window title. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 00:50:20 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 13 Sep 2020 04:50:20 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599972620.27.0.691138601373.issue41773@roundup.psfhosted.org> Ram Rachum added the comment: I disagree, especially the bit about slowing down the function, since you're checking the total, not every element. Like the check for negative numbers that you do on line 493. But it's your call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 01:00:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Sep 2020 05:00:32 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1599973232.93.0.535967750416.issue41774@roundup.psfhosted.org> Terry J. Reedy added the comment: Sreedevi: the Windows tag is meant for issues that involve Windows behavior that is different from other OSes; the IDLE tag is meant for issues that involve the behavior of IDLE, as distinct from other ways of running Python code. They should not be used just because you ran code from IDLE on Windows. There are two aspects to mutating while iteration: correctness and speed. For beginners, the general advice "Don't do it" is not bad. However: Removing items from a list *works* when iterating in reverse if removal is done by index (del mylist[i] rather than value (mylist.remove(value)). But it turns an inherently O(n:=len(list)) operation into a slow O(n*n) operation. The usually recommended alternative is to make a new list of things not deleted. But one can do this in-place by writing the new list on top of the old by using a explicit second index to move items just once. I reopened to add to the programming FAQ Sequences (Tuples/Lists) section How do you remove multiple items from a list? after the current How do you remove duplicates from a list? ---------- nosy: +terry.reedy resolution: not a bug -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 01:07:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Sep 2020 05:07:36 +0000 Subject: [issue41745] BoundArguments.arguments used in the recommended way to call a callable silently succeeds for nonexistent arguments In-Reply-To: <1599579646.4.0.421271904228.issue41745@roundup.psfhosted.org> Message-ID: <1599973656.44.0.37087802225.issue41745@roundup.psfhosted.org> Terry J. Reedy added the comment: If you want to pursue, you might try python-list to find other users. I am not sure if this change really qualifies for python-ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 01:57:48 2020 From: report at bugs.python.org (Tushar Sadhwani) Date: Sun, 13 Sep 2020 05:57:48 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1599976668.46.0.188616782583.issue41758@roundup.psfhosted.org> Tushar Sadhwani added the comment: pyenv is a python version management tool. But this issue has nothing to do with it. I ran the same thing on python 3.8.5 (both 32 and 64bit) and the same error occured C:\Users\tusha\AppData\Local\Programs\Python\Python38-32>python.exe Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ^Z C:\Users\tusha\AppData\Local\Programs\Python\Python38-32>python.exe -m turtledemo.colormixer EVENTLOOP Fatal Python error: Cannot recover from stack overflow. Python runtime state: initialized Current thread 0x00002534 (most recent call first): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 251 in __new__ File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 1826 in sety File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 655 in eventfun File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\tkinter\__init__.py", line 1305 in update File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\turtle.py", line 562 in _update # ... PS C:\Users\tusha> py Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> exit() PS C:\Users\tusha> py -m turtledemo.colormixer EVENTLOOP Fatal Python error: Cannot recover from stack overflow. Python runtime state: initialized Current thread 0x000023f4 (most recent call first): File "C:\Python385-64\lib\turtle.py", line 251 in __new__ File "C:\Python385-64\lib\turtle.py", line 1826 in sety File "C:\Python385-64\lib\turtledemo\colormixer.py", line 29 in shift File "C:\Python385-64\lib\turtle.py", line 655 in eventfun File "C:\Python385-64\lib\tkinter\__init__.py", line 1883 in __call__ File "C:\Python385-64\lib\tkinter\__init__.py", line 1305 in update File "C:\Python385-64\lib\turtle.py", line 562 in _update # ... I'm running Windows 10 2004 build 19041.508 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 02:00:51 2020 From: report at bugs.python.org (Tushar Sadhwani) Date: Sun, 13 Sep 2020 06:00:51 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1599976851.08.0.382736128345.issue41758@roundup.psfhosted.org> Tushar Sadhwani added the comment: Also, forgot to add The app crashes pretty quickly for me, to reproduce the error all I have to do is run the colormixer demo and move any of the bars up and down a couple of times. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 02:04:55 2020 From: report at bugs.python.org (wyz23x2) Date: Sun, 13 Sep 2020 06:04:55 +0000 Subject: [issue41730] Show deprecation warnings for tkinter.tix In-Reply-To: <1599364490.99.0.633496777395.issue41730@roundup.psfhosted.org> Message-ID: <1599977095.31.0.639959599571.issue41730@roundup.psfhosted.org> wyz23x2 added the comment: Ping... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 04:24:23 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 13 Sep 2020 08:24:23 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599985463.61.0.40302379742.issue41773@roundup.psfhosted.org> Ram Rachum added the comment: Speaking of that check, the error message is 'Total of weights must be greater than zero', which is a bit misleading. 'All weights must be positive or zero' would be more accurate. Would you like a PR for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 05:11:46 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Sep 2020 09:11:46 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599988306.85.0.937685185002.issue41773@roundup.psfhosted.org> Raymond Hettinger added the comment: > 'All weights must be positive or zero' would be more accurate. That's not what the test checks. It literally checks for "total <= 0.0". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 05:30:30 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 13 Sep 2020 09:30:30 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599989430.67.0.0162569840206.issue41773@roundup.psfhosted.org> Ram Rachum added the comment: Yes, but the docs say that the weights are assumed to be nonnegative. I'm assuming the check is done on total because it'd be expensive to do it on each item. A user reading that error message could understand that it's okay for weights to be negative as long as the total isn't, which as far as I understand isn't true. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 06:08:29 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Sep 2020 10:08:29 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599991709.89.0.105145635217.issue41773@roundup.psfhosted.org> Raymond Hettinger added the comment: > A user reading that error message could understand that it's > okay for weights to be negative as long as the total isn't, > which as far as I understand isn't true. This seems like another made up issue. One could also argue the opposite case that if the error message were changed, a user could reasonably assume that the function was in fact checking all the weights individually (which it isn't). The docs already state that the function assumes non-negative inputs, which is in fact what it does. The function already has reasonable error reporting for common missteps. Also, it behaves gracefully if someone is nudging weights up and down in a way that goes slightly negative due to rounding. Beyond that, we're hitting the limits of what it can or should do when fed garbage inputs for ill-posed problems. It's time for this one die now. It's already eaten an hour of my development time explaining how infinities and nans flow through functions and explaining what the Python norms are for letting them flow through versus treating them as errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 06:08:29 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 13 Sep 2020 10:08:29 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1599991709.78.0.833849569329.issue41758@roundup.psfhosted.org> Terry J. Reedy added the comment: I ran turtledemo and played with colormixer a few years ago, so slightly older Windows should not matter. Was Python installed with the python.org installer? (The appdate path suggests so.) Your single-user versus my all-user install should not matter. Please run 'python -m turtle'. Demo should end with 'click me' to end. Run the test suite with 'python -m test -ugui -j0'. I should be under 5 min running in parallel. I expect the locale tests to fail. And test_winconsoleio may hang. If/when it is the last test running, stop with control-C. Does anything else fail? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 06:21:23 2020 From: report at bugs.python.org (Ram Rachum) Date: Sun, 13 Sep 2020 10:21:23 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1599992483.19.0.138487023453.issue41773@roundup.psfhosted.org> Ram Rachum added the comment: Thanks for your time, and I accept your decision here. I'd appreciate it though if you wouldn't use the term "made up issue" on something that happened to me a couple of days ago. Our opposing positions each have their pros and cons, and it makes sense to me that your approach has more pros than mine. Ease up on the "It's time for this one die now" though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 07:46:44 2020 From: report at bugs.python.org (Antony Lee) Date: Sun, 13 Sep 2020 11:46:44 +0000 Subject: [issue34750] locals().update doesn't work in Enum body, even though direct assignment to locals() does In-Reply-To: <1537447163.92.0.956365154283.issue34750@psf.upfronthosting.co.za> Message-ID: <1599997604.81.0.597033728535.issue34750@roundup.psfhosted.org> Antony Lee added the comment: To be honest, I don't really remember what exact use case I had in my mind 2 years ago (as I probably worked around it in one way or another). However, one example that I can think of (and that I have actually implemented before) is auto-conversion of C #defines from a C header file to a Python-level enum (e.g. for semi-automatic generation of a ctypes wrapper): # A general header parser (untested, just an example) def parse_defines(header_file): d = {} for line in header_file: if line.startswith("#define"): _, k, v = line.split() d[k] = int(v) return d # Now wrapping a specific C library foo_defines = parse_defines("foo.h") class Foo(Enum): locals().update({k: v for k, v in foo_defines.items() if k.startswith("FOO_")}) def some_method(self): ... # e.g. call a C function that takes a FOO_* as parameter. Obviously I could always just replace the method by a free function, but that's true for (nearly) all methods. In other words, it seems a bit "unfair" that it is easy to define methods on enums where all options are explicitly listed, but very hard(?) to do so on enums with programatically defined options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 07:59:02 2020 From: report at bugs.python.org (AmirHossein Haji Mohammad Sadegh) Date: Sun, 13 Sep 2020 11:59:02 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation Message-ID: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> New submission from AmirHossein Haji Mohammad Sadegh : It's not wrong but in the example for "continue" in the tutorial, the code prints "Found an even number" for even numbers and "Found a number" for odd numbers. Maybe it would be better if we print "Found an odd number" for odd numbers. Like this: for num in range(2, 10): if num % 2 == 0: print("Found an even number", num) continue print("Found an odd number", num) Found an even number 2 Found an odd number 3 Found an even number 4 Found an odd number 5 Found an even number 6 Found an odd number 7 Found an even number 8 Found an odd number 9 ---------- assignee: docs at python components: Documentation messages: 376834 nosy: amirrossein, docs at python priority: normal severity: normal status: open title: Revise example of "continue" in the tutorial documentation type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 08:01:23 2020 From: report at bugs.python.org (Tushar Sadhwani) Date: Sun, 13 Sep 2020 12:01:23 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1599998483.6.0.339010297681.issue41758@roundup.psfhosted.org> Tushar Sadhwani added the comment: Ran the following tests on Python 3.8.5 32bit colormixer crashed with the same error, python -m turtle did not crash Here's the output of the test suite: PS C:\Users\tusha\AppData\Local\Programs\Python\Python38-32> .\python.exe -m test -ugui -j0 == CPython 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] == Windows-10-10.0.19041-SP0 little-endian == cwd: C:\Users\tusha\AppData\Local\Temp\test_python_5700 == CPU count: 4 == encodings: locale=cp1252, FS=utf-8 0:00:00 Run tests in parallel using 6 child processes 0:00:00 [ 1/423] test_types passed 0:00:01 [ 2/423] test_opcodes passed 0:00:01 [ 3/423] test_grammar passed 0:00:01 [ 4/423] test_dict passed 0:00:01 [ 5/423] test_builtin passed 0:00:02 [ 6/423] test_exceptions passed 0:00:02 [ 7/423] test___future__ passed 0:00:03 [ 8/423/1] test__locale failed test test__locale failed -- multiple errors occurred; run in verbose mode for details 0:00:03 [ 9/423/1] test__opcode passed 0:00:03 [ 10/423/1] test___all__ passed 0:00:04 [ 11/423/1] test__osx_support passed 0:00:04 [ 12/423/1] test_abc passed 0:00:04 [ 13/423/1] test_abstract_numbers passed 0:00:04 [ 14/423/1] test_doctest2 passed 0:00:04 [ 15/423/1] test_doctest passed 0:00:05 [ 16/423/1] test_aifc passed 0:00:06 [ 17/423/1] test_array passed 0:00:06 [ 18/423/1] test_asdl_parser skipped test_asdl_parser skipped -- test irrelevant for an installed Python 0:00:07 [ 19/423/1] test_argparse passed 0:00:07 [ 20/423/1] test_unittest passed 0:00:08 load avg: 27.20 [ 21/423/1] test_asyncgen passed 0:00:08 load avg: 27.11 [ 22/423/1] test_ast passed 0:00:09 load avg: 27.11 [ 23/423/1] test_atexit passed 0:00:09 load avg: 27.11 [ 24/423/1] test_audioop passed 0:00:09 load avg: 26.88 [ 25/423/1] test_asyncore passed 0:00:09 load avg: 26.88 [ 26/423/1] test_augassign passed 0:00:10 load avg: 26.88 [ 27/423/1] test_support passed 0:00:10 load avg: 26.88 [ 28/423/1] test__xxsubinterpreters passed 0:00:10 load avg: 26.88 [ 29/423/1] test_baseexception passed 0:00:10 load avg: 26.90 [ 30/423/1] test_bigaddrspace passed 0:00:10 load avg: 26.90 [ 31/423/1] test_base64 passed 0:00:10 load avg: 26.90 [ 32/423/1] test_bdb passed 0:00:11 load avg: 26.90 [ 33/423/1] test_bigmem passed 0:00:11 load avg: 26.90 [ 34/423/1] test_binhex passed 0:00:11 load avg: 26.90 [ 35/423/1] test_binascii passed 0:00:11 load avg: 26.90 [ 36/423/1] test_binop passed 0:00:11 load avg: 27.00 [ 37/423/1] test_bool passed 0:00:11 load avg: 27.00 [ 38/423/1] test_bisect passed 0:00:11 load avg: 27.00 [ 39/423/2] test_buffer failed test test_buffer crashed -- Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 221, in _runtest_inner2 the_module = importlib.import_module(abstest) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_buffer.py", line 44, in from numpy import ndarray as numpy_array File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 138, in from . import _distributor_init File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in WinDLL(os.path.abspath(filename)) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application 0:00:13 load avg: 27.05 [ 40/423/2] test_audit passed 0:00:13 load avg: 27.05 [ 41/423/2] test_bytes passed 0:00:14 load avg: 27.21 [ 42/423/2] test_c_locale_coercion passed 0:00:14 load avg: 27.21 [ 43/423/2] test_call passed 0:00:19 load avg: 27.26 [ 44/423/2] test_calendar passed 0:00:19 load avg: 27.26 [ 45/423/2] test_bz2 passed 0:00:19 load avg: 27.26 [ 46/423/2] test_cgi passed 0:00:19 load avg: 26.88 [ 47/423/2] test_charmapcodec passed 0:00:19 load avg: 26.88 [ 48/423/2] test_cgitb passed 0:00:20 load avg: 26.88 [ 49/423/2] test_class passed 0:00:20 load avg: 26.88 [ 50/423/2] test_clinic skipped test_clinic skipped -- 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\Tools\\clinic' path does not exist 0:00:20 load avg: 26.88 [ 51/423/2] test_cmath passed 0:00:20 load avg: 26.88 [ 52/423/2] test_cmd passed 0:00:20 load avg: 26.60 [ 53/423/2] test_asynchat passed 0:00:21 load avg: 26.60 [ 54/423/2] test_code passed 0:00:21 load avg: 26.60 [ 55/423/2] test_code_module passed 0:00:22 load avg: 26.44 [ 56/423/2] test_codeccallbacks passed 0:00:22 load avg: 26.44 [ 57/423/2] test_capi passed 0:00:23 load avg: 26.43 [ 58/423/2] test_codecencodings_hk passed 0:00:23 load avg: 26.43 [ 59/423/2] test_codecencodings_cn passed 0:00:23 load avg: 26.43 [ 60/423/2] test_codecencodings_iso2022 passed 0:00:24 load avg: 26.44 [ 61/423/2] test_bufio passed 0:00:24 load avg: 26.44 [ 62/423/2] test_codecencodings_jp passed 0:00:24 load avg: 26.44 [ 63/423/2] test_codecencodings_kr passed 0:00:24 load avg: 26.44 [ 64/423/2] test_codecencodings_tw passed 0:00:24 load avg: 26.44 [ 65/423/2] test_codecmaps_cn passed 0:00:25 load avg: 26.44 [ 66/423/2] test_codecmaps_hk passed 0:00:25 load avg: 26.44 [ 67/423/2] test_codecmaps_jp passed 0:00:25 load avg: 26.44 [ 68/423/2] test_codecmaps_kr passed 0:00:25 load avg: 26.44 [ 69/423/2] test_codecmaps_tw passed 0:00:25 load avg: 26.44 [ 70/423/2] test_codeop passed 0:00:26 load avg: 26.53 [ 71/423/2] test_colorsys passed 0:00:26 load avg: 26.53 [ 72/423/2] test_compare passed 0:00:27 load avg: 26.57 [ 73/423/2] test_collections passed 0:00:27 load avg: 26.57 [ 74/423/2] test_codecs passed 0:00:28 load avg: 26.57 [ 75/423/2] test_complex passed 0:00:29 load avg: 26.14 [ 76/423/2] test_compile passed 0:00:30 load avg: 26.14 [ 77/423/2] test_cmd_line passed 0:00:30 load avg: 25.86 [ 78/423/2] test_contains passed 0:00:30 load avg: 25.86 [ 79/423/2] test_configparser passed 0:00:30 load avg: 25.86 [ 80/423/2] test_cmd_line_script passed 0:00:30 load avg: 25.86 [ 81/423/2] test_contextlib passed 0:00:31 load avg: 25.86 [ 82/423/2] test_contextlib_async passed Task was destroyed but it is pending! task: ()>> Task was destroyed but it is pending! task: ()>> Task was destroyed but it is pending! task: ()>> 0:00:31 load avg: 25.53 [ 83/423/2] test_copy passed 0:00:31 load avg: 25.53 [ 84/423/3] test_copyreg failed test test_copyreg crashed -- Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 221, in _runtest_inner2 the_module = importlib.import_module(abstest) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_copyreg.py", line 4, in from test.pickletester import ExtensionSaver File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\pickletester.py", line 38, in import numpy as np File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 138, in from . import _distributor_init File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in WinDLL(os.path.abspath(filename)) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application 0:00:32 load avg: 25.30 [ 85/423/3] test_context passed 0:00:32 load avg: 25.30 [ 86/423/3] test_coroutines passed 0:00:33 load avg: 25.30 [ 87/423/3] test_crashers passed 0:00:33 load avg: 25.30 [ 88/423/3] test_crypt passed 0:00:33 load avg: 24.97 [ 89/423/3] test_cprofile passed 0:00:33 load avg: 24.97 [ 90/423/3] test_csv passed 0:00:33 load avg: 24.97 [ 91/423/3] test_curses skipped (resource denied) test_curses skipped -- Use of the 'curses' resource not enabled 0:00:34 load avg: 24.97 [ 92/423/3] test_dataclasses passed 0:00:34 load avg: 24.77 [ 93/423/3] test_dbm passed 0:00:35 load avg: 24.77 [ 94/423/3] test_ctypes passed 0:00:35 load avg: 24.69 [ 95/423/3] test_datetime passed 0:00:35 load avg: 24.69 [ 96/423/3] test_dbm_gnu skipped test_dbm_gnu skipped -- No module named '_gdbm' 0:00:36 load avg: 24.69 [ 97/423/3] test_dbm_ndbm skipped test_dbm_ndbm skipped -- No module named '_dbm' 0:00:36 load avg: 24.63 [ 98/423/3] test_decorators passed 0:00:37 load avg: 24.63 [ 99/423/3] test_defaultdict passed 0:00:38 load avg: 24.40 [100/423/3] test_deque passed -- running: test_asyncio (31.4 sec) 0:00:39 load avg: 24.40 [101/423/3] test_dbm_dumb passed -- running: test_asyncio (31.5 sec) 0:00:39 load avg: 24.22 [102/423/3] test_descrtut passed -- running: test_asyncio (31.9 sec) 0:00:40 load avg: 24.22 [103/423/3] test_devpoll skipped -- running: test_asyncio (32.6 sec) test_devpoll skipped -- test works only on Solaris OS family 0:00:40 load avg: 24.24 [104/423/3] test_dict_version passed -- running: test_asyncio (33.0 sec) 0:00:40 load avg: 24.24 [105/423/3] test_descr passed -- running: test_asyncio (33.2 sec) 0:00:41 load avg: 24.24 [106/423/3] test_dictcomps passed -- running: test_asyncio (33.5 sec) 0:00:41 load avg: 24.24 [107/423/3] test_dictviews passed -- running: test_asyncio (33.6 sec) 0:00:42 load avg: 24.22 [108/423/3] test_dis passed -- running: test_asyncio (34.6 sec) 0:00:42 load avg: 24.22 [109/423/3] test_difflib passed -- running: test_asyncio (34.9 sec) 0:00:44 load avg: 24.21 [110/423/3] test_decimal passed -- running: test_asyncio (37.0 sec) 0:00:44 load avg: 24.09 [111/423/3] test_dtrace passed -- running: test_asyncio (37.5 sec) 0:00:45 load avg: 24.09 [112/423/3] test_dummy_thread passed -- running: test_asyncio (37.9 sec) 0:00:45 load avg: 23.91 [113/423/3] test_dummy_threading passed -- running: test_asyncio (38.3 sec) 0:00:46 load avg: 23.91 [114/423/3] test_dynamic passed -- running: test_asyncio (38.7 sec) 0:00:46 load avg: 23.91 [115/423/3] test_dynamicclassattribute passed -- running: test_asyncio (39.1 sec) 0:00:47 load avg: 23.64 [116/423/3] test_eintr passed -- running: test_asyncio (39.6 sec) 0:00:48 load avg: 23.38 [117/423/4] test_compileall failed -- running: test_asyncio (41.3 sec) test test_compileall failed -- Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_py_compile.py", line 20, in wrapper return fxn(*args, **kwargs) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_py_compile.py", line 20, in wrapper return fxn(*args, **kwargs) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_compileall.py", line 322, in test_no_args_respects_force_flag self.assertRunOK('-f', PYTHONPATH=self.directory) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_compileall.py", line 271, in assertRunOK rc, out, err = script_helper.assert_python_ok( File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\support\script_helper.py", line 157, in assert_python_ok return _assert_python(True, *args, **env_vars) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\support\script_helper.py", line 143, in _assert_python res.fail(cmd_line) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\support\script_helper.py", line 70, in fail raise AssertionError("Process return code is %d\n" AssertionError: Process return code is 1 command line: ['C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe', '-X', 'faulthandler', '-S', '-m', 'compileall', '-f'] stdout: --- (... truncated stdout ...)\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\optparse.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\os.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pathlib.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pdb.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pickle.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pickletools.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pipes.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pkgutil.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\platform.py'... *** PermissionError: [WinError 5] Access is denied: 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\__pycache__\\platform.cpython-38.pyc.9113376' -> 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\__pycache__\\platform.cpython-38.pyc' Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\plistlib.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\poplib.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\posixpath.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pprint.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\profile.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pstats.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pty.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\py_compile.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pyclbr.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\pydoc.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\queue.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\quopri.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\random.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\re.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\reprlib.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\rlcompleter.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\runpy.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\sched.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\secrets.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\selectors.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\shelve.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\shlex.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\shutil.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\signal.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\site.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\smtpd.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\smtplib.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\sndhdr.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\socket.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\socketserver.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\sre_compile.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\sre_constants.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\sre_parse.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\ssl.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\stat.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\statistics.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\string.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\stringprep.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\struct.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\subprocess.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\sunau.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\symbol.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\symtable.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\sysconfig.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\tabnanny.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\tarfile.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\telnetlib.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\tempfile.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\textwrap.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\this.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\threading.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\timeit.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\token.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\tokenize.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\trace.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\traceback.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\tracemalloc.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\tty.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\turtle.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\types.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\typing.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\uu.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\uuid.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\warnings.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\wave.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\weakref.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\webbrowser.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\xdrlib.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\zipapp.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\zipfile.py'... Compiling 'C:\\Users\\tusha\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\zipimport.py'... --- stderr: --- --- 0:00:49 load avg: 23.38 [118/423/4] test_embed passed -- running: test_asyncio (42.1 sec) 0:00:50 load avg: 23.34 [119/423/4] test_ensurepip passed -- running: test_asyncio (43.3 sec) 0:00:51 load avg: 23.06 [120/423/4] test_enum passed -- running: test_asyncio (44.5 sec) 0:00:52 load avg: 23.06 [121/423/4] test_enumerate passed -- running: test_asyncio (44.8 sec) 0:00:52 load avg: 23.06 [122/423/4] test_eof passed -- running: test_asyncio (45.3 sec) 0:00:53 load avg: 22.88 [123/423/4] test_epoll skipped -- running: test_asyncio (45.6 sec) test_epoll skipped -- test works only on Linux 2.6 0:00:53 load avg: 22.88 [124/423/4] test_errno passed -- running: test_asyncio (45.9 sec) 0:00:53 load avg: 22.88 [125/423/4] test_exception_hierarchy passed -- running: test_asyncio (46.2 sec) 0:00:54 load avg: 22.55 [126/423/4] test_exception_variations passed -- running: test_asyncio (46.6 sec) 0:00:54 load avg: 22.55 [127/423/4] test_extcall passed -- running: test_asyncio (46.9 sec) 0:00:56 load avg: 21.99 [128/423/4] test_email passed -- running: test_asyncio (49.5 sec) 0:00:57 load avg: 21.70 [129/423/4] test_fcntl skipped -- running: test_asyncio (49.8 sec) test_fcntl skipped -- No module named 'fcntl' 0:00:57 load avg: 21.70 [130/423/4] test_file passed -- running: test_asyncio (50.2 sec) 0:00:57 load avg: 21.70 [131/423/4] test_file_eintr passed -- running: test_asyncio (50.5 sec) 0:00:58 load avg: 21.50 [132/423/4] test_filecmp passed -- running: test_concurrent_futures (30.6 sec), test_asyncio (51.2 sec) 0:00:59 load avg: 21.55 [133/423/4] test_fileinput passed -- running: test_concurrent_futures (31.3 sec), test_asyncio (51.9 sec) 0:00:59 load avg: 21.55 [134/423/4] test_docxmlrpc passed -- running: test_concurrent_futures (31.9 sec), test_asyncio (52.5 sec) 0:01:00 load avg: 21.55 [135/423/4] test_fileio passed -- running: test_concurrent_futures (32.0 sec), test_asyncio (52.6 sec) 0:01:00 load avg: 21.35 [136/423/4] test_float passed -- running: test_concurrent_futures (32.8 sec), test_asyncio (53.3 sec) 0:01:00 load avg: 21.35 [137/423/4] test_finalization passed -- running: test_concurrent_futures (32.8 sec), test_asyncio (53.4 sec) 0:01:01 load avg: 21.27 [138/423/4] test_fnmatch passed -- running: test_concurrent_futures (33.2 sec), test_asyncio (53.8 sec) 0:01:01 load avg: 21.27 [139/423/4] test_flufl passed -- running: test_concurrent_futures (33.2 sec), test_asyncio (53.8 sec) 0:01:01 load avg: 21.27 [140/423/4] test_fork1 skipped -- running: test_concurrent_futures (33.6 sec), test_asyncio (54.2 sec) test_fork1 skipped -- object has no attribute 'fork' 0:01:01 load avg: 21.27 [141/423/4] test_format passed -- running: test_concurrent_futures (33.7 sec), test_asyncio (54.3 sec) 0:01:02 load avg: 21.26 [142/423/4] test_fractions passed -- running: test_concurrent_futures (34.2 sec), test_asyncio (54.8 sec) 0:01:02 load avg: 21.26 [143/423/4] test_frame passed -- running: test_concurrent_futures (34.2 sec), test_asyncio (54.8 sec) 0:01:02 load avg: 21.26 [144/423/4] test_frozen passed -- running: test_concurrent_futures (34.7 sec), test_asyncio (55.3 sec) 0:01:03 load avg: 21.24 [145/423/4] test_fstring passed -- running: test_concurrent_futures (35.4 sec), test_asyncio (56.0 sec) 0:01:04 load avg: 21.24 [146/423/4] test_funcattrs passed -- running: test_concurrent_futures (36.0 sec), test_asyncio (56.5 sec) 0:01:05 load avg: 20.95 [147/423/4] test_functools passed -- running: test_concurrent_futures (37.4 sec), test_asyncio (58.0 sec) 0:01:05 load avg: 20.95 [148/423/4] test_future passed -- running: test_concurrent_futures (37.9 sec), test_asyncio (58.5 sec) 0:01:06 load avg: 20.95 [149/423/4] test_future3 passed -- running: test_concurrent_futures (38.2 sec), test_asyncio (58.8 sec) 0:01:06 load avg: 20.61 [150/423/4] test_future4 passed -- running: test_concurrent_futures (38.5 sec), test_asyncio (59.0 sec) 0:01:06 load avg: 20.61 [151/423/4] test_future5 passed -- running: test_concurrent_futures (38.7 sec), test_asyncio (59.3 sec) 0:01:10 load avg: 20.02 [152/423/4] test_gc passed -- running: test_concurrent_futures (42.2 sec), test_asyncio (1 min 2 sec) 0:01:11 load avg: 19.89 [153/423/4] test_gdb skipped -- running: test_concurrent_futures (43.8 sec), test_asyncio (1 min 4 sec) test_gdb skipped -- test_gdb only works on source builds at the moment. 0:01:12 load avg: 19.89 [154/423/4] test_generator_stop passed -- running: test_distutils (30.0 sec), test_concurrent_futures (44.1 sec), test_asyncio (1 min 4 sec) 0:01:12 load avg: 19.89 [155/423/4] test_faulthandler passed -- running: test_distutils (30.6 sec), test_concurrent_futures (44.6 sec), test_asyncio (1 min 5 sec) 0:01:12 load avg: 19.89 [156/423/4] test_generators passed -- running: test_distutils (30.7 sec), test_concurrent_futures (44.8 sec), test_asyncio (1 min 5 sec) 0:01:12 load avg: 19.89 [157/423/4] test_genericclass passed -- running: test_distutils (30.9 sec), test_concurrent_futures (44.9 sec), test_asyncio (1 min 5 sec) 0:01:13 load avg: 19.89 [158/423/4] test_genericpath passed -- running: test_distutils (31.1 sec), test_concurrent_futures (45.1 sec), test_asyncio (1 min 5 sec) 0:01:13 load avg: 19.89 [159/423/4] test_genexps passed -- running: test_distutils (31.2 sec), test_concurrent_futures (45.3 sec), test_asyncio (1 min 5 sec) 0:01:13 load avg: 19.89 [160/423/4] test_asyncio passed (1 min 5 sec) -- running: test_distutils (31.4 sec), test_concurrent_futures (45.4 sec) Cancelling an overlapped future failed future: <_OverlappedFuture pending overlapped= cb=[BaseProactorEventLoop._loop_self_reading()]> Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\asyncio\windows_events.py", line 66, in _cancel_overlapped self._ov.cancel() OSError: [WinError 6] The handle is invalid Cancelling an overlapped future failed future: <_OverlappedFuture pending overlapped= cb=[BaseProactorEventLoop._loop_self_reading()]> Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\asyncio\windows_events.py", line 66, in _cancel_overlapped self._ov.cancel() OSError: [WinError 6] The handle is invalid 0:01:13 load avg: 19.68 [161/423/4] test_getargs2 passed -- running: test_distutils (31.5 sec), test_concurrent_futures (45.5 sec) 0:01:13 load avg: 19.68 [162/423/4] test_getopt passed -- running: test_distutils (31.6 sec), test_concurrent_futures (45.7 sec) 0:01:13 load avg: 19.68 [163/423/4] test_getpass passed -- running: test_distutils (31.7 sec), test_concurrent_futures (45.8 sec) 0:01:14 load avg: 19.68 [164/423/4] test_global passed -- running: test_distutils (32.1 sec), test_concurrent_futures (46.2 sec) 0:01:14 load avg: 19.68 [165/423/4] test_gettext passed -- running: test_distutils (32.2 sec), test_concurrent_futures (46.3 sec) 0:01:14 load avg: 19.70 [166/423/4] test_grp skipped -- running: test_distutils (32.6 sec), test_concurrent_futures (46.7 sec) test_grp skipped -- No module named 'grp' 0:01:15 load avg: 19.70 [167/423/4] test_glob passed -- running: test_distutils (33.4 sec), test_concurrent_futures (47.4 sec) 0:01:16 load avg: 19.74 [168/423/4] test_gzip passed -- running: test_distutils (34.5 sec), test_concurrent_futures (48.5 sec) 0:01:16 load avg: 19.74 [169/423/5] test_distutils failed (34.1 sec) -- running: test_concurrent_futures (48.5 sec) foo.c LINK : fatal error LNK1104: cannot open file 'kernel32.lib' foo.c LINK : fatal error LNK1104: cannot open file 'kernel32.lib' C:\Users\tusha\AppData\Local\Temp\test_python_5700\test_python_worker_492>exit 1 C:\Users\tusha\AppData\Local\Temp\test_python_5700\test_python_worker_492>exit 0 test test_distutils failed -- multiple errors occurred; run in verbose mode for details 0:01:16 load avg: 19.84 [170/423/5] test_hmac passed -- running: test_concurrent_futures (48.9 sec) 0:01:17 load avg: 19.84 [171/423/5] test_hashlib passed -- running: test_concurrent_futures (49.0 sec) 0:01:17 load avg: 19.84 [172/423/5] test_hash passed -- running: test_concurrent_futures (49.1 sec) 0:01:17 load avg: 19.84 [173/423/5] test_html passed -- running: test_concurrent_futures (49.2 sec) 0:01:17 load avg: 19.84 [174/423/5] test_htmlparser passed -- running: test_concurrent_futures (49.3 sec) 0:01:17 load avg: 19.84 [175/423/5] test_heapq passed -- running: test_concurrent_futures (49.5 sec) 0:01:17 load avg: 19.76 [176/423/5] test_http_cookies passed -- running: test_concurrent_futures (49.6 sec) 0:01:18 load avg: 19.76 [177/423/5] test_http_cookiejar passed -- running: test_concurrent_futures (50.1 sec) 0:01:21 load avg: 19.26 [178/423/5] test_httpservers passed -- running: test_concurrent_futures (53.5 sec) 0:01:21 load avg: 19.11 [179/423/5] test_ftplib passed -- running: test_concurrent_futures (53.7 sec) 0:01:22 load avg: 19.11 [180/423/5] test_imghdr passed -- running: test_concurrent_futures (54.0 sec) 0:01:22 load avg: 19.11 [181/423/5] test_imp passed -- running: test_concurrent_futures (54.3 sec) 0:01:24 load avg: 18.78 [182/423/5] test_import passed -- running: test_concurrent_futures (56.0 sec) 0:01:24 load avg: 18.78 [183/423/5] test_index passed -- running: test_concurrent_futures (56.4 sec) 0:01:25 load avg: 18.34 [184/423/5] test_inspect passed -- running: test_concurrent_futures (57.7 sec) 0:01:26 load avg: 18.34 [185/423/5] test_int passed -- running: test_concurrent_futures (58.1 sec) 0:01:26 load avg: 18.34 [186/423/5] test_int_literal passed -- running: test_concurrent_futures (58.5 sec) 0:01:26 load avg: 18.07 [187/423/5] test_importlib passed -- running: test_concurrent_futures (58.8 sec) 0:01:27 load avg: 18.07 [188/423/5] test_ioctl skipped -- running: test_concurrent_futures (59.0 sec) test_ioctl skipped -- No module named 'fcntl' 0:01:27 load avg: 18.07 [189/423/5] test_ipaddress passed -- running: test_concurrent_futures (59.4 sec) 0:01:27 load avg: 17.92 [190/423/5] test_isinstance passed -- running: test_concurrent_futures (59.8 sec) 0:01:28 load avg: 17.92 [191/423/5] test_iter passed -- running: test_concurrent_futures (1 min) 0:01:28 load avg: 17.92 [192/423/5] test_iterlen passed -- running: test_concurrent_futures (1 min) 0:01:29 load avg: 17.63 [193/423/5] test_idle passed -- running: test_concurrent_futures (1 min 1 sec) 0:01:31 load avg: 17.18 [194/423/5] test_imaplib passed -- running: test_concurrent_futures (1 min 3 sec) 0:01:31 load avg: 17.18 [195/423/5] test_json passed -- running: test_concurrent_futures (1 min 3 sec) 0:01:31 load avg: 17.18 [196/423/5] test_keyword passed -- running: test_concurrent_futures (1 min 3 sec) 0:01:31 load avg: 17.18 [197/423/5] test_keywordonlyarg passed -- running: test_concurrent_futures (1 min 3 sec) 0:01:31 load avg: 16.99 [198/423/5] test_kqueue skipped -- running: test_concurrent_futures (1 min 3 sec) test_kqueue skipped -- test works only on BSD 0:01:32 load avg: 16.99 [199/423/5] test_largefile passed -- running: test_concurrent_futures (1 min 4 sec) 0:01:32 load avg: 16.99 [200/423/5] test_itertools passed -- running: test_concurrent_futures (1 min 4 sec) 0:01:32 load avg: 16.99 [201/423/5] test_linecache passed -- running: test_concurrent_futures (1 min 4 sec) 0:01:32 load avg: 16.99 [202/423/5] test_list passed -- running: test_concurrent_futures (1 min 4 sec) 0:01:32 load avg: 16.99 [203/423/5] test_listcomps passed -- running: test_concurrent_futures (1 min 4 sec) 0:01:33 load avg: 16.80 [204/423/6] test_locale failed -- running: test_concurrent_futures (1 min 5 sec) test test_locale failed -- Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_locale.py", line 567, in test_getsetlocale_issue1813 locale.setlocale(locale.LC_CTYPE, loc) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\locale.py", line 608, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting 0:01:33 load avg: 16.80 [205/423/6] test_lltrace passed -- running: test_concurrent_futures (1 min 5 sec) 0:01:36 load avg: 16.06 [206/423/6] test_long passed -- running: test_concurrent_futures (1 min 8 sec) 0:01:37 load avg: 15.79 [207/423/6] test_longexp passed -- running: test_concurrent_futures (1 min 9 sec) 0:01:38 load avg: 15.53 [208/423/6] test_io passed -- running: test_concurrent_futures (1 min 10 sec) 0:01:41 load avg: 14.81 [209/423/6] test_mailbox passed -- running: test_concurrent_futures (1 min 13 sec) 0:01:42 load avg: 14.60 [210/423/6] test_mailcap passed -- running: test_concurrent_futures (1 min 14 sec) 0:01:42 load avg: 14.60 [211/423/6] test_lzma passed -- running: test_concurrent_futures (1 min 14 sec) 0:01:42 load avg: 14.60 [212/423/6] test_lib2to3 passed -- running: test_concurrent_futures (1 min 14 sec) 0:01:42 load avg: 14.60 [213/423/6] test_memoryio passed -- running: test_concurrent_futures (1 min 14 sec) 0:01:43 load avg: 14.49 [214/423/6] test_memoryview passed -- running: test_concurrent_futures (1 min 15 sec) 0:01:43 load avg: 14.49 [215/423/6] test_httplib passed -- running: test_concurrent_futures (1 min 15 sec) 0:01:43 load avg: 14.49 [216/423/6] test_metaclass passed -- running: test_concurrent_futures (1 min 15 sec) 0:01:44 load avg: 14.40 [217/423/6] test_minidom passed -- running: test_concurrent_futures (1 min 16 sec) 0:01:46 load avg: 14.48 [218/423/6] test_mimetypes passed -- running: test_concurrent_futures (1 min 18 sec) 0:01:46 load avg: 14.48 [219/423/6] test_math passed -- running: test_concurrent_futures (1 min 18 sec) 0:01:46 load avg: 14.48 [220/423/6] test_module passed -- running: test_concurrent_futures (1 min 18 sec) 0:01:47 load avg: 14.65 [221/423/6] test_msilib passed -- running: test_concurrent_futures (1 min 19 sec) 0:01:47 load avg: 14.65 [222/423/6] test_modulefinder passed -- running: test_concurrent_futures (1 min 19 sec) 0:01:47 load avg: 14.65 [223/423/6] test_multiprocessing_fork skipped -- running: test_concurrent_futures (1 min 19 sec) test_multiprocessing_fork skipped -- fork is not available on Windows 0:01:47 load avg: 14.65 [224/423/6] test_multiprocessing_forkserver skipped -- running: test_concurrent_futures (1 min 19 sec) test_multiprocessing_forkserver skipped -- forkserver is not available on Windows 0:01:47 load avg: 14.65 [225/423/6] test_marshal passed -- running: test_concurrent_futures (1 min 19 sec) 0:01:48 load avg: 14.66 [226/423/6] test_multibytecodec passed -- running: test_concurrent_futures (1 min 20 sec) 0:01:48 load avg: 14.66 [227/423/6] test_named_expressions passed -- running: test_concurrent_futures (1 min 20 sec) 0:01:49 load avg: 14.75 [228/423/6] test_netrc passed -- running: test_concurrent_futures (1 min 21 sec) 0:01:49 load avg: 14.75 [229/423/6] test_nis skipped -- running: test_concurrent_futures (1 min 21 sec) test_nis skipped -- No module named 'nis' 0:01:52 load avg: 14.40 [230/423/6] test_nntplib passed -- running: test_concurrent_futures (1 min 24 sec) 0:01:52 load avg: 14.40 [231/423/6] test_multiprocessing_main_handling passed -- running: test_concurrent_futures (1 min 24 sec) 0:01:53 load avg: 14.40 [232/423/6] test_normalization passed -- running: test_concurrent_futures (1 min 25 sec) 0:01:53 load avg: 14.41 [233/423/6] test_ntpath passed -- running: test_concurrent_futures (1 min 25 sec) 0:01:53 load avg: 14.41 [234/423/6] test_numeric_tower passed -- running: test_concurrent_futures (1 min 25 sec) 0:01:53 load avg: 14.41 [235/423/6] test_openpty skipped -- running: test_concurrent_futures (1 min 25 sec) test_openpty skipped -- os.openpty() not available. 0:01:53 load avg: 14.41 [236/423/6] test_operator passed -- running: test_concurrent_futures (1 min 25 sec) 0:01:54 load avg: 14.41 [237/423/6] test_optparse passed -- running: test_concurrent_futures (1 min 26 sec) 0:01:54 load avg: 14.45 [238/423/6] test_ordered_dict passed -- running: test_concurrent_futures (1 min 26 sec) 0:01:55 load avg: 14.45 [239/423/6] test_ossaudiodev skipped (resource denied) -- running: test_concurrent_futures (1 min 27 sec) test_ossaudiodev skipped -- Use of the 'audio' resource not enabled 0:01:55 load avg: 14.45 [240/423/6] test_osx_env passed -- running: test_concurrent_futures (1 min 27 sec) 0:01:55 load avg: 14.39 [241/423/6] test_parser passed -- running: test_concurrent_futures (1 min 27 sec) 0:01:58 load avg: 14.49 [242/423/6] test_logging passed -- running: test_concurrent_futures (1 min 30 sec) 0:01:58 load avg: 14.49 [243/423/6] test_pathlib passed -- running: test_concurrent_futures (1 min 30 sec) 0:01:59 load avg: 14.49 [244/423/6] test_peepholer passed -- running: test_concurrent_futures (1 min 31 sec) 0:01:59 load avg: 14.49 [245/423/6] test_os passed -- running: test_concurrent_futures (1 min 31 sec) 0:01:59 load avg: 14.49 [246/423/7] test_pickle failed -- running: test_concurrent_futures (1 min 31 sec) test test_pickle crashed -- Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 221, in _runtest_inner2 the_module = importlib.import_module(abstest) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_pickle.py", line 14, in from test.pickletester import AbstractHookTests File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\pickletester.py", line 38, in import numpy as np File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 138, in from . import _distributor_init File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in WinDLL(os.path.abspath(filename)) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application 0:01:59 load avg: 14.55 [247/423/7] test_picklebuffer passed -- running: test_concurrent_futures (1 min 31 sec) 0:01:59 load avg: 14.55 [248/423/7] test_mmap passed -- running: test_concurrent_futures (1 min 31 sec) 0:01:59 load avg: 14.55 [249/423/8] test_pickletools failed -- running: test_concurrent_futures (1 min 31 sec) test test_pickletools crashed -- Traceback (most recent call last): File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\libregrtest\runtest.py", line 221, in _runtest_inner2 the_module = importlib.import_module(abstest) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 783, in exec_module File "", line 219, in _call_with_frames_removed File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_pickletools.py", line 4, in from test.pickletester import AbstractPickleTests File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\pickletester.py", line 38, in import numpy as np File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 138, in from . import _distributor_init File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in WinDLL(os.path.abspath(filename)) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application 0:02:00 load avg: 14.55 [250/423/8] test_pipes skipped -- running: test_concurrent_futures (1 min 32 sec) test_pipes skipped -- pipes module only works on posix 0:02:00 load avg: 14.55 [251/423/8] test_pkgimport passed -- running: test_concurrent_futures (1 min 32 sec) 0:02:00 load avg: 14.55 [252/423/8] test_pkg passed -- running: test_concurrent_futures (1 min 32 sec) 0:02:00 load avg: 14.77 [253/423/8] test_pkgutil passed -- running: test_concurrent_futures (1 min 32 sec) 0:02:00 load avg: 14.77 [254/423/8] test_platform passed -- running: test_concurrent_futures (1 min 32 sec) 0:02:00 load avg: 14.77 [255/423/8] test_plistlib passed -- running: test_concurrent_futures (1 min 32 sec) 0:02:01 load avg: 14.77 [256/423/8] test_poll skipped -- running: test_concurrent_futures (1 min 32 sec) test_poll skipped -- select.poll not defined 0:02:01 load avg: 14.77 [257/423/8] test_positional_only_arg passed -- running: test_concurrent_futures (1 min 33 sec) 0:02:01 load avg: 14.82 [258/423/8] test_popen passed -- running: test_concurrent_futures (1 min 33 sec) 0:02:01 load avg: 14.82 [259/423/8] test_pdb passed -- running: test_concurrent_futures (1 min 33 sec) 0:02:01 load avg: 14.82 [260/423/8] test_posix skipped -- running: test_concurrent_futures (1 min 33 sec) test_posix skipped -- No module named 'posix' 0:02:02 load avg: 14.82 [261/423/8] test_posixpath passed -- running: test_concurrent_futures (1 min 34 sec) 0:02:02 load avg: 14.82 [262/423/8] test_pprint passed -- running: test_concurrent_futures (1 min 34 sec) 0:02:02 load avg: 14.82 [263/423/8] test_concurrent_futures passed (1 min 34 sec) 0:02:02 load avg: 14.89 [264/423/8] test_pow passed 0:02:02 load avg: 14.89 [265/423/8] test_print passed 0:02:02 load avg: 14.89 [266/423/8] test_property passed 0:02:03 load avg: 14.89 [267/423/8] test_pstats passed 0:02:03 load avg: 14.89 [268/423/8] test_pty skipped test_pty skipped -- No module named 'termios' 0:02:03 load avg: 14.89 [269/423/8] test_profile passed 0:02:03 load avg: 14.89 [270/423/8] test_pulldom passed 0:02:03 load avg: 14.89 [271/423/8] test_pwd skipped test_pwd skipped -- No module named 'pwd' 0:02:03 load avg: 14.98 [272/423/8] test_py_compile passed 0:02:04 load avg: 14.98 [273/423/8] test_pyexpat passed 0:02:04 load avg: 14.98 [274/423/8] test_quopri passed 0:02:04 load avg: 14.96 [275/423/8] test_raise passed 0:02:05 load avg: 14.96 [276/423/8] test_pyclbr passed 0:02:05 load avg: 14.71 [277/423/8] test_random passed 0:02:06 load avg: 14.71 [278/423/8] test_range passed 0:02:06 load avg: 14.71 [279/423/8] test_readline skipped test_readline skipped -- No module named 'readline' 0:02:06 load avg: 14.49 [280/423/8] test_re passed 0:02:07 load avg: 14.49 [281/423/8] test_repl passed 0:02:07 load avg: 14.25 [282/423/8] test_reprlib passed 0:02:08 load avg: 14.25 [283/423/8] test_resource skipped test_resource skipped -- No module named 'resource' 0:02:08 load avg: 14.25 [284/423/8] test_richcmp passed 0:02:08 load avg: 14.25 [285/423/8] test_rlcompleter passed 0:02:09 load avg: 14.01 [286/423/8] test_pydoc passed 0:02:11 load avg: 13.55 [287/423/8] test_robotparser passed 0:02:12 load avg: 14.02 [288/423/8] test_runpy passed 0:02:12 load avg: 14.02 [289/423/8] test_sax passed 0:02:13 load avg: 14.00 [290/423/8] test_scope passed 0:02:13 load avg: 14.00 [291/423/8] test_poplib passed 0:02:13 load avg: 14.00 [292/423/8] test_sched passed 0:02:13 load avg: 14.00 [293/423/8] test_secrets passed 0:02:13 load avg: 14.00 [294/423/8] test_script_helper passed 0:02:13 load avg: 14.00 [295/423/8] test_select passed 0:02:14 load avg: 13.95 [296/423/8] test_setcomps passed 0:02:14 load avg: 13.76 [297/423/8] test_shelve passed 0:02:15 load avg: 13.76 [298/423/8] test_set passed 0:02:15 load avg: 13.76 [299/423/8] test_shlex passed 0:02:15 load avg: 13.53 [300/423/8] test_selectors passed 0:02:16 load avg: 13.53 [301/423/8] test_signal passed 0:02:16 load avg: 13.53 [302/423/8] test_slice passed 0:02:17 load avg: 13.39 [303/423/8] test_smtpd passed 0:02:18 load avg: 13.17 [304/423/8] test_site passed -- running: test_multiprocessing_spawn (30.2 sec) 0:02:18 load avg: 13.17 [305/423/8] test_smtpnet skipped (resource denied) -- running: test_multiprocessing_spawn (30.6 sec) test_smtpnet skipped -- Use of the 'network' resource not enabled 0:02:19 load avg: 13.16 [306/423/8] test_sndhdr passed -- running: test_multiprocessing_spawn (31.2 sec) 0:02:22 load avg: 13.06 [307/423/8] test_queue passed -- running: test_multiprocessing_spawn (34.2 sec) 0:02:22 load avg: 13.06 [308/423/8] test_socketserver skipped (resource denied) -- running: test_multiprocessing_spawn (34.5 sec) test_socketserver skipped -- Use of the 'network' resource not enabled 0:02:22 load avg: 13.06 [309/423/8] test_sort passed -- running: test_multiprocessing_spawn (34.9 sec) 0:02:26 load avg: 12.64 [310/423/8] test_smtplib passed -- running: test_multiprocessing_spawn (38.4 sec) 0:02:26 load avg: 12.64 [311/423/8] test_spwd skipped -- running: test_multiprocessing_spawn (38.9 sec) test_spwd skipped -- No module named 'spwd' 0:02:26 load avg: 12.64 [312/423/8] test_source_encoding passed -- running: test_multiprocessing_spawn (39.1 sec) 0:02:35 load avg: 11.19 [313/423/8] test_sqlite passed -- running: test_multiprocessing_spawn (48.1 sec) 0:02:36 load avg: 11.19 [314/423/8] test_shutil passed -- running: test_multiprocessing_spawn (48.3 sec) 0:02:36 load avg: 11.12 [315/423/8] test_stat passed -- running: test_multiprocessing_spawn (48.6 sec) 0:02:36 load avg: 11.12 [316/423/8] test_startfile passed -- running: test_multiprocessing_spawn (48.7 sec) 0:02:37 load avg: 11.12 [317/423/8] test_strftime passed -- running: test_multiprocessing_spawn (49.2 sec), test_regrtest (30.4 sec) 0:02:37 load avg: 11.07 [318/423/8] test_string passed -- running: test_multiprocessing_spawn (49.5 sec), test_regrtest (30.7 sec) 0:02:37 load avg: 11.07 [319/423/8] test_string_literals passed -- running: test_multiprocessing_spawn (49.9 sec), test_regrtest (31.1 sec) 0:02:38 load avg: 11.07 [320/423/8] test_stringprep passed -- running: test_multiprocessing_spawn (50.2 sec), test_regrtest (31.4 sec) 0:02:38 load avg: 11.12 [321/423/8] test_strptime passed -- running: test_multiprocessing_spawn (50.7 sec), test_regrtest (31.9 sec) 0:02:39 load avg: 11.19 [322/423/8] test_strtod passed -- running: test_multiprocessing_spawn (52.1 sec), test_regrtest (33.3 sec) 0:02:40 load avg: 11.22 [323/423/8] test_struct passed -- running: test_multiprocessing_spawn (52.9 sec), test_regrtest (34.1 sec) 0:02:41 load avg: 11.44 [324/423/8] test_structmembers passed -- running: test_multiprocessing_spawn (53.8 sec), test_regrtest (35.0 sec) 0:02:41 load avg: 11.44 [325/423/8] test_structseq passed -- running: test_multiprocessing_spawn (54.1 sec), test_regrtest (35.3 sec) 0:02:42 load avg: 11.44 [326/423/8] test_subclassinit passed -- running: test_multiprocessing_spawn (54.5 sec), test_regrtest (35.7 sec) 0:02:47 load avg: 12.34 [327/423/8] test_statistics passed -- running: test_multiprocessing_spawn (59.7 sec), test_regrtest (40.9 sec) 0:02:48 load avg: 12.58 [328/423/8] test_regrtest passed (41.2 sec) -- running: test_multiprocessing_spawn (1 min) 0:02:48 load avg: 12.58 [329/423/8] test_sundry passed -- running: test_multiprocessing_spawn (1 min) 0:02:48 load avg: 12.72 [330/423/8] test_sunau passed -- running: test_multiprocessing_spawn (1 min 1 sec) 0:02:49 load avg: 12.72 [331/423/8] test_super passed -- running: test_multiprocessing_spawn (1 min 1 sec), test_socket (30.3 sec) 0:02:49 load avg: 12.72 [332/423/8] test_symbol passed -- running: test_multiprocessing_spawn (1 min 1 sec), test_socket (30.3 sec) 0:02:49 load avg: 12.72 [333/423/8] test_symtable passed -- running: test_multiprocessing_spawn (1 min 1 sec), test_socket (30.6 sec) 0:02:49 load avg: 12.72 [334/423/8] test_syntax passed -- running: test_multiprocessing_spawn (1 min 1 sec), test_socket (30.7 sec) 0:02:50 load avg: 12.58 [335/423/8] test_sys_setprofile passed -- running: test_multiprocessing_spawn (1 min 2 sec), test_socket (31.0 sec) 0:02:50 load avg: 12.58 [336/423/8] test_sys_settrace passed -- running: test_multiprocessing_spawn (1 min 2 sec), test_socket (31.4 sec) 0:02:50 load avg: 12.75 [337/423/8] test_sysconfig passed -- running: test_multiprocessing_spawn (1 min 3 sec), test_socket (31.9 sec) 0:02:51 load avg: 12.75 [338/423/8] test_syslog skipped -- running: test_multiprocessing_spawn (1 min 3 sec), test_socket (32.5 sec) test_syslog skipped -- No module named 'syslog' 0:02:52 load avg: 12.88 [339/423/8] test_ssl passed -- running: test_multiprocessing_spawn (1 min 4 sec), test_socket (33.2 sec) 0:02:52 load avg: 12.88 [340/423/8] test_tabnanny passed -- running: test_multiprocessing_spawn (1 min 5 sec), test_socket (33.8 sec) 0:02:53 load avg: 12.72 [341/423/8] test_sys passed -- running: test_multiprocessing_spawn (1 min 5 sec), test_socket (34.2 sec) 0:02:54 load avg: 12.76 [342/423/8] test_tcl passed -- running: test_multiprocessing_spawn (1 min 7 sec), test_socket (35.8 sec) 0:02:56 load avg: 12.75 [343/423/8] test_tempfile passed -- running: test_multiprocessing_spawn (1 min 8 sec), test_socket (37.7 sec) 0:02:57 load avg: 12.72 [344/423/8] test_textwrap passed -- running: test_multiprocessing_spawn (1 min 9 sec), test_socket (38.1 sec) 0:02:58 load avg: 12.51 [345/423/8] test_thread passed -- running: test_multiprocessing_spawn (1 min 10 sec), test_socket (39.2 sec) 0:02:59 load avg: 12.35 [346/423/8] test_threaded_import passed -- running: test_multiprocessing_spawn (1 min 11 sec), test_socket (40.6 sec) 0:03:00 load avg: 12.32 [347/423/8] test_threadedtempfile passed -- running: test_multiprocessing_spawn (1 min 12 sec), test_socket (41.1 sec) 0:03:02 load avg: 11.98 [348/423/8] test_tarfile passed -- running: test_multiprocessing_spawn (1 min 14 sec), test_socket (43.8 sec) 0:03:03 load avg: 11.78 [349/423/8] test_threading_local passed -- running: test_multiprocessing_spawn (1 min 15 sec), test_socket (44.3 sec) 0:03:03 load avg: 11.78 [350/423/8] test_threadsignals skipped -- running: test_multiprocessing_spawn (1 min 15 sec), test_socket (44.5 sec) test_threadsignals skipped -- Can't test signal on win32 0:03:05 load avg: 11.39 [351/423/8] test_time passed -- running: test_multiprocessing_spawn (1 min 18 sec), test_socket (46.9 sec) 0:03:06 load avg: 11.21 [352/423/8] test_timeit passed -- running: test_multiprocessing_spawn (1 min 18 sec), test_socket (47.1 sec) 0:03:06 load avg: 11.21 [353/423/8] test_timeout skipped (resource denied) -- running: test_multiprocessing_spawn (1 min 18 sec), test_socket (47.4 sec) test_timeout skipped -- Use of the 'network' resource not enabled 0:03:06 load avg: 11.21 [354/423/8] test_subprocess passed -- running: test_multiprocessing_spawn (1 min 18 sec), test_socket (47.7 sec) a DOS box should flash briefly ... 0:03:07 load avg: 11.22 [355/423/8] test_tix passed -- running: test_multiprocessing_spawn (1 min 20 sec), test_socket (48.9 sec) 0:03:09 load avg: 11.20 [356/423/8] test_telnetlib passed -- running: test_multiprocessing_spawn (1 min 21 sec), test_socket (50.0 sec) 0:03:10 load avg: 11.71 [357/423/8] test_tokenize passed -- running: test_multiprocessing_spawn (1 min 23 sec), test_socket (51.9 sec) 0:03:13 load avg: 11.74 [358/423/8] test_tk passed -- running: test_multiprocessing_spawn (1 min 25 sec), test_socket (54.2 sec) 0:03:13 load avg: 11.71 [359/423/8] test_threading passed -- running: test_multiprocessing_spawn (1 min 26 sec), test_socket (54.8 sec) 0:03:14 load avg: 11.80 [360/423/8] test_traceback passed -- running: test_multiprocessing_spawn (1 min 27 sec), test_socket (55.9 sec) 0:03:15 load avg: 12.06 [361/423/8] test_tracemalloc passed -- running: test_multiprocessing_spawn (1 min 27 sec), test_socket (56.5 sec) 0:03:16 load avg: 12.06 [362/423/8] test_ttk_textonly passed -- running: test_multiprocessing_spawn (1 min 28 sec), test_socket (57.4 sec) 0:03:18 load avg: 12.72 [363/423/8] test_trace passed -- running: test_multiprocessing_spawn (1 min 30 sec), test_socket (59.3 sec) 0:03:18 load avg: 13.14 [364/423/8] test_tuple passed -- running: test_multiprocessing_spawn (1 min 31 sec), test_socket (59.8 sec) 0:03:18 load avg: 13.14 [365/423/8] test_turtle passed -- running: test_multiprocessing_spawn (1 min 31 sec), test_socket (59.8 sec) 0:03:19 load avg: 13.14 [366/423/8] test_typechecks passed -- running: test_multiprocessing_spawn (1 min 31 sec), test_socket (1 min) 0:03:19 load avg: 13.14 [367/423/8] test_type_comments passed -- running: test_multiprocessing_spawn (1 min 31 sec), test_socket (1 min) 0:03:19 load avg: 13.14 [368/423/8] test_tools passed -- running: test_multiprocessing_spawn (1 min 31 sec), test_socket (1 min) 0:03:20 load avg: 13.55 [369/423/8] test_unary passed -- running: test_multiprocessing_spawn (1 min 32 sec), test_socket (1 min 1 sec) 0:03:20 load avg: 13.55 [370/423/8] test_typing passed -- running: test_multiprocessing_spawn (1 min 32 sec), test_socket (1 min 1 sec) 0:03:20 load avg: 13.55 [371/423/8] test_ucn passed -- running: test_multiprocessing_spawn (1 min 32 sec), test_socket (1 min 1 sec) 0:03:21 load avg: 13.92 [372/423/8] test_unicode_file passed -- running: test_multiprocessing_spawn (1 min 34 sec), test_socket (1 min 2 sec) 0:03:23 load avg: 14.86 [373/423/8] test_unicode_file_functions passed -- running: test_multiprocessing_spawn (1 min 35 sec), test_socket (1 min 4 sec) 0:03:23 load avg: 14.86 [374/423/8] test_ttk_guionly passed -- running: test_multiprocessing_spawn (1 min 35 sec), test_socket (1 min 4 sec) 0:03:23 load avg: 14.86 [375/423/8] test_unicode_identifiers passed -- running: test_multiprocessing_spawn (1 min 35 sec), test_socket (1 min 4 sec) 0:03:24 load avg: 14.86 [376/423/8] test_unicode passed -- running: test_multiprocessing_spawn (1 min 36 sec), test_socket (1 min 5 sec) 0:03:24 load avg: 15.24 [377/423/8] test_unpack passed -- running: test_multiprocessing_spawn (1 min 36 sec), test_socket (1 min 5 sec) 0:03:24 load avg: 15.24 [378/423/8] test_univnewlines passed -- running: test_multiprocessing_spawn (1 min 36 sec), test_socket (1 min 5 sec) 0:03:24 load avg: 15.24 [379/423/8] test_unpack_ex passed -- running: test_multiprocessing_spawn (1 min 36 sec), test_socket (1 min 5 sec) 0:03:25 load avg: 15.37 [380/423/8] test_unicodedata passed -- running: test_multiprocessing_spawn (1 min 38 sec), test_socket (1 min 6 sec) 0:03:26 load avg: 15.11 [381/423/8] test_urllib2net skipped (resource denied) -- running: test_multiprocessing_spawn (1 min 38 sec), test_socket (1 min 7 sec) test_urllib2net skipped -- Use of the 'network' resource not enabled 0:03:26 load avg: 15.11 [382/423/8] test_urllib_response passed -- running: test_multiprocessing_spawn (1 min 38 sec), test_socket (1 min 7 sec) 0:03:26 load avg: 15.11 [383/423/8] test_urllibnet skipped (resource denied) -- running: test_multiprocessing_spawn (1 min 38 sec), test_socket (1 min 7 sec) test_urllibnet skipped -- Use of the 'network' resource not enabled 0:03:27 load avg: 14.86 [384/423/8] test_urlparse passed -- running: test_multiprocessing_spawn (1 min 39 sec), test_socket (1 min 8 sec) 0:03:27 load avg: 14.86 [385/423/8] test_urllib2 passed -- running: test_multiprocessing_spawn (1 min 39 sec), test_socket (1 min 8 sec) 0:03:28 load avg: 14.86 [386/423/8] test_userlist passed -- running: test_multiprocessing_spawn (1 min 40 sec), test_socket (1 min 8 sec) 0:03:28 load avg: 14.86 [387/423/8] test_userdict passed -- running: test_multiprocessing_spawn (1 min 40 sec), test_socket (1 min 9 sec) 0:03:28 load avg: 14.85 [388/423/8] test_urllib passed -- running: test_multiprocessing_spawn (1 min 40 sec), test_socket (1 min 9 sec) 0:03:28 load avg: 14.85 [389/423/8] test_utf8source passed -- running: test_multiprocessing_spawn (1 min 41 sec), test_socket (1 min 9 sec) 0:03:29 load avg: 14.92 [390/423/8] test_uu passed -- running: test_multiprocessing_spawn (1 min 41 sec), test_socket (1 min 10 sec) 0:03:29 load avg: 14.92 [391/423/8] test_userstring passed -- running: test_multiprocessing_spawn (1 min 41 sec), test_socket (1 min 10 sec) 0:03:30 load avg: 14.92 [392/423/8] test_uuid passed -- running: test_multiprocessing_spawn (1 min 42 sec), test_socket (1 min 11 sec) 0:03:30 load avg: 15.20 [393/423/8] test_wait3 skipped -- running: test_multiprocessing_spawn (1 min 42 sec), test_socket (1 min 11 sec) test_wait3 skipped -- os.fork not defined 0:03:31 load avg: 15.20 [394/423/8] test_utf8_mode passed -- running: test_multiprocessing_spawn (1 min 43 sec), test_socket (1 min 12 sec) 0:03:31 load avg: 15.20 [395/423/8] test_wait4 skipped -- running: test_multiprocessing_spawn (1 min 43 sec), test_socket (1 min 12 sec) test_wait4 skipped -- object has no attribute 'fork' 0:03:32 load avg: 15.36 [396/423/8] test_wave passed -- running: test_multiprocessing_spawn (1 min 44 sec), test_socket (1 min 13 sec) 0:03:33 load avg: 15.49 [397/423/8] test_warnings passed -- running: test_multiprocessing_spawn (1 min 45 sec), test_socket (1 min 14 sec) 0:03:33 load avg: 15.85 [398/423/8] test_weakset passed -- running: test_multiprocessing_spawn (1 min 45 sec), test_socket (1 min 14 sec) 0:03:35 load avg: 16.21 [399/423/8] test_webbrowser passed -- running: test_multiprocessing_spawn (1 min 47 sec), test_socket (1 min 16 sec) ??????????^Z^Z^Z^Z^Z^Z^Z^Z^Z^Z 0:03:39 load avg: 16.57 [400/423/8] test_socket passed (1 min 20 sec) -- running: test_multiprocessing_spawn (1 min 51 sec) 0:03:40 load avg: 16.44 [401/423/8] test_weakref passed -- running: test_multiprocessing_spawn (1 min 52 sec) 0:03:40 load avg: 16.44 [402/423/8] test_winsound skipped (resource denied) -- running: test_multiprocessing_spawn (1 min 52 sec) test_winsound skipped -- Use of the 'audio' resource not enabled 0:03:40 load avg: 16.17 [403/423/8] test_with passed -- running: test_multiprocessing_spawn (1 min 53 sec) 0:03:41 load avg: 16.17 [404/423/8] test_wsgiref passed -- running: test_multiprocessing_spawn (1 min 53 sec) 0:03:41 load avg: 15.90 [405/423/8] test_xdrlib passed -- running: test_multiprocessing_spawn (1 min 54 sec) 0:03:42 load avg: 15.90 [406/423/8] test_xml_dom_minicompat passed -- running: test_multiprocessing_spawn (1 min 54 sec) 0:03:43 load avg: 15.69 [407/423/8] test_xml_etree passed -- running: test_multiprocessing_spawn (1 min 55 sec) 0:03:43 load avg: 15.69 [408/423/8] test_xml_etree_c passed -- running: test_multiprocessing_spawn (1 min 55 sec) 0:03:46 load avg: 14.78 [409/423/8] test_winreg passed -- running: test_multiprocessing_spawn (1 min 59 sec) 0:03:47 load avg: 14.78 [410/423/8] test_xmlrpc_net skipped (resource denied) -- running: test_multiprocessing_spawn (1 min 59 sec) test_xmlrpc_net skipped -- Use of the 'network' resource not enabled 0:03:47 load avg: 14.78 [411/423/8] test_xxtestfuzz skipped -- running: test_multiprocessing_spawn (1 min 59 sec) test_xxtestfuzz skipped -- No module named '_xxtestfuzz' 0:03:47 load avg: 14.68 [412/423/8] test_yield_from passed -- running: test_multiprocessing_spawn (2 min) 0:03:48 load avg: 14.68 [413/423/8] test_zipapp passed -- running: test_multiprocessing_spawn (2 min) 0:03:52 load avg: 13.91 [414/423/8] test_xmlrpc passed -- running: test_multiprocessing_spawn (2 min 4 sec) 0:03:52 load avg: 13.91 [415/423/8] test_zipfile64 skipped (resource denied) -- running: test_multiprocessing_spawn (2 min 4 sec) test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run 0:03:53 load avg: 13.76 [416/423/8] test_zipimport passed -- running: test_multiprocessing_spawn (2 min 5 sec) 0:03:54 load avg: 13.64 [417/423/8] test_zipimport_support passed -- running: test_multiprocessing_spawn (2 min 6 sec), test_urllib2_localnet (30.2 sec) 0:03:55 load avg: 13.43 [418/423/8] test_zlib passed -- running: test_multiprocessing_spawn (2 min 7 sec), test_urllib2_localnet (31.3 sec) 0:03:56 load avg: 13.20 [419/423/8] test_venv passed -- running: test_multiprocessing_spawn (2 min 8 sec), test_urllib2_localnet (31.8 sec) 0:04:01 load avg: 12.16 [420/423/8] test_zipfile passed -- running: test_multiprocessing_spawn (2 min 13 sec), test_urllib2_localnet (36.9 sec) 0:04:05 load avg: 11.38 [421/423/8] test_multiprocessing_spawn passed (2 min 17 sec) -- running: test_winconsoleio (30.4 sec), test_urllib2_localnet (41.5 sec) 0:04:06 load avg: 11.19 [422/423/8] test_urllib2_localnet passed (41.5 sec) -- running: test_winconsoleio (30.8 sec) == Tests result: FAILURE, INTERRUPTED == Test suite interrupted by signal SIGINT. 1 test omitted: test_winconsoleio 375 tests OK. 8 tests failed: test__locale test_buffer test_compileall test_copyreg test_distutils test_locale test_pickle test_pickletools 39 tests skipped: test_asdl_parser test_clinic test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl test_kqueue test_multiprocessing_fork test_multiprocessing_forkserver test_nis test_openpty test_ossaudiodev test_pipes test_poll test_posix test_pty test_pwd test_readline test_resource test_smtpnet test_socketserver test_spwd test_syslog test_threadsignals test_timeout test_urllib2net test_urllibnet test_wait3 test_wait4 test_winsound test_xmlrpc_net test_xxtestfuzz test_zipfile64 Total duration: 4 min 27 sec Tests result: FAILURE, INTERRUPTED PS C:\Users\tusha\AppData\Local\Programs\Python\Python38-32> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 09:23:48 2020 From: report at bugs.python.org (Edson Tadeu M. Manoel) Date: Sun, 13 Sep 2020 13:23:48 +0000 Subject: [issue41777] When using `python -bb`, `struct.calcsize` raises a warning when used with str argument after being used with bytes (might be a larger problem with dicts) Message-ID: <1600003428.26.0.120292470084.issue41777@roundup.psfhosted.org> New submission from Edson Tadeu M. Manoel : Here is the inconsistent behavior, when running with `python -bb` (or just `python -b`), caused by an internal cache: >>> import struct >>> struct.calcsize(b'!d') # cache for '!d' uses bytes 8 >>> struct.calcsize('!d') # so there's a warning when trying to use str Traceback (most recent call last): File "", line 1, in BytesWarning: Comparison between bytes and string >>> struct.calcsize('>d') # cache for '>d' uses str 8 >>> struct.calcsize(b'>d') # so now the warning is inverted, it shows up when trying to use bytes Traceback (most recent call last): File "", line 1, in BytesWarning: Comparison between bytes and string >>> struct.calcsize('>d') # no problem when using str 8 Note that this might be caused by a possible larger problem when dealing with keys of different string types in dicts under `python -b` (or `python -bb`): $ python Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> d={} >>> d['a']=1 >>> d[b'a']=2 >>> d['a'] 1 >>> d[b'a'] 2 $ python -bb Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> d={} >>> d['a']=1 >>> d[b'a']=2 Traceback (most recent call last): File "", line 1, in I'm not sure if this warning is intentional, since in Python 3 there seems to be no special reason for dicts to try to compare 'a' with b'a' (other than possible implementation details). Note: this is from an issue found here: https://github.com/pytest-dev/pytest-xdist/issues/596 ---------- components: Interpreter Core, Library (Lib) messages: 376836 nosy: tadeu priority: normal severity: normal status: open title: When using `python -bb`, `struct.calcsize` raises a warning when used with str argument after being used with bytes (might be a larger problem with dicts) type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 09:28:21 2020 From: report at bugs.python.org (Florian Bruhin) Date: Sun, 13 Sep 2020 13:28:21 +0000 Subject: [issue41777] When using `python -bb`, `struct.calcsize` raises a warning when used with str argument after being used with bytes (might be a larger problem with dicts) In-Reply-To: <1600003428.26.0.120292470084.issue41777@roundup.psfhosted.org> Message-ID: <1600003701.58.0.378190051369.issue41777@roundup.psfhosted.org> Florian Bruhin added the comment: Taking the freedom of adding people involved in the `struct` module to the nosy list. ---------- nosy: +The Compiler, mark.dickinson, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 09:35:30 2020 From: report at bugs.python.org (Edson Tadeu M. Manoel) Date: Sun, 13 Sep 2020 13:35:30 +0000 Subject: [issue41777] When using `python -bb`, `struct.calcsize` raises a warning when used with str argument after being used with bytes (might be a larger problem with dicts) In-Reply-To: <1600003428.26.0.120292470084.issue41777@roundup.psfhosted.org> Message-ID: <1600004130.78.0.672971778737.issue41777@roundup.psfhosted.org> Edson Tadeu M. Manoel added the comment: > I'm not sure if this warning is intentional, since in Python 3 there seems to be no special reason for dicts to try to compare 'a' with b'a' (other than possible implementation details). Okay, there's one special reason, it's the fact that 'a' and b'a' have the same hash. I'm not sure about the expected behavior, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 10:24:57 2020 From: report at bugs.python.org (Florian Bruhin) Date: Sun, 13 Sep 2020 14:24:57 +0000 Subject: [issue41777] When using `python -bb`, `struct.calcsize` raises a warning when used with str argument after being used with bytes (might be a larger problem with dicts) In-Reply-To: <1600003428.26.0.120292470084.issue41777@roundup.psfhosted.org> Message-ID: <1600007097.15.0.00117569585148.issue41777@roundup.psfhosted.org> Florian Bruhin added the comment: Ah, also see https://bugs.python.org/issue21071#msg292409 where the same thing was mentioned as part of another issue as well. After some discussions in the Python IRC channel, I guess it's acceptable for dicts to raise a ByteWarning here - after all, there *is* a comparison between str/bytes going on here. It might be an implementation detail, but so is e.g. b'a' in ['a'] and I'd certainly expect that to give me a warning/error with -b/-bb. So I guess if struct continues to accept bytes as format string, it should probably decode them to ASCII or something before interacting with the cache? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 13:41:53 2020 From: report at bugs.python.org (Sergey Fedoseev) Date: Sun, 13 Sep 2020 17:41:53 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600018913.73.0.0117504020803.issue33239@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- nosy: +sir-sigurd nosy_count: 4.0 -> 5.0 pull_requests: +21279 pull_request: https://github.com/python/cpython/pull/21763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 13:59:04 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Sep 2020 17:59:04 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600019944.98.0.180619307937.issue33239@roundup.psfhosted.org> miss-islington added the comment: New changeset b48389d95093c3f912549add8da339edc164bf0d by Sergey Fedoseev in branch 'master': bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* functions (GH-21763) https://github.com/python/cpython/commit/b48389d95093c3f912549add8da339edc164bf0d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:05:28 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Sep 2020 18:05:28 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600020328.01.0.955673365127.issue33239@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21281 pull_request: https://github.com/python/cpython/pull/22226 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:05:19 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Sep 2020 18:05:19 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600020319.9.0.961455097583.issue33239@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21280 pull_request: https://github.com/python/cpython/pull/22225 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:08:33 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 18:08:33 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600020513.91.0.172093323834.issue33239@roundup.psfhosted.org> Change by Vinay Sajip : ---------- versions: +Python 3.10, Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:12:58 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 13 Sep 2020 18:12:58 +0000 Subject: [issue31369] re.RegexFlag is not included in __all__, makes type inference less useful In-Reply-To: <1504730402.58.0.544251648863.issue31369@psf.upfronthosting.co.za> Message-ID: <1600020778.3.0.86954178631.issue31369@roundup.psfhosted.org> Guido van Rossum added the comment: What it prints is irrelevant to static checking. Currently the typeshed stub for the code already exports RegexFlag, so that the following passes mypy but fails at runtime: ``` from re import * def foo(flag: RegexFlag): return match("[a-z]+", "ABC", flag) print(foo(IGNORECASE)) print(foo(VERBOSE)) ``` I think it's good to add it to `__all__` so this code will not put the type checker to shame, and it would be good to document it. One thing I discovered when developing this example: there doesn't seem to be a flag to represent 0 (zero), i.e. "no flags". And foo(0) is a type error (even though it works fine at runtime). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:16:42 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 18:16:42 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600021002.46.0.788008661628.issue33239@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset bf50b0e80a8a0d651af2f953b662eeadd27c7c93 by Miss Islington (bot) in branch '3.8': bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* functions (GH-21763) (GH-22226) https://github.com/python/cpython/commit/bf50b0e80a8a0d651af2f953b662eeadd27c7c93 ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:17:37 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 18:17:37 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600021057.48.0.742646412593.issue33239@roundup.psfhosted.org> Change by Vinay Sajip : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:20:41 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 18:20:41 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600021241.65.0.489107715025.issue33239@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset c978be283db768743d995f04414c65439a632bdd by Miss Islington (bot) in branch '3.9': bpo-33239: Fix default value of 'buffering' parameter in docs of tempfile.* functions (GH-21763) (GH-22225) https://github.com/python/cpython/commit/c978be283db768743d995f04414c65439a632bdd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 14:21:10 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 18:21:10 +0000 Subject: [issue33239] tempfile module: functions with the 'buffering' option are incorrectly documented In-Reply-To: <1523128962.9.0.682650639539.issue33239@psf.upfronthosting.co.za> Message-ID: <1600021270.19.0.923747755303.issue33239@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:20:12 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 20:20:12 +0000 Subject: [issue37479] IntEnum __format__ behavior can't be overridden through __str__ In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1600028412.32.0.864256176299.issue37479@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21282 pull_request: https://github.com/python/cpython/pull/22227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:24:09 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 20:24:09 +0000 Subject: [issue40352] SocketHandler silently drops log messages on re-connect In-Reply-To: <1587474127.52.0.907489557829.issue40352@roundup.psfhosted.org> Message-ID: <1600028649.46.0.472244455615.issue40352@roundup.psfhosted.org> Vinay Sajip added the comment: @Oleg In the interests of clarity, can you please give more detail about the network topology and sequence of events in your use case? Where the machine with the SocketHandler is, where the socket server is that it's sending to, where the TCP balancer comes into it, what exactly the timeout is for, and what is the precise cause of the socket errors {e.g. whether a failure occurs after a connection has been made and some events have been successfully logged - if so, what exactly causes the failure)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:24:58 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 20:24:58 +0000 Subject: [issue37479] IntEnum __format__ behavior can't be overridden through __str__ In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1600028698.7.0.594286688508.issue37479@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21283 pull_request: https://github.com/python/cpython/pull/22228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:27:58 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Sep 2020 20:27:58 +0000 Subject: [issue38967] Improve error message in enum for member name surrounded by underscore. In-Reply-To: <1575450398.98.0.140033297408.issue38967@roundup.psfhosted.org> Message-ID: <1600028878.59.0.889982012454.issue38967@roundup.psfhosted.org> miss-islington added the comment: New changeset 2ec67526a6ed3312f4fac22b527ca0ff161531b8 by Zackery Spytz in branch 'master': bpo-38967: Improve the error msg for reserved _sunder_ names in enum (GH-18370) https://github.com/python/cpython/commit/2ec67526a6ed3312f4fac22b527ca0ff161531b8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:36:47 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 20:36:47 +0000 Subject: [issue38967] Improve error message in enum for member name surrounded by underscore. In-Reply-To: <1575450398.98.0.140033297408.issue38967@roundup.psfhosted.org> Message-ID: <1600029407.99.0.110065306956.issue38967@roundup.psfhosted.org> Ethan Furman added the comment: Thank you, Rub?n, for the patch. Thank you, Karthikeyan, for not making me backport it. :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:47:07 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 20:47:07 +0000 Subject: [issue19968] Python does not play well with 'stow'. In-Reply-To: <1386893744.29.0.246592837254.issue19968@psf.upfronthosting.co.za> Message-ID: <1600030027.01.0.590487450865.issue19968@roundup.psfhosted.org> Vinay Sajip added the comment: Closing, as the OP said "Since I can work around it easily enough, I'm set for now." ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:47:53 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 20:47:53 +0000 Subject: [issue37479] IntEnum __format__ behavior can't be overridden through __str__ In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1600030073.76.0.061282523169.issue37479@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 38c8d3930eb872258a82339bcba3bce1d0e3ac2c by Ethan Furman in branch '3.8': [3.8] bpo-37479: Enum - use correct __format__ (GH-14545) https://github.com/python/cpython/commit/38c8d3930eb872258a82339bcba3bce1d0e3ac2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:50:15 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 20:50:15 +0000 Subject: [issue22256] pyvenv should display a progress indicator while creating an environment In-Reply-To: <1408785121.12.0.569760630469.issue22256@psf.upfronthosting.co.za> Message-ID: <1600030215.96.0.415971434643.issue22256@roundup.psfhosted.org> Vinay Sajip added the comment: Can we close this? I guess this enhancement is no longer needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:50:22 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 13 Sep 2020 20:50:22 +0000 Subject: [issue41778] Change a punctuation on documentation Message-ID: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> New submission from Emmanuel Arias : On this paragrapah the clarification about IIS7 seems there's not connection beacuase is in other sentence. Move the punctuation to connect both the last sentence with the information in the parenthesis. I think the NEWS is not necessary here. ---------- components: email messages: 376850 nosy: barry, eamanu, r.david.murray priority: normal severity: normal status: open title: Change a punctuation on documentation versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:50:48 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 13 Sep 2020 20:50:48 +0000 Subject: [issue41778] Change a punctuation on documentation In-Reply-To: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> Message-ID: <1600030248.81.0.626891526889.issue41778@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +21284 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:51:07 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 20:51:07 +0000 Subject: [issue37479] IntEnum __format__ behavior can't be overridden through __str__ In-Reply-To: <1562023451.58.0.339794314518.issue37479@roundup.psfhosted.org> Message-ID: <1600030267.56.0.512343690224.issue37479@roundup.psfhosted.org> Ethan Furman added the comment: Thank you, Jason! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:52:22 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 20:52:22 +0000 Subject: [issue12174] Multiprocessing logging levels unclear In-Reply-To: <1306324447.9.0.976036464224.issue12174@psf.upfronthosting.co.za> Message-ID: <1600030342.27.0.241052531764.issue12174@roundup.psfhosted.org> Vinay Sajip added the comment: I'd like to close this issue as out of date - anyone object? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:54:05 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 20:54:05 +0000 Subject: [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1600030445.07.0.327688908243.issue28499@roundup.psfhosted.org> Vinay Sajip added the comment: As there's (AFAIK) been no progress on this, I'd like to close this issue. Any objections? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:56:35 2020 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 13 Sep 2020 20:56:35 +0000 Subject: [issue30842] pyenv activate for bash and tcsh In-Reply-To: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> Message-ID: <1600030595.61.0.917936183188.issue30842@roundup.psfhosted.org> Vinay Sajip added the comment: If no PR is forthcoming for this, I'd like to close this issue as out of date. Any objections? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 16:56:52 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 20:56:52 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600030612.37.0.519812290564.issue40721@roundup.psfhosted.org> Ethan Furman added the comment: For Python code at least, Guido has proclaimed: https://mail.python.org/pipermail/python-ideas/2016-September/042340.html I recommend naming all enums UPPER_CASE. They're constants (within a namespace) and that's the rule for constants. It's helpful for the reader of the code to realize what they are when passed around -- they have a similar status to literal constants, you know they stand for a unique value and not for some computed quantity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:05:47 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Sep 2020 21:05:47 +0000 Subject: [issue41778] Change a punctuation on documentation In-Reply-To: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> Message-ID: <1600031147.41.0.72602833223.issue41778@roundup.psfhosted.org> miss-islington added the comment: New changeset 94bfdee25db31941b187591ae5ae9bf3ed431090 by Emmanuel Arias in branch 'master': bpo-41778: Change a punctuation on documentation. (GH-22229) https://github.com/python/cpython/commit/94bfdee25db31941b187591ae5ae9bf3ed431090 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:06:03 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 13 Sep 2020 21:06:03 +0000 Subject: [issue41778] Change a punctuation on documentation In-Reply-To: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> Message-ID: <1600031163.8.0.0415845728024.issue41778@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21285 pull_request: https://github.com/python/cpython/pull/22230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:06:06 2020 From: report at bugs.python.org (Ethan Furman) Date: Sun, 13 Sep 2020 21:06:06 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600031166.42.0.614661428359.issue40721@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:07:17 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 Sep 2020 21:07:17 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600031237.34.0.226852513901.issue41776@roundup.psfhosted.org> Eric V. Smith added the comment: I think that's a good change. It makes it clear when reading the source that the print statement at the end of the loop is only executed for odd numbers. Sure, you know this if you execute the code, or if you know how python for loops and continue work. But since this is a tutorial, I think being more explicit is clearer. ---------- keywords: +easy, newcomer friendly nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:21:56 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 Sep 2020 21:21:56 +0000 Subject: [issue41778] Change a punctuation on documentation In-Reply-To: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> Message-ID: <1600032116.27.0.25144667949.issue41778@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset d09bead93990eed26ecb8fcd02a8a3f6e8fa73b7 by Miss Islington (bot) in branch '3.8': bpo-41778: Change a punctuation on documentation. (GH-22229) (GH-22230) https://github.com/python/cpython/commit/d09bead93990eed26ecb8fcd02a8a3f6e8fa73b7 ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:23:29 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 13 Sep 2020 21:23:29 +0000 Subject: [issue41778] Change a punctuation on documentation In-Reply-To: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> Message-ID: <1600032209.27.0.964797389157.issue41778@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +21287 pull_request: https://github.com/python/cpython/pull/22232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:38:04 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 Sep 2020 21:38:04 +0000 Subject: [issue41778] Change a punctuation on documentation In-Reply-To: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> Message-ID: <1600033084.84.0.508876622667.issue41778@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset b3d11abcbc0fcf794f9be29aa78bb3d100a54960 by Emmanuel Arias in branch '3.9': [3.9] bpo-41778: Change a punctuation on documentation. (GH-22229) (GH-22232) https://github.com/python/cpython/commit/b3d11abcbc0fcf794f9be29aa78bb3d100a54960 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 17:48:25 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 13 Sep 2020 21:48:25 +0000 Subject: [issue41778] Change a punctuation on documentation In-Reply-To: <1600030222.8.0.0896023770417.issue41778@roundup.psfhosted.org> Message-ID: <1600033705.94.0.671873603216.issue41778@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 19:15:38 2020 From: report at bugs.python.org (Neeraj) Date: Sun, 13 Sep 2020 23:15:38 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600038938.9.0.946253889157.issue41776@roundup.psfhosted.org> Change by Neeraj : ---------- keywords: +patch nosy: +neerajsamtani nosy_count: 3.0 -> 4.0 pull_requests: +21288 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22234 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 20:47:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 Sep 2020 00:47:27 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1600044447.81.0.912775728943.issue41758@roundup.psfhosted.org> Terry J. Reedy added the comment: I should have suggested that you upload the test results as a file. Anyway, 8 errors: the two locale failures I expected (failures #1, #6), test_distutils (#5, multiple failures), test_compileall (#4), and failures for buffer (#2), copy_reg (#3), pickle (#7), and pickletools (#8) due to an OSError trying to import numpy. ... File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\test\test_buffer.py", line 44, in from numpy import ndarray as numpy_array File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\__init__.py", line 138, in from . import _distributor_init File "C:\Users\tusha\AppData\Roaming\Python\Python38\site-packages\numpy\_distributor_init.py", line 26, in WinDLL(os.path.abspath(filename)) File "C:\Users\tusha\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application The buffer test catches ImportError but not OSError; I suspect the others are similar. I consider this a bug in the tests and will try to open another issue. Just curious: do commands 'python -c "import numpy"' and 'python -c "from numpy import ndarray as numpy_array"' work? I may ask on python-list for other users to run/test colormixer on installed python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 13 21:44:07 2020 From: report at bugs.python.org (Daniel Jewell) Date: Mon, 14 Sep 2020 01:44:07 +0000 Subject: [issue19081] zipimport behaves badly when the zip file changes while the process is running In-Reply-To: <1379995203.41.0.89812771706.issue19081@psf.upfronthosting.co.za> Message-ID: <1600047847.83.0.682392282365.issue19081@roundup.psfhosted.org> Daniel Jewell added the comment: In playing with Lib/zipfile.py and Lib/zipimport.py, I noticed that zipfile has supported opportunistic loading of bz2/lzma for ~9 years. However, zipimport assumes only zlib will be used. (Yet, zipfile.PyZipFile will happily create zlib/bz2/lzma ZIP archives ... zipfile.PyZipFile('mod.zip', 'w', compression=zipfile.ZIP_LZMA) for example.) At first I wondered why zipimport essentially duplicates a lot from zipfile but then realized (after reading some of the commit messages around the pure-python rewrite of zipimport a few years ago) that since zipimport is called as part of startup, there's a need to avoid importing certain modules. I'm wondering if this specific issue with zipimport is possibly more of an indicator of a larger issue? Specifically: * The duplication of code between zipfile and zipimport seems like a potential source of bugs - I get the rationale but perhaps the "base" ZIP functionality ought to be refactored out of both zipimport and zipfile so they can share... And I mean the low-level stuff (compressor, checksum, etc.). Zipfile definitely imports more than zipimport but I haven't looked at what those imports are doing extensively. Ultimately: the behavior of the new ZipImport appears to be, essentially, the same as zipimport.c: Per PEP-302 [https://www.python.org/dev/peps/pep-0302/], zipimport.zipimporter gets registered into sys.path_hooks. When you import anything in a zip file, all of the paths get cached into sys.path_importer_cache as zipimport.zipimporter objects. The zipimporter objects, when instantiated, run zipimport._read_directory() which returns a low level dict with each key being a filename (module) and each value being a tuple of low-level metadata about that file including the byte offset into the zip file, time last modified, CRC, etc. (See zipimport.py:330 or so). This is then stored in zipimporter._files. Critically, the contents of the zip file are not decompressed at this stage: only the metadata of what is in the zip file and (most importantly) where it is, is stored in memory: only when a module is actually called for loading is the data read utilizing the cached metadata. There appears to be no provision for (a) verifying that the zip file itself hasn't changed or (b) refreshing the metadata. So it's no surprise really that this error is happening: the cached file contents metadata instructs zipimporter to decompress a specific byte offset in the zip file *when an import is called*. If the zip file changes on disk between the metadata scan (e.g. first read of the zip file) and actual loading, bam: error. There appear to be several ways to fix this ... I'm not sure of the best: * Possibly lock the ZIP file on first import so it doesn't change (this presents many new issues) * Rescan the ZIP before each import; but the point of caching the contents appears to be the avoidance of this * Hash the entire file and compare (expensive CPU-wise) * Rely on modified time? e.g. cache the whole zip modified time at read and then if that's not the same invalidate the cache and rescan * Cache the entire zip file into memory at first load - this has some advantages (can store the ZIP data compressed; would make the import all or nothing; faster?) But then there would need to be some kind of variable to limit the size/total size - it becomes a memory hog... ---------- nosy: +danieljewell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 00:33:48 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Sep 2020 04:33:48 +0000 Subject: [issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available In-Reply-To: <1559649566.96.0.759993950384.issue37149@roundup.psfhosted.org> Message-ID: <1600058028.99.0.502740443254.issue37149@roundup.psfhosted.org> Ned Deily added the comment: In general, we do not backport documentation changes to branches in the security-fix phase of their life cycles and their online versions are only updated for a release. ---------- status: open -> closed versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 00:38:07 2020 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 14 Sep 2020 04:38:07 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1600058287.9.0.459246364142.issue41758@roundup.psfhosted.org> Jeremy Kloth added the comment: The error from importing numpy comes from attempting to load a 64-bit DLL in a 32-bit process. This stems from the shared user install directory (now fixed in 3.9, I believe). There is most likely a mix of 32- and 64-bit extensions in the user install directory that are causing issues. To test this, Tushar, please rename/move the '%APPDATA%\Python\Python38' directory. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 00:54:13 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Sep 2020 04:54:13 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1600059253.89.0.332823146243.issue39883@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +ned.deily nosy_count: 6.0 -> 7.0 pull_requests: +21290 pull_request: https://github.com/python/cpython/pull/22235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 01:18:10 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Sep 2020 05:18:10 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1600060690.2.0.827119442103.issue39883@roundup.psfhosted.org> Ned Deily added the comment: New changeset 7dbbea75cec27a48b68cc07c23f3f317cacf4a16 by Ned Deily in branch 'master': bpo-39883: Update macOS installer copy of LICENSE. (GH-22235) https://github.com/python/cpython/commit/7dbbea75cec27a48b68cc07c23f3f317cacf4a16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 01:18:29 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 05:18:29 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1600060709.14.0.545329654028.issue39883@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21291 pull_request: https://github.com/python/cpython/pull/22236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 01:18:37 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 05:18:37 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1600060717.12.0.417137821585.issue39883@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21292 pull_request: https://github.com/python/cpython/pull/22237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 01:21:28 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Sep 2020 05:21:28 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600060888.38.0.617768697055.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +21293 pull_request: https://github.com/python/cpython/pull/22238 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 01:38:29 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 05:38:29 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1600061909.17.0.0172532701601.issue39883@roundup.psfhosted.org> miss-islington added the comment: New changeset 3c618d0a073ea6863d1b4e2616e284308fbc12fc by Miss Islington (bot) in branch '3.8': bpo-39883: Update macOS installer copy of LICENSE. (GH-22235) https://github.com/python/cpython/commit/3c618d0a073ea6863d1b4e2616e284308fbc12fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 01:56:23 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 14 Sep 2020 05:56:23 +0000 Subject: [issue38486] Dead links in mailbox doc In-Reply-To: <1571155336.35.0.351516835001.issue38486@roundup.psfhosted.org> Message-ID: <1600062983.8.0.850320916737.issue38486@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 6.0 -> 7.0 pull_requests: +21294 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:00:01 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Sep 2020 06:00:01 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1600063201.69.0.998279451834.issue39883@roundup.psfhosted.org> Ned Deily added the comment: New changeset bf7d4d039c46232262a0f736f12761b085a6e7a8 by Miss Islington (bot) in branch '3.9': bpo-39883: Update macOS installer copy of LICENSE. (GH-22235) (GH-22236) https://github.com/python/cpython/commit/bf7d4d039c46232262a0f736f12761b085a6e7a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:08:37 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Sep 2020 06:08:37 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed In-Reply-To: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> Message-ID: <1600063717.03.0.590945533357.issue41757@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +fdrake, nascheme -ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:09:27 2020 From: report at bugs.python.org (Ned Deily) Date: Mon, 14 Sep 2020 06:09:27 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed In-Reply-To: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> Message-ID: <1600063767.82.0.582822615135.issue41757@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +Library (Lib) -macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:10:16 2020 From: report at bugs.python.org (Ali Zaeri) Date: Mon, 14 Sep 2020 06:10:16 +0000 Subject: [issue41779] add BLOB photo to sqlite3 python Message-ID: <1600063816.71.0.85406743494.issue41779@roundup.psfhosted.org> New submission from Ali Zaeri : Hi this is my problem that I share it in stackowerflow hope you can help me: https://stackoverflow.com/q/63763089/14168432 ---------- messages: 376868 nosy: alizaerialora priority: normal severity: normal status: open title: add BLOB photo to sqlite3 python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:18:08 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Sep 2020 06:18:08 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed In-Reply-To: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> Message-ID: <1600064288.31.0.953397553398.issue41757@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:33:48 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Sep 2020 06:33:48 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600065228.93.0.841937848523.issue41513@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 457d4e97de0369bc786e363cb53c7ef3276fdfcd by Raymond Hettinger in branch 'master': bpo-41513: Add docs and tests for hypot() (GH-22238) https://github.com/python/cpython/commit/457d4e97de0369bc786e363cb53c7ef3276fdfcd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:45:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Sep 2020 06:45:56 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed In-Reply-To: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> Message-ID: <1600065956.86.0.191086949572.issue41757@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hi Giordon and thanks for your issue. Could you please check if you can reproduce this behaviour with Python3.8 and with the current master? We have some new code that may be preventing this to happen: https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L780 Unfortunately, without a simpler reproducer is difficult to tell what's going on so is not possible for me to say that this is fixed in current master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:53:18 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Sep 2020 06:53:18 +0000 Subject: [issue41779] add BLOB photo to sqlite3 python In-Reply-To: <1600063816.71.0.85406743494.issue41779@roundup.psfhosted.org> Message-ID: <1600066398.9.0.26796703988.issue41779@roundup.psfhosted.org> Eric V. Smith added the comment: The bug tracker is not the correct place to request help on using Python. You might try the python-list mailing list. You can find information on it at https://mail.python.org/mailman/listinfo/python-list. Or you might wait until someone answers your Stack Overflow question. I'm going to leave this open for a while on the off chance that there's actually some bug in Python related to your problem. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 02:57:19 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 14 Sep 2020 06:57:19 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed In-Reply-To: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> Message-ID: <1600066639.17.0.66442113072.issue41757@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Indeed, I cannot reproduce this with Pyhon3.8: (vev) ? python -m pytest tests/test_validation.py -vvvv -k "test_optimizer_stitching" -v ============================================================================================================= test session starts ============================================================================================================== platform darwin -- Python 3.8.2, pytest-3.10.1, py-1.9.0, pluggy-0.13.1 -- /Users/pgalindo3/github/python/master/vev/bin/python cachedir: .pytest_cache Matplotlib: 3.3.1 Freetype: 2.6.1 benchmark: 3.2.3 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000) rootdir: /Users/pgalindo3/github/python/master/pyhf, inifile: pytest.ini plugins: mpl-0.11, mock-3.3.1, cov-2.10.1, console-scripts-0.2.0, benchmark-3.2.3 collected 26 items / 18 deselected tests/test_validation.py::test_optimizer_stitching[scipy-numpy_backend] PASSED [ 12%] tests/test_validation.py::test_optimizer_stitching[scipy-jax_backend] PASSED [ 25%] tests/test_validation.py::test_optimizer_stitching[scipy-tensorflow_backend] PASSED [ 37%] tests/test_validation.py::test_optimizer_stitching[scipy-pytorch_backend] PASSED [ 50%] tests/test_validation.py::test_optimizer_stitching[minuit-numpy_backend] PASSED [ 62%] tests/test_validation.py::test_optimizer_stitching[minuit-jax_backend] PASSED [ 75%] tests/test_validation.py::test_optimizer_stitching[minuit-tensorflow_backend] PASSED [ 87%] tests/test_validation.py::test_optimizer_stitching[minuit-pytorch_backend] PASSED ============================================================================================= 8 passed, 18 deselected, 50 warnings in 3.29 seconds ============================================================================================= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 03:06:06 2020 From: report at bugs.python.org (Allan Daemon) Date: Mon, 14 Sep 2020 07:06:06 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() Message-ID: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> New submission from Allan Daemon : The implementation of PEP 585 in 3.9 adds some new attributes, but they aren't listed with dir() (then, not list in autocomplete and IntelliSense). Python 3.9.0rc1+ (heads/3.9:d7cd1164c1, Aug 25 2020, 17:27:09) >>> li = list[int] >>> li.__origin__ >>> getattr(li, '__origin__') >>> '__origin__' in dir(li) False That applies to: __origin__ __args__ __parameters__ It seems to be not the expected behaviour, so this bug report. If this is not the case, some piece of documentation could be interesting. Also, I couldn't find anything about Generic Alias in the documentation, only in the source code. Should this be addressed too? ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 376873 nosy: AllanDaemon, docs at python priority: normal severity: normal status: open title: Generic Alias attributes nor in dir() type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 04:01:22 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 14 Sep 2020 08:01:22 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600070482.11.0.391002145363.issue41780@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 06:01:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Sep 2020 10:01:49 +0000 Subject: [issue41766] Python3.10 (x64) crashes after flake8/pyflakes on Windows In-Reply-To: <1599865531.82.0.625715596762.issue41766@roundup.psfhosted.org> Message-ID: <1600077709.47.0.758024299507.issue41766@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> duplicate superseder: -> _ast module: get_global_ast_state() doesn't work with Mercurial lazy import _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 06:02:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Sep 2020 10:02:19 +0000 Subject: [issue22256] pyvenv should display a progress indicator while creating an environment In-Reply-To: <1408785121.12.0.569760630469.issue22256@psf.upfronthosting.co.za> Message-ID: <1600077739.55.0.287555954983.issue22256@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. If someone wants to work on venv, I suggest to attempt to copy virtualenv cache optimization of virtualenv 20, to speedup the creation of a venv, rather than adding a progress bar :-) ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 06:01:53 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Sep 2020 10:01:53 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1600077713.75.0.523429585306.issue41631@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-41766 as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 07:44:35 2020 From: report at bugs.python.org (Giordon Stark) Date: Mon, 14 Sep 2020 11:44:35 +0000 Subject: [issue41757] weakmethod's ref is deleted before weakref's garbage-collect callback is executed In-Reply-To: <1599787972.05.0.537049441536.issue41757@roundup.psfhosted.org> Message-ID: <1600083875.52.0.280115149291.issue41757@roundup.psfhosted.org> Giordon Stark added the comment: Hi Pablo, Thanks for looking at this. Indeed, this seems to be fixed for me on python 3.8 (I'm using docker image python:3.8-slim) and I'm unable to force the issue to come up. I will go ahead and close this and link the corresponding PR (https://github.com/python/cpython/pull/16495) that fixed things up. ---------- keywords: +patch message_count: 4.0 -> 5.0 pull_requests: +21295 resolution: -> fixed stage: -> patch review status: open -> closed pull_request: https://github.com/python/cpython/pull/16495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 08:00:22 2020 From: report at bugs.python.org (Patrick Reader) Date: Mon, 14 Sep 2020 12:00:22 +0000 Subject: [issue41781] Typos in typing.py Message-ID: <1600084822.87.0.84820912855.issue41781@roundup.psfhosted.org> New submission from Patrick Reader : In typing.py, the `_allow_reckless_class_cheks` function is spelt wrong, and there is also a typo `instnance` in its docstring. I can do a PR but I thought I'd open an issue since it might be considered a breaking change (although it is `_private` so maybe not?) https://github.com/python/cpython/blob/1b4552c5e8e925f24c15f707050f22c977171125/Lib/typing.py#L1037 ---------- components: Library (Lib) messages: 376877 nosy: pxeger priority: normal severity: normal status: open title: Typos in typing.py versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 09:49:54 2020 From: report at bugs.python.org (Shubham Singh) Date: Mon, 14 Sep 2020 13:49:54 +0000 Subject: [issue41782] No f-string in logging.basicConfig() Message-ID: <1600091394.24.0.394183543133.issue41782@roundup.psfhosted.org> New submission from Shubham Singh : There is no method to implement format strings in the basicConfig() method of the logging module. There are the implementations of '%', '{' or '$' for printf-style, str.format() or string.Template respectively using the style keyword. ---------- messages: 376878 nosy: shubham.25powertech priority: normal severity: normal status: open title: No f-string in logging.basicConfig() type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 09:52:38 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Sep 2020 13:52:38 +0000 Subject: [issue41782] No f-string in logging.basicConfig() In-Reply-To: <1600091394.24.0.394183543133.issue41782@roundup.psfhosted.org> Message-ID: <1600091558.7.0.673589012383.issue41782@roundup.psfhosted.org> Eric V. Smith added the comment: Since an f-string just evaluates to a regular string at the call site, before any logging code is invoked, there's nothing for the logging code to do. As far as it's concerned, it just gets a regular string. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 09:59:40 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 14 Sep 2020 13:59:40 +0000 Subject: [issue41782] No f-string in logging.basicConfig() In-Reply-To: <1600091394.24.0.394183543133.issue41782@roundup.psfhosted.org> Message-ID: <1600091980.36.0.353748095028.issue41782@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 10:15:53 2020 From: report at bugs.python.org (Serge Matveenko) Date: Mon, 14 Sep 2020 14:15:53 +0000 Subject: [issue38701] datetime.timedelta string representation is ambiguous In-Reply-To: <1572968919.3.0.316665305196.issue38701@roundup.psfhosted.org> Message-ID: <1600092953.16.0.845811836717.issue38701@roundup.psfhosted.org> Change by Serge Matveenko : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 10:16:00 2020 From: report at bugs.python.org (Serge Matveenko) Date: Mon, 14 Sep 2020 14:16:00 +0000 Subject: [issue40616] Add `asyncio.BufferQueue` In-Reply-To: <1589388603.33.0.701691851283.issue40616@roundup.psfhosted.org> Message-ID: <1600092960.98.0.252556899214.issue40616@roundup.psfhosted.org> Change by Serge Matveenko : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 10:15:47 2020 From: report at bugs.python.org (Serge Matveenko) Date: Mon, 14 Sep 2020 14:15:47 +0000 Subject: [issue33953] The DEFAULT_ENTROPY variable used to store the current default random bytes value should be documented for `secrets` module In-Reply-To: <1529913551.53.0.56676864532.issue33953@psf.upfronthosting.co.za> Message-ID: <1600092947.88.0.772386787545.issue33953@roundup.psfhosted.org> Change by Serge Matveenko : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 10:17:16 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 14 Sep 2020 14:17:16 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1600093036.28.0.400011918861.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21296 pull_request: https://github.com/python/cpython/pull/22240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 11:09:14 2020 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 14 Sep 2020 15:09:14 +0000 Subject: [issue41782] No f-string in logging.basicConfig() In-Reply-To: <1600091394.24.0.394183543133.issue41782@roundup.psfhosted.org> Message-ID: <1600096154.73.0.355132448335.issue41782@roundup.psfhosted.org> Vinay Sajip added the comment: It's as Eric said. So I'll close this issue as "not a bug". An additional point - by using f-strings, you may be doing unnecessary string formatting - e.g. if the event doesn't actually get handled because of logger or handler level or filter settings. It's worse if any of the parameters in the f-string are expensive to compute, as they would effectively be thrown away if the event were not to be handled. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 11:17:44 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Sep 2020 15:17:44 +0000 Subject: [issue41782] No f-string in logging.basicConfig() In-Reply-To: <1600091394.24.0.394183543133.issue41782@roundup.psfhosted.org> Message-ID: <1600096664.38.0.0594942824479.issue41782@roundup.psfhosted.org> Eric V. Smith added the comment: Vinay raises a good point about performance that's well worth being aware of, especially with expensive objects (as he says). But since f-strings are much faster than other formatting (and especially .format()), there's a tradeoff. If I have something that I know is likely to be logged, sometimes I'll format it with f-strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 11:21:45 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 14 Sep 2020 15:21:45 +0000 Subject: [issue41763] IDLE: scale font to Windows' "zoom" factor In-Reply-To: <1599838753.63.0.774381112035.issue41763@roundup.psfhosted.org> Message-ID: <1600096905.85.0.82505323525.issue41763@roundup.psfhosted.org> E. Paine added the comment: Firstly, apologies about the original message: rereading it, it was a bit random and written in a very illogical order. > Are you the Elisha Paine that suggested the original fix? Yes (though I like to think I have somewhat progressed in 2 years!). The reason I am E. Paine here is solely because I prefer if Google did not index my entire life ;-) On the subject, I would like to thank you Terry 1. for all your work on IDLE and CPython more generally and 2. because you were my first experience of the devs and were very patient despite my clear incompetence (now and then!) > tk scales on startup When first writing this issue I saw that Tk was calling GetDeviceCaps for LOGPIXELSX/LOGPIXELSY. The Windows docs say this: "Number of pixels per logical inch along the screen width..." I (incorrectly) took this to mean it disregards the system dpi and returns the dpi for the monitor. In reality, increasing the zoom factor causes this value to increase, meaning Windows (in effect) declares a smaller monitor size (certainly in later versions of Windows - whether this is true in older versions I don't know). I have checked and the scale value increases correctly with a change in system dpi (hence meaning IDLE also scales correctly). > IDLE ... remains the same size regardless of what setting the user chooses as their scale factor Apologies, this is complete rubbish (I think I was comparing it to the increase in size on the settings window rather than actually paying proper attention to IDLE). I have closed this issue as not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 12:44:39 2020 From: report at bugs.python.org (Mertcan) Date: Mon, 14 Sep 2020 16:44:39 +0000 Subject: [issue41783] Standard Color class Message-ID: <1600101879.5.0.216501247063.issue41783@roundup.psfhosted.org> New submission from Mertcan : I think it would be useful to have a Color class in Python. Thus, it can become a standard and additional libraries may not be needed for many operations. Many libraries can be built around this Color class and can pave the way for many innovations. It can be a good advantage, especially in the GUI area, that beautiful libraries have a common data type. Thanks! ---------- components: Library (Lib) messages: 376883 nosy: mertcandav priority: normal severity: normal status: open title: Standard Color class type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 12:53:59 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 14 Sep 2020 16:53:59 +0000 Subject: [issue19081] zipimport behaves badly when the zip file changes while the process is running In-Reply-To: <1379995203.41.0.89812771706.issue19081@psf.upfronthosting.co.za> Message-ID: <1600102439.68.0.338777315635.issue19081@roundup.psfhosted.org> Gregory P. Smith added the comment: On POSIX systems, keeping the file open means you will keep a handle to the original file in the case where something moves a new file into it's place (as is normal during software package updates) or otherwise unlinks the original. That is the situation that led to filing this issue and is one that is technically solvable by keeping the file handle open and always using that for access. We can't do anything very meaningful about someone opening the existing file in 'w+a' mode and scribbling other bytes over it. I wouldn't try to protect against that. "locking" a file isn't an option on most platforms and when available, is very unusual to do in this century. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:09:47 2020 From: report at bugs.python.org (wang zhao) Date: Mon, 14 Sep 2020 17:09:47 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1600103387.57.0.79707597086.issue14527@roundup.psfhosted.org> wang zhao added the comment: We managed to fixed on the server by following and got it sucuessfully compiled: -./configure --with-system-ffi LDFLAGS="-L /home/XXX/installs/libffi-3.3/lib64/" CPPFLAGS="-I /home/XXX/installs/libffi-3.3/include/" -LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/XXX/installs/libffi-3.3/lib64/ -make ---------- nosy: +zhao.wang.unsw versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:11:35 2020 From: report at bugs.python.org (pmp-p) Date: Mon, 14 Sep 2020 17:11:35 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1600103495.55.0.0415948556226.issue14527@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:50:02 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Sep 2020 17:50:02 +0000 Subject: [issue41025] C implementation of ZoneInfo cannot be subclassed In-Reply-To: <1592490411.18.0.433446521396.issue41025@roundup.psfhosted.org> Message-ID: <1600105802.83.0.219954182388.issue41025@roundup.psfhosted.org> ?ukasz Langa added the comment: I will be cutting RC2 from the head of 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:50:17 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Sep 2020 17:50:17 +0000 Subject: [issue41025] C implementation of ZoneInfo cannot be subclassed In-Reply-To: <1592490411.18.0.433446521396.issue41025@roundup.psfhosted.org> Message-ID: <1600105817.34.0.495996322388.issue41025@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- priority: release blocker -> critical stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:51:43 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Sep 2020 17:51:43 +0000 Subject: [issue40746] test_gdb failing on 32-bit armv7l when built with GCC -Og (fail on Raspbian on 3.9, regression from 3.8) In-Reply-To: <1590258625.25.0.246740749681.issue40746@roundup.psfhosted.org> Message-ID: <1600105903.78.0.227836379315.issue40746@roundup.psfhosted.org> ?ukasz Langa added the comment: Downgrading since this missed rc1 anyway. ---------- priority: release blocker -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:54:18 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Sep 2020 17:54:18 +0000 Subject: [issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start In-Reply-To: <1595869655.44.0.79039964549.issue41412@roundup.psfhosted.org> Message-ID: <1600106058.41.0.15564784325.issue41412@roundup.psfhosted.org> ?ukasz Langa added the comment: "Leaving this open until we can validate on the next release". You should be able to do it now, Steve. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:56:26 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Sep 2020 17:56:26 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1600106186.52.0.69557961199.issue40536@roundup.psfhosted.org> ?ukasz Langa added the comment: Note: the release of the last RC is imminent. Whatever API changes were planned, they have to wait for 3.10. ---------- priority: deferred blocker -> critical versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 13:58:40 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Sep 2020 17:58:40 +0000 Subject: [issue39883] Use BSD0 license for code in docs In-Reply-To: <1583553057.27.0.724137569708.issue39883@roundup.psfhosted.org> Message-ID: <1600106320.14.0.464605378843.issue39883@roundup.psfhosted.org> Guido van Rossum added the comment: This looks fully resolved. Thanks again Todd! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 14:08:27 2020 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 14 Sep 2020 18:08:27 +0000 Subject: [issue40536] Addition of a "list of available time zones" function to zoneinfo In-Reply-To: <1588785591.81.0.248136692657.issue40536@roundup.psfhosted.org> Message-ID: <1600106907.17.0.568275226871.issue40536@roundup.psfhosted.org> Paul Ganssle added the comment: Thanks ?ukasz. Sorry I forgot to respond last time. We've had no feedback on this whatsoever, and I think we've probably made the right choice, so we can go ahead and call this resolved. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 14:41:27 2020 From: report at bugs.python.org (mohamed koubaa) Date: Mon, 14 Sep 2020 18:41:27 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1600108887.66.0.838682617118.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21297 pull_request: https://github.com/python/cpython/pull/22242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 14:48:40 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 14 Sep 2020 18:48:40 +0000 Subject: [issue40108] Improve error message for -m option when .py is present In-Reply-To: <1585526523.79.0.240338395586.issue40108@roundup.psfhosted.org> Message-ID: <1600109320.2.0.598877107445.issue40108@roundup.psfhosted.org> Change by Brett Cannon : ---------- components: +Library (Lib) -XML _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:29:08 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Sep 2020 19:29:08 +0000 Subject: [issue41646] shutil.copy documentation should clarify support for path-like objects In-Reply-To: <1598522026.83.0.0983078348702.issue41646@roundup.psfhosted.org> Message-ID: <1600111748.04.0.818865674009.issue41646@roundup.psfhosted.org> Steve Dower added the comment: New changeset 8f2b991eef062c22c429a96983c78be007180b66 by Zackery Spytz in branch 'master': bpo-41646: Mention path-like objects support in the docs for shutil.copy() (GH-22208) https://github.com/python/cpython/commit/8f2b991eef062c22c429a96983c78be007180b66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:29:12 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 19:29:12 +0000 Subject: [issue41646] shutil.copy documentation should clarify support for path-like objects In-Reply-To: <1598522026.83.0.0983078348702.issue41646@roundup.psfhosted.org> Message-ID: <1600111752.69.0.207142177024.issue41646@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21299 pull_request: https://github.com/python/cpython/pull/22244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:29:03 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 19:29:03 +0000 Subject: [issue41646] shutil.copy documentation should clarify support for path-like objects In-Reply-To: <1598522026.83.0.0983078348702.issue41646@roundup.psfhosted.org> Message-ID: <1600111743.3.0.278630189671.issue41646@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21298 pull_request: https://github.com/python/cpython/pull/22243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:30:31 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 19:30:31 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1600111831.06.0.838025438267.issue41744@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21300 pull_request: https://github.com/python/cpython/pull/22245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:30:38 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 19:30:38 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1600111838.91.0.931632404673.issue41744@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21301 pull_request: https://github.com/python/cpython/pull/22246 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:30:19 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Sep 2020 19:30:19 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1600111819.21.0.309688522966.issue41744@roundup.psfhosted.org> Steve Dower added the comment: New changeset 7c11a9accabe3720940f334eb1226bb7bb9179c7 by V?clav Slav?k in branch 'master': bpo-41744: Package python.props with correct name in NuGet package (GH-22154) https://github.com/python/cpython/commit/7c11a9accabe3720940f334eb1226bb7bb9179c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:31:13 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Sep 2020 19:31:13 +0000 Subject: [issue41646] shutil.copy documentation should clarify support for path-like objects In-Reply-To: <1598522026.83.0.0983078348702.issue41646@roundup.psfhosted.org> Message-ID: <1600111873.82.0.287381419302.issue41646@roundup.psfhosted.org> Steve Dower added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:32:06 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Sep 2020 19:32:06 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1600111926.59.0.546588686189.issue41744@roundup.psfhosted.org> Steve Dower added the comment: Thanks! ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:37:03 2020 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 14 Sep 2020 19:37:03 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) Message-ID: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> New submission from Alex Gaynor : This function is incredibly useful for efficient interoperability between Python and other languages with UTF-8 based strings (e.g. Rust). Right now it's not possible to do interop without several copies/allocations if you're trying to build an abi3 wheel. This is tactically relevant to me here: https://github.com/PyO3/pyo3/issues/1125 This API has been stable since it was introduced in Python 3.1, so I think making it stable would be appropriate. Inada, Benjamin suggested I should ask you for your feedback on this. I'm happy to send a pull request. ---------- components: C API keywords: easy (C) messages: 376896 nosy: alex, benjamin.peterson, inada.naoki priority: normal severity: normal status: open title: Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:42:45 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Sep 2020 19:42:45 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600112565.86.0.177211816879.issue41780@roundup.psfhosted.org> Guido van Rossum added the comment: I actually have no idea where dir() gets its information. IIRC the implementation was a collaboration with Batuhan -- @Batuhan, do you want to look into this? Presumably some metadata needs to be added to genericaliasobject.c. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:43:46 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Mon, 14 Sep 2020 19:43:46 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600112626.81.0.94782102023.issue41780@roundup.psfhosted.org> Batuhan Taskaya added the comment: > @Batuhan, do you want to look into this? Sure, will check it out! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 15:47:48 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 19:47:48 +0000 Subject: [issue41744] NuGet python.props only works in python nuget, not other variants In-Reply-To: <1599579230.23.0.203265478789.issue41744@roundup.psfhosted.org> Message-ID: <1600112868.15.0.419470217778.issue41744@roundup.psfhosted.org> miss-islington added the comment: New changeset b007a9be6fab6d55deae070e5eaef9755794e169 by Miss Islington (bot) in branch '3.8': bpo-41744: Package python.props with correct name in NuGet package (GH-22154) https://github.com/python/cpython/commit/b007a9be6fab6d55deae070e5eaef9755794e169 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:07:04 2020 From: report at bugs.python.org (Mertcan) Date: Mon, 14 Sep 2020 20:07:04 +0000 Subject: [issue41783] Standard Color class In-Reply-To: <1600101879.5.0.216501247063.issue41783@roundup.psfhosted.org> Message-ID: <1600114024.54.0.703093486279.issue41783@roundup.psfhosted.org> Change by Mertcan : ---------- keywords: +patch pull_requests: +21302 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:26:29 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 20:26:29 +0000 Subject: [issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name In-Reply-To: <1585165738.23.0.618463548627.issue40066@roundup.psfhosted.org> Message-ID: <1600115189.46.0.598475720876.issue40066@roundup.psfhosted.org> Ethan Furman added the comment: Looks like the `re` module's flags have been updated separately in issue36548: >>> import re >>> re.I re.IGNORECASE >>> print(re.I) # should also be re.IGNORECASE >>> re.I|re.S|re.X re.IGNORECASE|re.DOTALL|re.VERBOSE For stdlib Enum conversions are we happy with that? Or should __str__ just print the numeric value? ---------- nosy: +ezio.melotti, mrabarnett, serhiy.storchaka versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:32:59 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 20:32:59 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600115579.96.0.623508137844.issue40721@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 542e1df2b018ee7068dba8076f2d6e84efd6e144 by Ethan Furman in branch 'master': bpo-40721: add note about enum member name case (GH-22231) https://github.com/python/cpython/commit/542e1df2b018ee7068dba8076f2d6e84efd6e144 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:34:07 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 20:34:07 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600115647.06.0.901623485136.issue40721@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +21303 pull_request: https://github.com/python/cpython/pull/22247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:34:17 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 20:34:17 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600115657.07.0.527811628645.issue40721@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21304 pull_request: https://github.com/python/cpython/pull/22248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:42:45 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 20:42:45 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600116165.99.0.434063637402.issue40721@roundup.psfhosted.org> miss-islington added the comment: New changeset 624cc10ee4aae513be9f2812f6f5621b6f32f17c by Miss Islington (bot) in branch '3.8': bpo-40721: add note about enum member name case (GH-22231) https://github.com/python/cpython/commit/624cc10ee4aae513be9f2812f6f5621b6f32f17c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:49:33 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 14 Sep 2020 20:49:33 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600116573.05.0.023721092592.issue40721@roundup.psfhosted.org> miss-islington added the comment: New changeset b502c7618d710d31517a7ee6a72890d0963e357a by Miss Islington (bot) in branch '3.9': bpo-40721: add note about enum member name case (GH-22231) https://github.com/python/cpython/commit/b502c7618d710d31517a7ee6a72890d0963e357a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:51:34 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 20:51:34 +0000 Subject: [issue40721] PEP0435 (enums) -- there is no standard on enum item letters case In-Reply-To: <1590097376.47.0.46238939319.issue40721@roundup.psfhosted.org> Message-ID: <1600116694.7.0.767072864373.issue40721@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 16:57:09 2020 From: report at bugs.python.org (=?utf-8?q?Hildo_Guillardi_J=C3=BAnior?=) Date: Mon, 14 Sep 2020 20:57:09 +0000 Subject: [issue41785] Unittest do not support datatime for AlmostEqual method Message-ID: <1600117029.56.0.0494687927822.issue41785@roundup.psfhosted.org> New submission from Hildo Guillardi J?nior : I am running a test `self.assertAlmostEqual(date1, date2, 6)` and getting the result: ERROR: test_datetime_linspace (__main__.TestFunctions) Check the linspace object output type and delta between them. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/lab/Documents/UNICAMP/LabREI/web-visualization/tests/test_interpreter.py", line 87, in test_datetime_linspace self.assertAlmostEqual(time_list[-1], now, 6) File "/usr/lib/python3.8/unittest/case.py", line 957, in assertAlmostEqual if round(diff, places) == 0: TypeError: type datetime.timedelta doesn't define __round__ method Despite the definition @overload def assertAlmostEqual(self, first: datetime.datetime, second: datetime.datetime, places: int = ..., msg: Any = ..., delta: datetime.timedelta = ...) -> None: ... on file case.pyi, the case.py doesn't deal good with `if round(diff, places) == 0:`, with `diff` the difference between the two varaibles. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 376904 nosy: hildogjr priority: normal severity: normal status: open title: Unittest do not support datatime for AlmostEqual method type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 17:00:10 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 21:00:10 +0000 Subject: [issue39451] enum.Enum reference count leaks In-Reply-To: <1579933833.85.0.945475764886.issue39451@roundup.psfhosted.org> Message-ID: <1600117210.78.0.220007796826.issue39451@roundup.psfhosted.org> Ethan Furman added the comment: Thanks, Dan, for checking this out. As you noted, a garbage collection solved the issue, so I'm not going to worry about it. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 17:00:41 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Sep 2020 21:00:41 +0000 Subject: [issue41783] Standard Color class In-Reply-To: <1600101879.5.0.216501247063.issue41783@roundup.psfhosted.org> Message-ID: <1600117241.16.0.421832259906.issue41783@roundup.psfhosted.org> Eric V. Smith added the comment: The normal way for something like this to be added to the stdlib would first be for a version on PyPI to be widely used. Then it would be evaluated for suitability for inclusion in the stdlib. Having it first on PyPI would flesh out the API and use cases. For example, I have no idea what an API for a Color class would be. I imagine it would depend on what other software it's designed to interface with. Would it be float values? ints? What range? RGB? HSV? Conversions between those? For example, see the process that ipaddress went through, which included writing PEP 3144. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 17:04:46 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 14 Sep 2020 21:04:46 +0000 Subject: [issue41785] Unittest do not support datatime for AlmostEqual method In-Reply-To: <1600117029.56.0.0494687927822.issue41785@roundup.psfhosted.org> Message-ID: <1600117486.46.0.520223857312.issue41785@roundup.psfhosted.org> Irit Katriel added the comment: You need to pass the delta in as a kwarg: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertAlmostEqual >>> unittest.TestCase().assertAlmostEqual( datetime.date(2020,1,5), datetime.date(2020,1,2), delta=datetime.timedelta(2)) Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython\lib\unittest\case.py", line 893, in assertAlmostEqual raise self.failureException(msg) AssertionError: datetime.date(2020, 1, 5) != datetime.date(2020, 1, 2) within datetime.timedelta(days=2) delta (datetime.timedelta(days=3) difference) >>> unittest.TestCase().assertAlmostEqual( datetime.date(2020,1,5), datetime.date(2020,1,2), delta=datetime.timedelta(3)) >>> ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 17:10:32 2020 From: report at bugs.python.org (=?utf-8?q?Hildo_Guillardi_J=C3=BAnior?=) Date: Mon, 14 Sep 2020 21:10:32 +0000 Subject: [issue41785] Unittest do not support datatime for AlmostEqual method In-Reply-To: <1600117029.56.0.0494687927822.issue41785@roundup.psfhosted.org> Message-ID: <1600117832.89.0.60215253588.issue41785@roundup.psfhosted.org> Hildo Guillardi J?nior added the comment: Thanks. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 17:39:14 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Sep 2020 21:39:14 +0000 Subject: [issue41783] Standard Color class In-Reply-To: <1600101879.5.0.216501247063.issue41783@roundup.psfhosted.org> Message-ID: <1600119554.49.0.281711111263.issue41783@roundup.psfhosted.org> Raymond Hettinger added the comment: Also the trend is to not put classes like this in the standard library at all. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 17:45:15 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 21:45:15 +0000 Subject: [issue41541] [PATCH] Make pty.spawn set window size In-Reply-To: <1597340220.32.0.858165521017.issue41541@roundup.psfhosted.org> Message-ID: <1600119915.23.0.905864213934.issue41541@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 17:55:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 14 Sep 2020 21:55:38 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600120538.46.0.648717428886.issue41513@roundup.psfhosted.org> STINNER Victor added the comment: Multiple tests failed on x86 Gentoo Non-Debug with X 3.x: https://buildbot.python.org/all/#/builders/58/builds/73 Example of failure: ====================================================================== FAIL: testHypotAccuracy (test.test_math.MathTests) (hx='0x1.10106eb4b44a2p+29', hy='0x1.ef0596cdc97f8p+29') ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_math.py", line 855, in testHypotAccuracy self.assertEqual(hypot(x, y), z) AssertionError: 1184594898.793983 != 1184594898.7939832 (I didn't investigate the bug, I just report the failure.) ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 18:01:58 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Sep 2020 22:01:58 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600120918.88.0.902119255801.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +21305 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/22249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 18:05:08 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 22:05:08 +0000 Subject: [issue41786] re.RegexFlag.__str__ is incorrect Message-ID: <1600121108.29.0.968906869143.issue41786@roundup.psfhosted.org> New submission from Ethan Furman : In issue36548 - Make the repr of re flags more readable - __str__ is set to object.__str__. Hovewer, setting __str__ to object.__str__ means that EnumMeta will replace __str__ with the first Enum's __str__ instead (Flag, in this case). As asked in issue40066: do we want the str() and repr() to be the same, or should the str() be the plain numeric value? ---------- components: Library (Lib) messages: 376911 nosy: ethan.furman, ezio.melotti, mrabarnett, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: re.RegexFlag.__str__ is incorrect versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 18:06:57 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 22:06:57 +0000 Subject: [issue41786] re.RegexFlag.__str__ is incorrect In-Reply-To: <1600121108.29.0.968906869143.issue41786@roundup.psfhosted.org> Message-ID: <1600121217.18.0.888083081168.issue41786@roundup.psfhosted.org> Ethan Furman added the comment: >>> import re >>> re.I re.IGNORECASE >>> print(re.I) RegexFlag.IGNORECASE # according to comment in linked issue, this should be `re.IGNORECASE` as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 18:31:43 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 14 Sep 2020 22:31:43 +0000 Subject: [issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name In-Reply-To: <1585165738.23.0.618463548627.issue40066@roundup.psfhosted.org> Message-ID: <1600122703.32.0.341064011161.issue40066@roundup.psfhosted.org> Vedran ?a?i? added the comment: If it's considered to be not too backwards-incompatible, I think it would be nice to have str different from repr. That way we can finetune what exactly we need. But we can already do almost exactly that with *int* instead of *str*, so it's not too compelling. Much more important thing is the "repr as inverse of eval". Is there any way we can have that for our own enums (as a mixin or a decorator)? @module_global(re) class RegexFlag(Enum): ... It would be fantastic. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 18:49:01 2020 From: report at bugs.python.org (Cameron Simpson) Date: Mon, 14 Sep 2020 22:49:01 +0000 Subject: [issue41787] adding PEP references to documentation Message-ID: <1600123741.16.0.294796218957.issue41787@roundup.psfhosted.org> New submission from Cameron Simpson : Add rationale for __length_hint__ and link to PEP 424, per the discussion here: https://mail.python.org/archives/list/python-dev at python.org/thread/HXNFMIEZH73MXYEBP4TDIK3KFPYJ4QKR/#CXBEWAYSCAZCU7QABRBTKNVPDM3LELUM Once the phrasing and directives are agreed, continue to chase other references in the docs. This will produce multiple small PRs, possibly one per PEP as chased. Phrasing: I intend to amend the "New in version V." lines to become "New in version V, originally specified by PEPNNN." with a link to the PEP on "PEPNNN". I'm tempted to make "version V" also a link to its Whats New page; that will make for a bit more visual noise but seems pertinent. The other thing I'd like to consider is a _single sentence_ in the docs identifying the main motivating use case for the feature. The __length_hint__ docs are a prime example here - the purpose of the feature is not mentioned, merely its semantics. While a feature can be used for many purposes, knowing why it was introduces brings a lot of cognitive benefit to the reader. ---------- assignee: docs at python components: Documentation messages: 376914 nosy: cameron, docs at python priority: normal severity: normal status: open title: adding PEP references to documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 19:04:13 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 14 Sep 2020 23:04:13 +0000 Subject: [issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name In-Reply-To: <1585165738.23.0.618463548627.issue40066@roundup.psfhosted.org> Message-ID: <1600124653.5.0.0986001416907.issue40066@roundup.psfhosted.org> Ethan Furman added the comment: "repr as inverse of eval" is nice to have, but it is not a requirement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 19:11:05 2020 From: report at bugs.python.org (pmp-p) Date: Mon, 14 Sep 2020 23:11:05 +0000 Subject: [issue35243] readline timeout too long for async gfx use In-Reply-To: <1542182908.62.0.788709270274.issue35243@psf.upfronthosting.co.za> Message-ID: <1600125065.83.0.633655994492.issue35243@roundup.psfhosted.org> Change by pmp-p : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 19:27:46 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 14 Sep 2020 23:27:46 +0000 Subject: [issue41783] Standard Color class In-Reply-To: <1600101879.5.0.216501247063.issue41783@roundup.psfhosted.org> Message-ID: <1600126066.45.0.37072965143.issue41783@roundup.psfhosted.org> Eric V. Smith added the comment: Yeah, I don't want to give any false hope on getting such a class accepted to the stdlib. It's not super likely to be accepted unless there's a more compelling motivation on why it needs to be in the stdlib and not just on PyPI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 19:58:26 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Sep 2020 23:58:26 +0000 Subject: [issue41412] After installation on Windows7, 64bit Python 3.9.0b5 reports "api-ms-win-core-path-l1-1-0.dll" missing and doesn't start In-Reply-To: <1595869655.44.0.79039964549.issue41412@roundup.psfhosted.org> Message-ID: <1600127906.36.0.85540125451.issue41412@roundup.psfhosted.org> Steve Dower added the comment: Works great! (By which I mean, doesn't work at all ;) ) ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 20:09:03 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 15 Sep 2020 00:09:03 +0000 Subject: [issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name In-Reply-To: <1585165738.23.0.618463548627.issue40066@roundup.psfhosted.org> Message-ID: <1600128543.93.0.940973027298.issue40066@roundup.psfhosted.org> Vedran ?a?i? added the comment: Noone said it is a requirement, I just said it would be nice to have it factored out as a decorator or something instead of having to write __repr__ over and over again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 20:14:05 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Sep 2020 00:14:05 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600128845.12.0.828914996836.issue41513@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 95a8a0e01d1f4f49ad6b4d4f2ae3bbf93c462013 by Raymond Hettinger in branch 'master': bpo-41513: Remove broken tests that fail on Gentoo (GH-22249) https://github.com/python/cpython/commit/95a8a0e01d1f4f49ad6b4d4f2ae3bbf93c462013 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 20:15:26 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Sep 2020 00:15:26 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600128926.35.0.225383377454.issue41513@roundup.psfhosted.org> Raymond Hettinger added the comment: I saw that the Gentoo bot reacted badly to the new tests, so I reverted them. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 20:36:02 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 00:36:02 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600130162.07.0.694789010184.issue41517@roundup.psfhosted.org> Ethan Furman added the comment: To answer the invariant question, see this post by Guido: https://mail.python.org/pipermail/python-dev/2013-April/125716.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 21:04:51 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Tue, 15 Sep 2020 01:04:51 +0000 Subject: [issue41541] [PATCH] Make pty.spawn set window size In-Reply-To: <1597340220.32.0.858165521017.issue41541@roundup.psfhosted.org> Message-ID: <1600131891.29.0.581578997325.issue41541@roundup.psfhosted.org> Change by Soumendra Ganguly : Added file: https://bugs.python.org/file49455/before.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 21:04:58 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Tue, 15 Sep 2020 01:04:58 +0000 Subject: [issue41541] [PATCH] Make pty.spawn set window size In-Reply-To: <1597340220.32.0.858165521017.issue41541@roundup.psfhosted.org> Message-ID: <1600131898.37.0.125316388813.issue41541@roundup.psfhosted.org> Change by Soumendra Ganguly : Added file: https://bugs.python.org/file49456/after.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 21:07:22 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Tue, 15 Sep 2020 01:07:22 +0000 Subject: [issue41541] [PATCH] Make pty.spawn set window size In-Reply-To: <1597340220.32.0.858165521017.issue41541@roundup.psfhosted.org> Message-ID: <1600132042.26.0.899072122568.issue41541@roundup.psfhosted.org> Change by Soumendra Ganguly : Removed file: https://bugs.python.org/file49457/script.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 21:06:35 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Tue, 15 Sep 2020 01:06:35 +0000 Subject: [issue41541] [PATCH] Make pty.spawn set window size In-Reply-To: <1597340220.32.0.858165521017.issue41541@roundup.psfhosted.org> Message-ID: <1600131995.39.0.444318415901.issue41541@roundup.psfhosted.org> Change by Soumendra Ganguly : Added file: https://bugs.python.org/file49457/script.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 21:08:45 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Tue, 15 Sep 2020 01:08:45 +0000 Subject: [issue41541] [PATCH] Make pty.spawn set window size In-Reply-To: <1597340220.32.0.858165521017.issue41541@roundup.psfhosted.org> Message-ID: <1600132125.2.0.73774372015.issue41541@roundup.psfhosted.org> Change by Soumendra Ganguly : Added file: https://bugs.python.org/file49458/script.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:05:26 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 15 Sep 2020 02:05:26 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600135526.47.0.849958955131.issue41784@roundup.psfhosted.org> Inada Naoki added the comment: +1. It is a very important API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:06:48 2020 From: report at bugs.python.org (Inada Naoki) Date: Tue, 15 Sep 2020 02:06:48 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600135608.19.0.176162144164.issue41784@roundup.psfhosted.org> Change by Inada Naoki : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:09:28 2020 From: report at bugs.python.org (Matthew Davis) Date: Tue, 15 Sep 2020 02:09:28 +0000 Subject: [issue41788] enhancement: add assertDuration context manager to unittest module Message-ID: <1600135768.52.0.225674115318.issue41788@roundup.psfhosted.org> New submission from Matthew Davis : # Summary I propose an additional unit test type for the unittest module. TestCase.assertDuration(min=None, max=None), which is a context manager, similar to assertRaises. It runs the code inside it, and then fails the test if the duration of the code inside was not between min and max. # Use case I want to check that when I call a certain function in my application, it doesn't take far more time than I expect, or far less time. e.g. if I'm trying to do things concurrently, I want to test that they are indeed concurrent, by measuring whether the duration equals the sum of all processes' duration, or the max. # MWE ``` import unittest from time import sleep, time from multiprocessing import Pool def slow(x): sleep(x) # blocking sleep for 0, 1, 2, 3 seconds, concurrently def together(): with Pool(4) as p: p.map(slow, range(4)) class TestConcurrent(unittest.TestCase): # this is how you do it today def test_today(self): start = time() together() end = time() duration = end - start self.assertGreaterEqual(duration, 2) # max should be 3 seconds, plus some overhead # if together() called slow() in series, # total duration would be 0 + 1 + 2 + 3 = 6 > 4 self.assertLessEqual(duration, 4) # this is how I want to do it def test_simpler(self): with self.assertDuration(min=2, max=4): together() ``` # Solution I just need to add a new context manager next to this one: https://github.com/python/cpython/blob/6b34d7b51e33fcb21b8827d927474ce9ed1f605c/Lib/unittest/case.py#L207 ---------- components: Library (Lib) messages: 376923 nosy: matt-davis priority: normal severity: normal status: open title: enhancement: add assertDuration context manager to unittest module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:12:45 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 02:12:45 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced Message-ID: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> New submission from Ethan Furman : If an Enum declares __str__, __repr__, __format__, or __reduce_ex__ to be object`s, then it will get replaced by the base Enum's corresponding method. E.g.: class RegexFlag(IntFlag): IGNORECASE = I = 2 def repr(self): return 're.%s' % self.name __str__ = object.__str__ The intent of the above is have str(RegexFlag.I) == repr(RegexFlag.I) (with some quotes, of course), but currently RegexFlag.__str__ will be replaced with Flag.__str__. ---------- assignee: ethan.furman components: Library (Lib) messages: 376924 nosy: barry, eli.bendersky, ethan.furman priority: normal severity: normal stage: needs patch status: open title: Enum: __str__ and friends sometimes erroneously replaced type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:14:41 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 02:14:41 +0000 Subject: [issue41786] re.RegexFlag.__str__ is incorrect In-Reply-To: <1600121108.29.0.968906869143.issue41786@roundup.psfhosted.org> Message-ID: <1600136081.84.0.83949214112.issue41786@roundup.psfhosted.org> Ethan Furman added the comment: The behavior of not honoring the object.__str__ override is a bug in Enum and currently being tracked in issue41789. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Enum: __str__ and friends sometimes erroneously replaced _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:20:13 2020 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 15 Sep 2020 02:20:13 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600136413.9.0.554695460397.issue41784@roundup.psfhosted.org> Change by Alex Gaynor : ---------- assignee: -> alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:23:28 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 02:23:28 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced In-Reply-To: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> Message-ID: <1600136608.55.0.517966970271.issue41789@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21306 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22250 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 22:27:04 2020 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 15 Sep 2020 02:27:04 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600136824.87.0.869513954666.issue41784@roundup.psfhosted.org> Change by Alex Gaynor : ---------- keywords: +patch pull_requests: +21307 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22252 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 14 23:15:13 2020 From: report at bugs.python.org (mohamed koubaa) Date: Tue, 15 Sep 2020 03:15:13 +0000 Subject: [issue41790] C-API documentation Message-ID: <1600139713.54.0.954662294559.issue41790@roundup.psfhosted.org> New submission from mohamed koubaa : The C-API documentation introduction contains an error: "Almost all Python objects live on the heap: you never declare an automatic or static variable of type :c:type:`PyObject`, only pointer variables of type :c:type:`PyObject*` can be declared. The sole exception are the type objects; since these must never be deallocated, they are typically static :c:type:`PyTypeObject` objects." With heap types, PyTypeObject can be deallocated. ---------- assignee: docs at python components: Documentation messages: 376926 nosy: docs at python, koubaa priority: normal pull_requests: 21308 severity: normal status: open title: C-API documentation type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 00:31:47 2020 From: report at bugs.python.org (Radim Novotny) Date: Tue, 15 Sep 2020 04:31:47 +0000 Subject: [issue41791] mimetypes module does not recognize jp2 type Message-ID: <1600144307.97.0.591745605568.issue41791@roundup.psfhosted.org> New submission from Radim Novotny : Even if jp2 is in the official list of types https://www.iana.org/assignments/media-types/media-types.xhtml it's not recognized by the MimeTypes.guess_type: >>> from mimetypes import MimeTypes >>> MimeTypes().guess_type('test.jp2') (None, None) The same example works in Python 3.7 and returns 'image/jp2' ---------- messages: 376927 nosy: naro priority: normal severity: normal status: open title: mimetypes module does not recognize jp2 type type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 02:23:53 2020 From: report at bugs.python.org (Pavel Raiskup) Date: Tue, 15 Sep 2020 06:23:53 +0000 Subject: [issue34374] Shouldn't shutil.copyfile replace link in dst with follow_symlinks set? In-Reply-To: <1533922607.61.0.56676864532.issue34374@psf.upfronthosting.co.za> Message-ID: <1600151033.4.0.100510256288.issue34374@roundup.psfhosted.org> Pavel Raiskup added the comment: Check out this default behavior of /bin/cp though: $ mkdir a b $ echo content > a/file $ ln -s non-existing b/file $ cp a/file b cp: not writing through dangling symlink 'b/file' Shouldn't shutil.copy*() refuse to write trough a dangling symlink to non-existent file? (ATM it seems it just silently creates the file, or fails if it can not be created). ---------- nosy: +Pavel Raiskup _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 03:39:31 2020 From: report at bugs.python.org (Mertcan) Date: Tue, 15 Sep 2020 07:39:31 +0000 Subject: [issue41783] Standard Color class In-Reply-To: <1600101879.5.0.216501247063.issue41783@roundup.psfhosted.org> Message-ID: <1600155571.37.0.265616032363.issue41783@roundup.psfhosted.org> Mertcan added the comment: For example, consider the libraries of stdlib and PyPI that are available now and may be in the future. In libraries like Tkinter or Turtle, a universal color class can make the code clearer. Color operations can also be performed by representing the Color class. For example, deriving a CLI color code from the RGB values ??it represents. Doesn't such a thing provide more advanced possibilities for the existing cli library (cmd) and reduce the need for PyPI API? I think this can provide a common use for WEB and GUI libraries. It can also be beneficial in terms of performance as it can reduce the number of parameters for most functions. Python is a programming language widely used as CLI. With a built-in color library, wouldn't we increase the appeal and language coverage? I see that there are many libraries on PyPI regarding colors, and most of them are built on CLI. Some of these are really used too much. We often encounter issues like "How can I print in color in Console?" in places like Stackoverflow. I think that many color-related or color libraries do not have a color class on stlib, so it might be too crowded for them to make a color class for themselves, especially when using multiple color-oriented libraries. Even if they don't make a special class for them, the number of parameters will naturally be higher. However, I think a standard color class can prevent all of these and increase readability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 03:45:39 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Sep 2020 07:45:39 +0000 Subject: [issue41788] enhancement: add assertDuration context manager to unittest module In-Reply-To: <1600135768.52.0.225674115318.issue41788@roundup.psfhosted.org> Message-ID: <1600155939.21.0.911577643034.issue41788@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think this can be very error prone because a particular operation could be interrupted by GIL switching in the middle of the context manager and be reported as taking much more than the execution of the code itself is taking. This will be very confused to users that expect it to "just work" ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 04:07:17 2020 From: report at bugs.python.org (Patrick Reader) Date: Tue, 15 Sep 2020 08:07:17 +0000 Subject: [issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict Message-ID: <1600157237.06.0.946064898038.issue41792@roundup.psfhosted.org> New submission from Patrick Reader : See https://github.com/python/typing/issues/751 ---------- components: Library (Lib) messages: 376931 nosy: pxeger priority: normal severity: normal status: open title: No (public) way to dynamically introspect if an annotation is a TypedDict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 04:09:41 2020 From: report at bugs.python.org (Patrick Reader) Date: Tue, 15 Sep 2020 08:09:41 +0000 Subject: [issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict In-Reply-To: <1600157237.06.0.946064898038.issue41792@roundup.psfhosted.org> Message-ID: <1600157381.58.0.92975896739.issue41792@roundup.psfhosted.org> Change by Patrick Reader : ---------- keywords: +patch pull_requests: +21309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22254 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 04:46:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Sep 2020 08:46:40 +0000 Subject: [issue41788] enhancement: add assertDuration context manager to unittest module In-Reply-To: <1600135768.52.0.225674115318.issue41788@roundup.psfhosted.org> Message-ID: <1600159600.68.0.456044336193.issue41788@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Pablo. It is too unreliable. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 05:11:15 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Sep 2020 09:11:15 +0000 Subject: [issue41788] enhancement: add assertDuration context manager to unittest module In-Reply-To: <1600135768.52.0.225674115318.issue41788@roundup.psfhosted.org> Message-ID: <1600161075.03.0.304636490695.issue41788@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 05:13:02 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Sep 2020 09:13:02 +0000 Subject: [issue41788] enhancement: add assertDuration context manager to unittest module In-Reply-To: <1600135768.52.0.225674115318.issue41788@roundup.psfhosted.org> Message-ID: <1600161182.09.0.323576062119.issue41788@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks for the proposal Matthew, unfortunately, this addition is not reliable enough for the standard library and OTOH can be easily implemented in-situ for the users that know what the limitations are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 05:19:04 2020 From: report at bugs.python.org (Ruben Vorderman) Date: Tue, 15 Sep 2020 09:19:04 +0000 Subject: [issue41566] Include much faster DEFLATE implementations in Python's gzip and zlib libraries. (isa-l) In-Reply-To: <1597652346.68.0.240792775725.issue41566@roundup.psfhosted.org> Message-ID: <1600161544.22.0.385441840576.issue41566@roundup.psfhosted.org> Ruben Vorderman added the comment: Hi, thanks all for the comments and the help. I have created the bindings using Cython. The project is still a work in progress as of this moment. I leave the link here for future reference. Special thanks for the Cython developers for enabling these bindings. https://github.com/rhpvorderman/python-isal ---------- resolution: -> third party stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 05:33:51 2020 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 15 Sep 2020 09:33:51 +0000 Subject: [issue41788] enhancement: add assertDuration context manager to unittest module In-Reply-To: <1600135768.52.0.225674115318.issue41788@roundup.psfhosted.org> Message-ID: <1600162431.96.0.129005570548.issue41788@roundup.psfhosted.org> Steven D'Aprano added the comment: Matt, you can add this to your own unit tests by just subclassing unittest.TestCase and adding a new assertDuration method. Copy the existing method's implementations (its open source and you should have the source code already, but if not you can find it here: https://github.com/python/cpython/blob/3.8/Lib/unittest/__init__.py If you are looking for some timing code to use (in case you don't already have your own) you can try this: https://github.com/ActiveState/code/tree/master/recipes/Python/577896_Benchmark_code ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 07:35:58 2020 From: report at bugs.python.org (Allan Daemon) Date: Tue, 15 Sep 2020 11:35:58 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600169758.43.0.715176175777.issue41780@roundup.psfhosted.org> Allan Daemon added the comment: > I actually have no idea where dir() gets its information. I will share what I find out already, so it may hopefully be helpful. The dir function used is the general object.__dir__ function, defined in Objects/typeobject.c:type___dir___impl(), that just takes everything from __dict__ of the class and its bases. But the GenericAlias is trying hard pretending to be the origin class, so when you ask for the __dict__, it gives the original class, not the GenericAlias: >>> list[int].__dict__ == list.__dict__ True There are also some other things that seems a bit strange, but it may just be right: >>> list.__class__ >>> list[int].__class__ >>> type(list) >>> type(list[int]) This happens because of the tp_getattro function genericaliasobject.c:ga_getattro(), that takes the attributes from the origin except for the following names, that are taken from the GenericAlias itself: "__origin__", "__args__", "__parameters__", "__mro_entries__", "__reduce_ex__", "__reduce__", So, when the dir() is getting the __dict__, it gets list.__dict__ and base (object) instead of GenericAlias. Looking the ga_getattro() calls when dir() is fired, it also gets the __class__ attribute after getting the __dict__. Adding one or another makes the dir() showing up the GenericAlias attributes, but others went missing. An idea to solve this spefic issue could be overriding the __dir__ method, something like this python code (written in c, of course): def __dir__(self): r = super().__dir__() return r + attribute_names_list + method_names_list But I wonder what else should not be forwarded to origin. ---------- components: +Interpreter Core -Documentation, Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 09:39:55 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 13:39:55 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600177195.68.0.662896799909.issue41776@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21310 pull_request: https://github.com/python/cpython/pull/22255 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 09:39:48 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 Sep 2020 13:39:48 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600177188.51.0.991508260821.issue41776@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 7bcc6456ad4704da9b287c8045768fa53961adc5 by Neeraj Samtani in branch 'master': bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234) https://github.com/python/cpython/commit/7bcc6456ad4704da9b287c8045768fa53961adc5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 09:40:03 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 13:40:03 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600177203.59.0.963156592413.issue41776@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21311 pull_request: https://github.com/python/cpython/pull/22256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 09:56:46 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 Sep 2020 13:56:46 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600178206.66.0.184495625784.issue41776@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset a0da90720d5330c53b8083272374ede1c7a1e33a by Miss Islington (bot) in branch '3.8': bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234) (GH-22256) https://github.com/python/cpython/commit/a0da90720d5330c53b8083272374ede1c7a1e33a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 09:56:37 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 Sep 2020 13:56:37 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600178197.69.0.414669427723.issue41776@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 0cc037f8a72c283bf64d1968e34cbdc22b0e3010 by Miss Islington (bot) in branch '3.9': bpo-41776: Revise example of "continue" in the tutorial documentation (GH-22234) (GH-22255) https://github.com/python/cpython/commit/0cc037f8a72c283bf64d1968e34cbdc22b0e3010 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 09:58:13 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 15 Sep 2020 13:58:13 +0000 Subject: [issue41776] Revise example of "continue" in the tutorial documentation In-Reply-To: <1599998342.74.0.122825904284.issue41776@roundup.psfhosted.org> Message-ID: <1600178293.41.0.208393767218.issue41776@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 10:19:52 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 15 Sep 2020 14:19:52 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600179592.11.0.905673974672.issue41780@roundup.psfhosted.org> Batuhan Taskaya added the comment: Okay, so IIRC if we stop forwarding __class__ (add it as an exception to attr_exceptions) it would return us the original dir(), and also solve the inconsistency of the example you gave; > >>> list.__class__ > > >>> list[int].__class__ > > > >>> type(list) > > >>> type(list[int]) > but the problem is that, it is not 'exactly' complying with the specs at PEP 585. I am aware that we already added some extras to this list (https://www.python.org/dev/peps/pep-0585/#parameters-to-generics-are-available-at-runtime) like __mro_entries__ etc, but __class__ looks like a tricky problem. @gvanrossum any comments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 10:21:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Sep 2020 14:21:40 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600179700.17.0.211129547388.issue41784@roundup.psfhosted.org> Serhiy Storchaka added the comment: What about PyUnicode_AsUTF8? Should it be made public too or left for internal use only? What about third-party implementations of Python? How hard to implement this API on an implementation without reference counts? It is interesting to hear the expert opinion of the core developers of PyPy. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 11:27:19 2020 From: report at bugs.python.org (Bruce Merry) Date: Tue, 15 Sep 2020 15:27:19 +0000 Subject: [issue21644] Optimize bytearray(int) constructor to use calloc() In-Reply-To: <1401740758.16.0.943124117891.issue21644@psf.upfronthosting.co.za> Message-ID: <1600183639.14.0.49141933135.issue21644@roundup.psfhosted.org> Bruce Merry added the comment: Was this abandoned just because nobody had the time, or was there a problem with the approach? I independently wanted this optimisation, and have ended up implementing something very similar to what was reverted in https://hg.python.org/lookup/dff6b4b61cac. In a benchmark that creates a large bytearray, then fills it with socket.readinto, I'm seeing a 2x performance improvement on Linux, and from some quick benchmarking it seems to be just as fast as the old code for small arrays that are allocated from the pool. ---------- nosy: +bmerry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 11:55:27 2020 From: report at bugs.python.org (wim glenn) Date: Tue, 15 Sep 2020 15:55:27 +0000 Subject: [issue34394] Descriptors HowTo doesn't mention __set_name__ In-Reply-To: <1534163786.32.0.56676864532.issue34394@psf.upfronthosting.co.za> Message-ID: <1600185327.28.0.0428977546777.issue34394@roundup.psfhosted.org> wim glenn added the comment: Hi Raymond, any update on this? ---------- nosy: +wim.glenn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 11:59:08 2020 From: report at bugs.python.org (wim glenn) Date: Tue, 15 Sep 2020 15:59:08 +0000 Subject: [issue41793] Inaccuracy about reflected operands in datamodel docs. Message-ID: <1600185548.76.0.619464921638.issue41793@roundup.psfhosted.org> New submission from wim glenn : Qualifying that the right operand's type must be a *strict* subclass for the reflected method to take precedence avoids an edge case / counter-example when the types are actually equal. >>> class A: ... def __add__(self, other): ... print(1) ... def __radd__(self, other): ... print(2) ... >>> A() + A() 1 >>> issubclass(A, A) True ---------- assignee: docs at python components: Documentation messages: 376944 nosy: docs at python, wim.glenn priority: normal severity: normal status: open title: Inaccuracy about reflected operands in datamodel docs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 12:02:51 2020 From: report at bugs.python.org (wim glenn) Date: Tue, 15 Sep 2020 16:02:51 +0000 Subject: [issue41793] Inaccuracy about reflected operands in datamodel docs. In-Reply-To: <1600185548.76.0.619464921638.issue41793@roundup.psfhosted.org> Message-ID: <1600185771.26.0.30525933278.issue41793@roundup.psfhosted.org> Change by wim glenn : ---------- keywords: +patch pull_requests: +21312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 12:03:40 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 Sep 2020 16:03:40 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1600185820.39.0.541953444306.issue38113@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e5fbe0cbd4be99ced5f000ad382208ad2a561c90 by Victor Stinner in branch 'master': bpo-41631: _ast module uses again a global state (#21961) https://github.com/python/cpython/commit/e5fbe0cbd4be99ced5f000ad382208ad2a561c90 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 12:03:40 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 Sep 2020 16:03:40 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1600185820.46.0.818878562247.issue41631@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e5fbe0cbd4be99ced5f000ad382208ad2a561c90 by Victor Stinner in branch 'master': bpo-41631: _ast module uses again a global state (#21961) https://github.com/python/cpython/commit/e5fbe0cbd4be99ced5f000ad382208ad2a561c90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 12:22:00 2020 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 15 Sep 2020 16:22:00 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600186920.74.0.105313092176.issue41784@roundup.psfhosted.org> Alex Gaynor added the comment: I think less is more, one API is plenty :-) It looks to me like the API is already supported on PyPy, so I think it's fine from that perspective: https://foss.heptapod.net/pypy/pypy/-/blob/branch/py3.7/pypy/module/cpyext/unicodeobject.py#L493 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 12:51:11 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 15 Sep 2020 16:51:11 +0000 Subject: [issue41790] C-API documentation ignores heap types and says type objects must never be deallocated In-Reply-To: <1600139713.54.0.954662294559.issue41790@roundup.psfhosted.org> Message-ID: <1600188671.71.0.0571186273198.issue41790@roundup.psfhosted.org> Change by Ammar Askar : ---------- title: C-API documentation -> C-API documentation ignores heap types and says type objects must never be deallocated _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 13:51:16 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Sep 2020 17:51:16 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600192276.99.0.794685388091.issue41780@roundup.psfhosted.org> Guido van Rossum added the comment: The forwarding of `__class__`, and the resulting difference between `type(list[int])` and `list[int].__class__` are intentional. I think overriding `__dir__` along the lines suggested by Allan (but in C of course) would be the best solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 13:51:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Sep 2020 17:51:41 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600192301.64.0.937970993199.issue41780@roundup.psfhosted.org> Change by Guido van Rossum : ---------- assignee: docs at python -> stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 14:07:55 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Sep 2020 18:07:55 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1600193275.46.0.375005502761.issue41631@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21313 pull_request: https://github.com/python/cpython/pull/22258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 14:07:55 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 15 Sep 2020 18:07:55 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1600193275.65.0.696784551658.issue38113@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal nosy_count: 5.0 -> 6.0 pull_requests: +21314 pull_request: https://github.com/python/cpython/pull/22258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 14:33:06 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 Sep 2020 18:33:06 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1600194786.26.0.279158714334.issue41631@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 55e0836849c14fb474e1ba7f37851e07660eea3c by Pablo Galindo in branch '3.9': [3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258) https://github.com/python/cpython/commit/55e0836849c14fb474e1ba7f37851e07660eea3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 14:33:06 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 15 Sep 2020 18:33:06 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1600194786.18.0.381807397984.issue38113@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 55e0836849c14fb474e1ba7f37851e07660eea3c by Pablo Galindo in branch '3.9': [3.9] bpo-41631: _ast module uses again a global state (GH-21961) (GH-22258) https://github.com/python/cpython/commit/55e0836849c14fb474e1ba7f37851e07660eea3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 16:10:45 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Sep 2020 20:10:45 +0000 Subject: [issue41052] Opt out serialization/deserialization for heap type In-Reply-To: <1592659049.98.0.596314769567.issue41052@roundup.psfhosted.org> Message-ID: <1600200645.27.0.900345807129.issue41052@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are other heap types implemented in C in the stdlib and third-party libraries for which pickling with protocols 0 and 1 works incorrectly. It would be better to fix copyreg._reduce_ex() instead of disabling pickling for these types one by one. >From PEP 307: > Let D be the class on the object to be pickled. First, find the nearest base class that is implemented in C (either as a built-in type or as a type defined by an extension class). Call this base class B, and the class of the object to be pickled D. Unless B is the class 'object', instances of class B must be picklable, either by having built-in support (as defined in the above three bullet points), or by having a non-default __reduce__ implementation. B must not be the same class as D (if it were, it would mean that D is not implemented in Python). The problem is with determining which class is implemented in C. The current code implies that heap types are implemented in Python, and static types are implemented in C. It is not always true, because some heap types can be implemented in C. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 16:17:59 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 15 Sep 2020 20:17:59 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600201079.86.0.0334482348259.issue41784@roundup.psfhosted.org> Serhiy Storchaka added the comment: PyUnicode_AsUTF8() is used 3 times more than PyUnicode_AsUTF8AndSize(). $ find -type f -name '*.c' -exec egrep 'PyUnicode_AsUTF8AndSize\(' '{}' + | wc -l 35 $ find -type f -name '*.c' -exec egrep 'PyUnicode_AsUTF8\(' '{}' + | wc -l 101 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 16:22:21 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 15 Sep 2020 20:22:21 +0000 Subject: [issue6721] Locks in the standard library should be sanitized on fork In-Reply-To: <1250550378.97.0.072881968798.issue6721@psf.upfronthosting.co.za> Message-ID: <1600201341.54.0.0225940457289.issue6721@roundup.psfhosted.org> Change by Andr?s Delfino : ---------- nosy: +adelfino nosy_count: 28.0 -> 29.0 pull_requests: +21315 pull_request: https://github.com/python/cpython/pull/22205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 16:22:21 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 15 Sep 2020 20:22:21 +0000 Subject: [issue36533] logging regression with threading + fork are mixed in 3.7.1rc2 (deadlock potential) In-Reply-To: <1554452151.49.0.211568667786.issue36533@roundup.psfhosted.org> Message-ID: <1600201341.8.0.405253213984.issue36533@roundup.psfhosted.org> Change by Andr?s Delfino : ---------- nosy: +adelfino nosy_count: 8.0 -> 9.0 pull_requests: +21316 pull_request: https://github.com/python/cpython/pull/22205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 16:22:21 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Tue, 15 Sep 2020 20:22:21 +0000 Subject: [issue33802] Regression in logging configuration In-Reply-To: <1528412435.4.0.592728768989.issue33802@psf.upfronthosting.co.za> Message-ID: <1600201341.87.0.958735725786.issue33802@roundup.psfhosted.org> Change by Andr?s Delfino : ---------- nosy: +adelfino nosy_count: 8.0 -> 9.0 pull_requests: +21317 pull_request: https://github.com/python/cpython/pull/22205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 16:22:51 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 15 Sep 2020 20:22:51 +0000 Subject: [issue28694] tkinter interface to fontchooser In-Reply-To: <1479174800.7.0.200377827869.issue28694@psf.upfronthosting.co.za> Message-ID: <1600201371.14.0.794055494976.issue28694@roundup.psfhosted.org> E. Paine added the comment: +1 I also think that the fontchooser should be wrapped. I briefly tested your wrapper, Lance, and found it worked fine on Windows but did not on my Linux setup (because it is non-modal). I went about implementing my own wrapper based loosely around your's (see attached) and the way I overcame this problem was to use vwait (this still works on Windows where the call is modal). vwait is good because it returns once the condition is fulfilled without the need for polling or similar. While I use the commondialog module in the wrapper, this is simply for its handling (in __init__) of the master (I don't think it would make sense to enhance the Dialog class for this wrapper). > the awful kludge in the show method (creating a Frame widget just so that some low-level operations can be performed) is repugnant to me You're going to moan at me then for using something similar in the attached! The reason I use it is to avoid the logic found on line 77 of your wrapper and *hopefully* make the code more readable (whether I achieve this is somewhat debatable). > I have access only to Windows OS Is this still the case or can you now test on a different system which is non-modal? Do you wish to go ahead with authoring a patch for this or would you prefer me to do it? (I would appreciate you reviewing it either way and you would still get credit in the news as I took sections from your wrapper) If everything goes well, we can hopefully get this into Python 3.10 (as this is a new feature, it won't be back-ported to 3.9 and before). ---------- nosy: +epaine versions: +Python 3.10 -Python 3.7 Added file: https://bugs.python.org/file49459/fontchooser.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 16:33:44 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Tue, 15 Sep 2020 20:33:44 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600202024.77.0.159054870568.issue41780@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +21318 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:13:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 15 Sep 2020 21:13:42 +0000 Subject: [issue37296] pdb next vs __next__ In-Reply-To: <1560626859.25.0.0533027405715.issue37296@roundup.psfhosted.org> Message-ID: <1600204422.73.0.331426356586.issue37296@roundup.psfhosted.org> Irit Katriel added the comment: I think this ticket can be closed. Rick can always reopen it or create a new one if there is still an open problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:17:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 15 Sep 2020 21:17:18 +0000 Subject: [issue23832] pdb's `longlist` shows only decorator if that one contains a lambda In-Reply-To: <1427834112.73.0.627625379595.issue23832@psf.upfronthosting.co.za> Message-ID: <1600204638.15.0.705083713711.issue23832@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:32:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Sep 2020 21:32:12 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1600205532.18.0.572849995442.issue41631@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue. I tested manually: the fix works as expected. I reproduced https://bugzilla.redhat.com/show_bug.cgi?id=1871992#c1 bug (I had to comment the workaround of the mercurial package in Fedora) on 3.9: make[1]: Entering directory '/home/vstinner/mercurial/mercurial-5.4/doc' /home/vstinner/python/3.9/python gendoc.py "hgrc.5" > hgrc.5.txt.tmp python: Python/Python-ast.c:231: get_ast_state: Assertion `state != NULL' failed. I confirm that the fix in 3.9 works as expected: > New changeset 55e0836849c14fb474e1ba7f37851e07660eea3c by Pablo Galindo in branch '3.9' => No crash with this fix. I also reproduced the bug in the master branch (without the fix), and I also confirm that the fix in master does fix the crash. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:46:54 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 21:46:54 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600206414.85.0.927054376804.issue39587@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:47:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Sep 2020 21:47:57 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1600206477.65.0.46997151644.issue41631@roundup.psfhosted.org> STINNER Victor added the comment: I also tested bpo-41261 reproducer and https://bugs.python.org/issue41194#msg372863 reproducer on 3.9 and master branches: Python doesn't crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:57:05 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 21:57:05 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600207025.87.0.295097778008.issue39587@roundup.psfhosted.org> Change by Ethan Furman : ---------- versions: +Python 3.10, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:58:40 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 21:58:40 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600207120.51.0.642453126363.issue41780@roundup.psfhosted.org> miss-islington added the comment: New changeset 2e87774df1a0eaf2a1fe8cc4d958df60f7125b6e by Batuhan Taskaya in branch 'master': bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262) https://github.com/python/cpython/commit/2e87774df1a0eaf2a1fe8cc4d958df60f7125b6e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 17:58:50 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 21:58:50 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600207130.03.0.177108508585.issue41780@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21320 pull_request: https://github.com/python/cpython/pull/22264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 18:09:17 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 15 Sep 2020 22:09:17 +0000 Subject: [issue13340] list.index does not accept None as start or stop In-Reply-To: <1320398584.03.0.145013152611.issue13340@psf.upfronthosting.co.za> Message-ID: <1600207757.63.0.890620846183.issue13340@roundup.psfhosted.org> Irit Katriel added the comment: The error message was fixed under issue29935, so I think this issue can now be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 18:15:37 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 22:15:37 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600208137.29.0.229586369122.issue39587@roundup.psfhosted.org> Ethan Furman added the comment: Yes, the change only considered types with their own copy of `__new__` to be actual data types, so in 3.6 `HexInt` was the recognized data type, but in 3.7+ it was `int` -- which also meant that HexEnum was considered a simple mix-in and its `__repr__` was used instead of `Enum.__repr__`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 18:34:52 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Sep 2020 22:34:52 +0000 Subject: [issue34394] Descriptors HowTo doesn't mention __set_name__ In-Reply-To: <1534163786.32.0.56676864532.issue34394@psf.upfronthosting.co.za> Message-ID: <1600209292.61.0.400656504108.issue34394@roundup.psfhosted.org> Raymond Hettinger added the comment: I have a draft PR but haven't checked it in yet. Will do so shortly :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 18:45:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 15 Sep 2020 22:45:41 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) In-Reply-To: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> Message-ID: <1600209941.1.0.656759416496.issue41739@roundup.psfhosted.org> STINNER Victor added the comment: s390x Debian 3.x: https://buildbot.python.org/all/#/builders/49/builds/75 Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Warning -- Dangling thread: <_MainThread(MainThread, started 4396138073968)> Warning -- Dangling thread: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 18:56:45 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 22:56:45 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600210605.39.0.203572389517.issue39587@roundup.psfhosted.org> Ethan Furman added the comment: New changeset bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1 by Ethan Furman in branch 'master': bpo-39587: Enum - use correct mixed-in data type (GH-22263) https://github.com/python/cpython/commit/bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 18:58:37 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 22:58:37 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600210717.57.0.619695624726.issue39587@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21321 pull_request: https://github.com/python/cpython/pull/22265 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 18:58:45 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 22:58:45 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600210725.12.0.563602587911.issue39587@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21322 pull_request: https://github.com/python/cpython/pull/22266 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 19:24:08 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 23:24:08 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600212248.8.0.10486655989.issue39587@roundup.psfhosted.org> miss-islington added the comment: New changeset 8f8ebcca95d3b6ed0a522a9736ab53d6d4f0208c by Miss Islington (bot) in branch '3.8': bpo-39587: Enum - use correct mixed-in data type (GH-22263) https://github.com/python/cpython/commit/8f8ebcca95d3b6ed0a522a9736ab53d6d4f0208c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 19:28:34 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 23:28:34 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced In-Reply-To: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> Message-ID: <1600212514.07.0.839410851053.issue41789@roundup.psfhosted.org> miss-islington added the comment: New changeset 22415ad62555d79bd583b4a7d6a96006624a8277 by Ethan Furman in branch 'master': bpo-41789: honor object overrides in Enum classes (GH-22250) https://github.com/python/cpython/commit/22415ad62555d79bd583b4a7d6a96006624a8277 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 19:37:21 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 23:37:21 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600213041.65.0.749495442677.issue41780@roundup.psfhosted.org> miss-islington added the comment: New changeset 49917d576a578c8c29b8dbcbd5257c366a53d498 by Miss Islington (bot) in branch '3.9': bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262) https://github.com/python/cpython/commit/49917d576a578c8c29b8dbcbd5257c366a53d498 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 19:38:50 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 15 Sep 2020 23:38:50 +0000 Subject: [issue41780] Generic Alias attributes nor in dir() In-Reply-To: <1600067166.95.0.710796917701.issue41780@roundup.psfhosted.org> Message-ID: <1600213130.72.0.696171060439.issue41780@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 19:56:09 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 15 Sep 2020 23:56:09 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced In-Reply-To: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> Message-ID: <1600214169.83.0.0397752615699.issue41789@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21323 pull_request: https://github.com/python/cpython/pull/22267 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 19:59:57 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 15 Sep 2020 23:59:57 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600214397.85.0.00507365951538.issue39587@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 95b81e2f8c955823dbf5632a817902b8a4916eaa by Miss Islington (bot) in branch '3.9': bpo-39587: Enum - use correct mixed-in data type (GH-22263) (GH-22266) https://github.com/python/cpython/commit/95b81e2f8c955823dbf5632a817902b8a4916eaa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:01:58 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 00:01:58 +0000 Subject: [issue39587] Mixin repr overrides Enum repr in some cases In-Reply-To: <1581195691.69.0.82674637062.issue39587@roundup.psfhosted.org> Message-ID: <1600214518.02.0.0353737777322.issue39587@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:01:36 2020 From: report at bugs.python.org (Cameron Simpson) Date: Wed, 16 Sep 2020 00:01:36 +0000 Subject: [issue41787] adding PEP references to documentation In-Reply-To: <1600123741.16.0.294796218957.issue41787@roundup.psfhosted.org> Message-ID: <1600214496.49.0.229358268902.issue41787@roundup.psfhosted.org> Cameron Simpson added the comment: Re the possible change to "New in version V." text, my proposal there is the make this become: New in :ref:`version V `. by modifying the definitions in sphinxdomains/changset.py from: versionlabels = { 'versionadded': _('New in version %s'), 'versionchanged': _('Changed in version %s'), 'deprecated': _('Deprecated since version %s'), } to: versionlabels = { 'versionadded': _('New in :ref:`version %s `'), 'versionchanged': _('Changed in :ref:`version %s `'), } and adding a: :: _whatsnew-3.7: to Doc/whatsnew/3.7.rst and likewise for the other whatsnew files. That requires a change to both the docs and sphinx, and is independent of the PEP reference additions. I'll make a distinct PR for this, unrelated to the other PRs. In an ideal world we could be more precise by using one of the _whatsnew37-feature anchors where they are present, but I don't see how to integrate that into the versionadded directives (absent something quite intrusive). The above change makes a docs-wide sweep immediately without additional work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:02:32 2020 From: report at bugs.python.org (Cameron Simpson) Date: Wed, 16 Sep 2020 00:02:32 +0000 Subject: [issue41787] adding PEP references to documentation In-Reply-To: <1600123741.16.0.294796218957.issue41787@roundup.psfhosted.org> Message-ID: <1600214552.85.0.269398753166.issue41787@roundup.psfhosted.org> Cameron Simpson added the comment: Argh. I bet that additional %s above won't work :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:09:31 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 16 Sep 2020 00:09:31 +0000 Subject: [issue41749] Allow omission of imghdr.what file arg if bytes are given In-Reply-To: <1599623785.24.0.70056245504.issue41749@roundup.psfhosted.org> Message-ID: <1600214971.44.0.870788029628.issue41749@roundup.psfhosted.org> Emmanuel Arias added the comment: > The opening message confused me by using 'need' as 'currently required to call' rather than 'required to compute (test) and necessarily needed to call'; but after reading the code, I believe I understand and modified title to match. Sorry for my bad English, yes my idea was more likely your point of view. In the future I'll try to be more clear. > However, what is very problemmatic is requiring 1 of 2 different arguments. For range, the first parameter is really 'start_or_stop', an int either way, with the interpretation depending on the presence of a second. This is a nuisance for understanding, but a convenience in usage. But I think requiring an argument (usually) passed positionally or an argument that now has to be passed by keyword, with an arbitrary letter name, is worse and less justified. So my current view is that this change should be rejected. My intention is try to avoid a call like `what(None, b'...')`. IMO call a function that start with None seems a little weird (from my point of view). Sincerely, I don't know if for the people it's ok use `what(None, b'...')` or not, probably not because haven't changed since 1997. Reading your opinion it's more clear for me that this patch should be rejected. So, I'll close this issue and the PR. Thanks for the feedback, very appreciate. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:15:23 2020 From: report at bugs.python.org (Ketan Sharma) Date: Wed, 16 Sep 2020 00:15:23 +0000 Subject: [issue36223] Execution sequence for print function In-Reply-To: <1551954265.43.0.245266247678.issue36223@roundup.psfhosted.org> Message-ID: <1600215323.66.0.169973483842.issue36223@roundup.psfhosted.org> Change by Ketan Sharma : ---------- nosy: -iitkgp.ketan at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:16:46 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 16 Sep 2020 00:16:46 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced In-Reply-To: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> Message-ID: <1600215406.24.0.742089449841.issue41789@roundup.psfhosted.org> miss-islington added the comment: New changeset 929112ef81ccef20d3aef25c8a1142059ee941da by Miss Islington (bot) in branch '3.8': bpo-41789: honor object overrides in Enum classes (GH-22250) https://github.com/python/cpython/commit/929112ef81ccef20d3aef25c8a1142059ee941da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:37:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 16 Sep 2020 00:37:50 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1600216670.95.0.377614572064.issue41758@roundup.psfhosted.org> Terry J. Reedy added the comment: Another oddity of this crash is that Python usually checks stack usage and raise RecursionError when the limit is reached. Event handling apparently can bypass this. I opened python-list thread "Need tests of turtledemo.colordemo on Windows installations". Colormixer works fine for Frank Milman and MRAB. Dennis Lee Bieber asked whether there was a mix of 32- and 64-bit stuff. Until someone else has the same problem, I am tempted to close this as local-system-specific. ('Works for me') I certainly have no more to say on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 20:47:34 2020 From: report at bugs.python.org (Cameron Simpson) Date: Wed, 16 Sep 2020 00:47:34 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600217254.04.0.421757748951.issue41762@roundup.psfhosted.org> Change by Cameron Simpson : ---------- nosy: +cameron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 21:17:43 2020 From: report at bugs.python.org (Mark Roseman) Date: Wed, 16 Sep 2020 01:17:43 +0000 Subject: [issue28694] tkinter interface to fontchooser In-Reply-To: <1479174800.7.0.200377827869.issue28694@psf.upfronthosting.co.za> Message-ID: <1600219063.82.0.876492040581.issue28694@roundup.psfhosted.org> Mark Roseman added the comment: Elaine, I was just having a look at this the other day too! I agree, this is definitely worth some effort to get done. To be honest, I'm not a fan of the vwait solution to force the dialog to be modal. It doesn't actually make it modal (i.e. you can still do stuff in other windows). Moreover, the Mac version (which is native, so couldn't easily be made modal via Tkinter) has a very different design than on other platforms. It doesn't have "ok", "apply", "cancel" buttons or similar. It's designed to just hang around. When the font dialog was originally proposed for Tk (see http://tip.tcl.tk/324) they'd tried a modal API first and found it unworkable. In light of that, my preference for the official wrapper would be to mirror the underlying API, as per what Lance's version first tried, using a callback mechanism to return results. Most importantly, it would eliminate the assumption that there's always a way to make it modal. Documentation would be key. Mind you, there's no official docs for the other dialogs. I can guarantee it would be well-documented with an example on TkDocs anyway! If there aren't any strong objections, I'm able to have a go at modifying Lance's version over the next week or so. I've got Mac, Windows, and Linux environments to test everything out. Question... I assume the official wrapper needs checks to ensure fontchooser is available (i.e. 8.6 or greater). If not, should the wrapper just error out? Would providing an alternative implementation for Tk < 8.6 be something that would be done in an external module, or might that be something that could/should be included in the official library? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 22:06:25 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 16 Sep 2020 02:06:25 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600221985.73.0.823864251287.issue41784@roundup.psfhosted.org> Inada Naoki added the comment: PyUnicode_AsUTF8 is useful "API". But it can be implemented as C macro, C inline function, or functions/macros in any other languages using PyUnicode_AsUTF8AndSize. PyUnicode_AsUTF8AndSize is more important for "ABI". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 15 23:26:47 2020 From: report at bugs.python.org (Cameron Simpson) Date: Wed, 16 Sep 2020 03:26:47 +0000 Subject: [issue41787] adding PEP references to documentation In-Reply-To: <1600123741.16.0.294796218957.issue41787@roundup.psfhosted.org> Message-ID: <1600226807.32.0.101435373927.issue41787@roundup.psfhosted.org> Change by Cameron Simpson : ---------- keywords: +patch pull_requests: +21324 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 00:44:41 2020 From: report at bugs.python.org (hai shi) Date: Wed, 16 Sep 2020 04:44:41 +0000 Subject: [issue40288] [subinterpreters] atexit module should not be loaded more than once per interpreter In-Reply-To: <1586917009.7.0.806642420762.issue40288@roundup.psfhosted.org> Message-ID: <1600231481.41.0.887603259709.issue40288@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 00:58:39 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 04:58:39 +0000 Subject: [issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict In-Reply-To: <1600157237.06.0.946064898038.issue41792@roundup.psfhosted.org> Message-ID: <1600232319.76.0.0492802859725.issue41792@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 0705ec8a149e27023b0420ae0366d16255f6c9f7 by Patrick Reader in branch 'master': bpo-41792: Add is_typeddict function to typing.py (GH-22254) https://github.com/python/cpython/commit/0705ec8a149e27023b0420ae0366d16255f6c9f7 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 00:59:14 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 04:59:14 +0000 Subject: [issue41792] No (public) way to dynamically introspect if an annotation is a TypedDict In-Reply-To: <1600157237.06.0.946064898038.issue41792@roundup.psfhosted.org> Message-ID: <1600232354.52.0.870430928498.issue41792@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 01:28:08 2020 From: report at bugs.python.org (Bale) Date: Wed, 16 Sep 2020 05:28:08 +0000 Subject: [issue41794] Memory leak in asyncio server Message-ID: <1600234088.51.0.0738259012408.issue41794@roundup.psfhosted.org> Change by Bale : ---------- components: asyncio nosy: EmperorBale, asvetlov, valid22, yselivanov priority: normal severity: normal status: open title: Memory leak in asyncio server type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 01:41:28 2020 From: report at bugs.python.org (Bale) Date: Wed, 16 Sep 2020 05:41:28 +0000 Subject: [issue41794] Memory leak in asyncio server Message-ID: <1600234888.13.0.392251732884.issue41794@roundup.psfhosted.org> New submission from Bale : In the file I attached below is a pretty simple asyncio server, it is identical to the echo server on the documentation except it does not disconnect after echoing. When a connection is received, it creates an object called "test object" and the only reference to that object is on the local scope. If all is working properly, when the handler function returns the test object should also be deleted, but I noticed the __del__ method is not being called, indicating python is not deleting it. It seems like a reference to the frame of the handler is being kept in a list (not sure where) and it is not being removed from it. Here is example code of how to trigger the bug: s = socket.socket();s.connect(("127.0.0.1", 8888));s.send(b"test\0") s.close() By sending data and closing afterwards WITHOUT using s.recv() causes the issue, what's interesting is that if we call s.close() immediately after sending, the object is deleted by the server and everything works as intended. Calling s.close() a few seconds after, causes the bug to happen. It should also be noted that if I call s.recv() before s.close(), the bug does not happen. What's more interesting is that when I run the above code in my python3.5 interpreter the bug does not get triggered, no matter what I do. The bug does also not happen when I run it in a python3.8 interpreter on my windows computer. When I run on the code on ubuntu on a python3.8 interpreter, the bug is triggered. ---------- Added file: https://bugs.python.org/file49460/test_server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 01:46:46 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 16 Sep 2020 05:46:46 +0000 Subject: [issue31870] add timeout parameter for get_server_certificate in ssl.py In-Reply-To: <1508991085.56.0.213398074469.issue31870@psf.upfronthosting.co.za> Message-ID: <1600235206.86.0.0959023847896.issue31870@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 5.0 -> 6.0 pull_requests: +21325 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 01:47:05 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 05:47:05 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600235225.06.0.945225493906.issue41517@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21326 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 01:53:37 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 05:53:37 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced In-Reply-To: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> Message-ID: <1600235617.96.0.777527928926.issue41789@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21327 pull_request: https://github.com/python/cpython/pull/22272 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 01:55:57 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 05:55:57 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600235757.94.0.901912095178.issue41517@roundup.psfhosted.org> Change by Ethan Furman : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 01:55:24 2020 From: report at bugs.python.org (Bale) Date: Wed, 16 Sep 2020 05:55:24 +0000 Subject: [issue41794] Memory leak in asyncio server In-Reply-To: <1600234888.13.0.392251732884.issue41794@roundup.psfhosted.org> Message-ID: <1600235724.16.0.62133056294.issue41794@roundup.psfhosted.org> Bale added the comment: Also, if this is intended behavior and there is something that I am missing, you should really make it more clear in the documentation. In every project I found on github that uses asyncio.start_server, the bug exists ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 03:15:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Sep 2020 07:15:26 +0000 Subject: [issue13340] list.index does not accept None as start or stop In-Reply-To: <1320398584.03.0.145013152611.issue13340@psf.upfronthosting.co.za> Message-ID: <1600240526.01.0.946557254077.issue13340@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for the reminder Irit. Your comments for issues and PRs are really helpful. Thank you for all this! ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 03:37:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Sep 2020 07:37:21 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600241841.9.0.966567337491.issue41784@roundup.psfhosted.org> Serhiy Storchaka added the comment: I agree about PyUnicode_AsUTF8. But I think it would be worth to ask PyPy team about PyUnicode_AsUTF8AndSize. An alternate C API is PyUnicode_GetUTF8Buffer (issue39087). It requires explicit releasing the buffer after use, so it can be used even on implementations with moving garbage collector. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 04:46:53 2020 From: report at bugs.python.org (Richard Neumann) Date: Wed, 16 Sep 2020 08:46:53 +0000 Subject: [issue41795] Allow assignment in yield statement Message-ID: <1600246013.94.0.808986319549.issue41795@roundup.psfhosted.org> New submission from Richard Neumann : I often write factory (deserialization) methods for ORM models for web application backends that produce a number of records (ORM model instances) of itself and related database tables: @classmethod def from_json(cls, json): """Yields records from a JSON-ish dict.""" modules = json.pop('modules', None) or () order = super().from_json(json) yield order for module in modules: yield OrderedModule(order=order, module=Module(module)) This yields the main record "order" and related records from OrderedModules, which have a foreign key to Order. Thusly I can save all records by: for record in Order.from_json(json): record.save() Since I have several of those deserialization functions for multiple tables in multiple databases, it'd be nice to reduce the amount of code with some extra syntactic sugar, like: @classmethod def from_json(cls, json): """Yields records from a JSON-ish dict.""" modules = json.pop('modules', None) or () yield order = super().from_json(json) # Assignment via "=" for module in modules: yield OrderedModule(order=order, module=Module(module)) or: @classmethod def from_json(cls, json): """Yields records from a JSON-ish dict.""" modules = json.pop('modules', None) or () yield order := super().from_json(json) # Assignment via ":=" for module in modules: yield OrderedModule(order=order, module=Module(module)) I therefor propose to allow assignment of names in generator-like yield statements as described above. ---------- messages: 376979 nosy: conqp priority: normal severity: normal status: open title: Allow assignment in yield statement type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 05:03:29 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 16 Sep 2020 09:03:29 +0000 Subject: [issue41795] Allow assignment in yield statement In-Reply-To: <1600246013.94.0.808986319549.issue41795@roundup.psfhosted.org> Message-ID: <1600247009.09.0.467352155066.issue41795@roundup.psfhosted.org> Ronald Oussoren added the comment: You can already do this with the walrus operator: # --- def test(): for i in range(10): yield (square := i * i) yield square + 1 # --- This adds some parenthesis to your second alternative. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 05:09:49 2020 From: report at bugs.python.org (Richard Neumann) Date: Wed, 16 Sep 2020 09:09:49 +0000 Subject: [issue41795] Allow assignment in yield statement In-Reply-To: <1600246013.94.0.808986319549.issue41795@roundup.psfhosted.org> Message-ID: <1600247389.89.0.387889322489.issue41795@roundup.psfhosted.org> Richard Neumann added the comment: Awesome, I didn't know that. I tried it without the parens and it gave me a SyntaxError. This can be closed then as it's obviously already implemented. Let's get to refactoring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 05:27:04 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 16 Sep 2020 09:27:04 +0000 Subject: [issue41795] Allow assignment in yield statement In-Reply-To: <1600246013.94.0.808986319549.issue41795@roundup.psfhosted.org> Message-ID: <1600248424.1.0.718582779791.issue41795@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 05:28:45 2020 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 16 Sep 2020 09:28:45 +0000 Subject: [issue37296] pdb next vs __next__ In-Reply-To: <1560626859.25.0.0533027405715.issue37296@roundup.psfhosted.org> Message-ID: <1600248525.44.0.559081466532.issue37296@roundup.psfhosted.org> Ronald Oussoren added the comment: I agree. Without further information it is impossible to move forward. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 06:06:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 10:06:57 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1600250817.52.0.886193774612.issue40077@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Convert static types to PyType_FromSpec() -> Convert static types to heap types: use PyType_FromSpec() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 06:10:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 10:10:24 +0000 Subject: [issue41796] _ast module state should be made per interpreter Message-ID: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> New submission from STINNER Victor : In September 2019, the _ast extension module was converted to PEP 384 (stable ABI): bpo-38113. In bpo-41631, I moved the _ast module state back to a global state, rather than a regular module state, to fix multiple bugs. The state should be made per intepreter (moved into PyInterpreterState). Also, each interpreter should have its own _ast types (_ast.AST, _ast.Constant, etc.), rather than sharing all types. Hopefully, in 3.9, _ast types have been converted to heap types. To fix bpo-41631, I wanted to convert _ast.AST heap type back into a static type, to prevenet a subinterpreter to modify it, but Petr Viktorin asked me to leave it as it is: https://github.com/python/cpython/pull/21961#issuecomment-685821519 I agree since I would like to convert all static types to heap types: bpo-40077. ---------- components: Interpreter Core messages: 376983 nosy: vstinner priority: normal severity: normal status: open title: _ast module state should be made per interpreter versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 06:33:05 2020 From: report at bugs.python.org (Thomas Grainger) Date: Wed, 16 Sep 2020 10:33:05 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600252385.45.0.824039200806.issue41602@roundup.psfhosted.org> Thomas Grainger added the comment: adding `__main__` owners to nosy ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 06:40:21 2020 From: report at bugs.python.org (Jonas Norling) Date: Wed, 16 Sep 2020 10:40:21 +0000 Subject: [issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order In-Reply-To: <1381913252.24.0.629122693277.issue19270@psf.upfronthosting.co.za> Message-ID: <1600252821.46.0.182625939595.issue19270@roundup.psfhosted.org> Jonas Norling added the comment: @bar.harel: I didn't find a PR, so I'd like to encourage you to submit one :-) I stumbled onto this bug when the scheduler would cancel the wrong event for me (Python 3.7, 3.8). Raymond's suggestion 1 sounds reasonable; it would be very unlikely to break code that doesn't depend on internals in sched, and it simplifies the implementation a bit. ---------- nosy: +wocket _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 06:58:53 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 10:58:53 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced In-Reply-To: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> Message-ID: <1600253933.04.0.962302243361.issue41789@roundup.psfhosted.org> Ethan Furman added the comment: New changeset a4677068dd61662f5a56b184d5e3aa07db65b88e by Ethan Furman in branch '3.9': [3.9] bpo-41789: honor object overrides in Enum classes (GH-22250) (GH-22272) https://github.com/python/cpython/commit/a4677068dd61662f5a56b184d5e3aa07db65b88e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 06:59:44 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 10:59:44 +0000 Subject: [issue41789] Enum: __str__ and friends sometimes erroneously replaced In-Reply-To: <1600135965.76.0.76515083772.issue41789@roundup.psfhosted.org> Message-ID: <1600253984.81.0.334040165369.issue41789@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 07:09:46 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 16 Sep 2020 11:09:46 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1600254586.95.0.943904274509.issue41687@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- nosy: +lukasz.langa nosy_count: 4.0 -> 5.0 pull_requests: +21328 pull_request: https://github.com/python/cpython/pull/22273 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 07:28:41 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 11:28:41 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600255721.3.0.319133365715.issue39728@roundup.psfhosted.org> Change by Ethan Furman : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 07:35:54 2020 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 16 Sep 2020 11:35:54 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600256154.35.0.863462788863.issue41784@roundup.psfhosted.org> Alex Gaynor added the comment: Py_buffer is not part of the limited API at all, so I don't think it's usable for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 07:52:52 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 16 Sep 2020 11:52:52 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1600257172.93.0.811750115251.issue41687@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 7e356f17e4c91392b6fa45a512efc95923388813 by ?ukasz Langa in branch '3.9': [3.9] bpo-41687: Fix sendfile implementation to work with Solaris (GH-22040) (GH-22273) https://github.com/python/cpython/commit/7e356f17e4c91392b6fa45a512efc95923388813 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 07:53:00 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 16 Sep 2020 11:53:00 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1600257180.18.0.374046023046.issue41687@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21329 pull_request: https://github.com/python/cpython/pull/22274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 07:53:38 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 Sep 2020 11:53:38 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1600257218.97.0.903784240168.issue41796@roundup.psfhosted.org> Petr Viktorin added the comment: I started this here: https://github.com/python/cpython/commit/60960cba606573450e76934c954787419524147d Feel free to take that code. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 08:25:16 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 16 Sep 2020 12:25:16 +0000 Subject: [issue41687] sendfile implementation is not compatible with Solaris In-Reply-To: <1598968522.06.0.521626204763.issue41687@roundup.psfhosted.org> Message-ID: <1600259116.76.0.95931666906.issue41687@roundup.psfhosted.org> miss-islington added the comment: New changeset 6a39888c2c4bcfbcdc61a1953911ad30c62da1ef by Miss Islington (bot) in branch '3.9': bpo-41687: Fix error handling in Solaris sendfile implementation (GH-22128) https://github.com/python/cpython/commit/6a39888c2c4bcfbcdc61a1953911ad30c62da1ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 09:23:38 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 Sep 2020 13:23:38 +0000 Subject: [issue41797] PyModule_GetState doesn't work with LazyLoader Message-ID: <1600262618.31.0.325694341017.issue41797@roundup.psfhosted.org> New submission from Petr Viktorin : One underlying issue from bpo-41631 is that importlib.util.LazyLoader produces modules that are only fully loaded after an attribute is accessed (through __getattribute__). C-API functions like PyModule_GetState, PyModule_GetDict and such do not get attributes, and when called on a _LazyModule, they might try to access uninitialized C-level state. I see two possible ways to fix this: - Make PyModule_GetState, etc. trigger a full load. Since this is C-API, it would need a fast (no Python code) way either to do the full load or to detect _LazyModule. - Make LazyLoader eager for either all extension & builtin modules, or for modules that have C-level storage. The latter would need a way to pass info from PyModuleDef to the loader. Brett, does that analysis make sense from the importlib POV? ---------- components: C API messages: 376991 nosy: brett.cannon, petr.viktorin priority: normal severity: normal status: open title: PyModule_GetState doesn't work with LazyLoader _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:02:58 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 14:02:58 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600264978.49.0.247195103626.issue39728@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21330 pull_request: https://github.com/python/cpython/pull/22277 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:07:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 14:07:49 +0000 Subject: [issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API Message-ID: <1600265269.2.0.881235166904.issue41798@roundup.psfhosted.org> New submission from STINNER Victor : More and more extension modules are converted to the multi-phase initialization API (PEP 489) in bpo-1635741. The problem is that the usage of the PyCapsule C API is not adapted in these extensions, to isolate well capsule objects from other module instances. For example, the pyexpat extension uses "static struct PyExpat_CAPI capi;". It was fine when it was not possible to create more than one instance of the extension module. But with PR 22222 (currently under review), it becomes possible to have multiple extension module instances. Each module instance creates its own capsule object, but all capsule object points to the same unique "struct PyExpat_CAPI" instance. For the specific case of the pyexpat in its current implementation, reusing the same "struct PyExpat_CAPI" instance is ok-ish, since the value is the same for all module instances. But this design sounds fragile. It would be safer to allocate a "struct PyExpat_CAPI" on the heap memory in each module instance, and use a PyCapsule destructor function (3rd parameter of PyCapsule_New()). The _ctypes does that: --- void *space = PyMem_Calloc(2, sizeof(int)); if (space == NULL) return NULL; errobj = PyCapsule_New(space, CTYPES_CAPSULE_NAME_PYMEM, pymem_destructor); --- with: --- static void pymem_destructor(PyObject *ptr) { void *p = PyCapsule_GetPointer(ptr, CTYPES_CAPSULE_NAME_PYMEM); if (p) { PyMem_Free(p); } } --- The PyCapsule API is used by multiple extension modules: * _ctypes: allocate memory on the heap and uses a destructor to release it * _curses: static variable, PyInit__curses() sets PyCurses_API[0] to &PyCursesWindow_Type (static type) * _datetime: static variable, PyInit__datetime() creates a timezone object and stores it into CAPI.TimeZone_UTC * _decimal: static variable * _socket: static variable, PyInit__socket() sets PySocketModuleAPI.error to PyExc_OSError, and sets PySocketModuleAPI.timeout_error to _socket.timeout (a new exception object) * pyexpat: static varaible * unicodedata: static variable * posix: nt._add_dll_directory() creates a PyCapsule using AddDllDirectory() result as a the pointer value The _datetime module overrides the -- See also the PEP 630 "Isolating Extension Modules". ---------- components: C API messages: 376992 nosy: vstinner priority: normal severity: normal status: open title: [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:08:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 14:08:25 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1600265305.75.0.16527684376.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: > I rejected the PR 19122 which tries to port the _datetime module to the multi-phase initialization API (PEP 489). We need first to enhance the PyCapsule C API to pass the module instance to C functions, somehow. I created bpo-41798: [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:09:20 2020 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 16 Sep 2020 14:09:20 +0000 Subject: [issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API In-Reply-To: <1600265269.2.0.881235166904.issue41798@roundup.psfhosted.org> Message-ID: <1600265360.06.0.277499992904.issue41798@roundup.psfhosted.org> Change by Petr Viktorin : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:12:04 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 14:12:04 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600265524.42.0.905234430359.issue41517@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 3064dbf5df1021e85b507366a7ea448c8895efe7 by Ethan Furman in branch 'master': bpo-41517: do not allow Enums to be extended (#22271) https://github.com/python/cpython/commit/3064dbf5df1021e85b507366a7ea448c8895efe7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:12:14 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 16 Sep 2020 14:12:14 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600265534.03.0.482097368785.issue41517@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +21331 pull_request: https://github.com/python/cpython/pull/22278 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:12:25 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 16 Sep 2020 14:12:25 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600265545.16.0.834549615414.issue41517@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21332 pull_request: https://github.com/python/cpython/pull/22279 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:19:48 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 14:19:48 +0000 Subject: [issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API In-Reply-To: <1600265269.2.0.881235166904.issue41798@roundup.psfhosted.org> Message-ID: <1600265988.13.0.98583398954.issue41798@roundup.psfhosted.org> STINNER Victor added the comment: > unicodedata: static variable Right now, it's ok-ish. Mohamed Koubaa is working on PR 22145 to pass a module state into internal functions, and so the PyCapsule pointer must be different in each module instance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:26:30 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 14:26:30 +0000 Subject: [issue41796] _ast module state should be made per interpreter In-Reply-To: <1600251024.87.0.709557549839.issue41796@roundup.psfhosted.org> Message-ID: <1600266390.03.0.745367125327.issue41796@roundup.psfhosted.org> STINNER Victor added the comment: > I started this here: https://github.com/python/cpython/commit/60960cba606573450e76934c954787419524147d Feel free to take that code. Oh thanks! I was looking for your work, but I failed to find it. It is really helpful! I started to hack asdl_c.py locally, but Pablo asked me in private to wait a few days, since he is going to push large changes on this file soon. This issue is an enhancement which can wait. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:31:11 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 16 Sep 2020 14:31:11 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600266671.15.0.197451537097.issue41517@roundup.psfhosted.org> miss-islington added the comment: New changeset 3f4012117bf80aa7c005f8fa6fb8e1f8b1aef5d5 by Miss Islington (bot) in branch '3.8': bpo-41517: do not allow Enums to be extended (GH-22271) https://github.com/python/cpython/commit/3f4012117bf80aa7c005f8fa6fb8e1f8b1aef5d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:35:22 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 16 Sep 2020 14:35:22 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600266922.59.0.663144266698.issue41517@roundup.psfhosted.org> miss-islington added the comment: New changeset 48f99250ff319e36b15b555128cd62e408d8165f by Miss Islington (bot) in branch '3.9': bpo-41517: do not allow Enums to be extended (GH-22271) https://github.com/python/cpython/commit/48f99250ff319e36b15b555128cd62e408d8165f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:43:14 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 14:43:14 +0000 Subject: [issue41517] Able to subclass enum with members by using multiple inheritance In-Reply-To: <1597081678.02.0.276964498945.issue41517@roundup.psfhosted.org> Message-ID: <1600267394.47.0.574205362084.issue41517@roundup.psfhosted.org> Change by Ethan Furman : ---------- assignee: -> ethan.furman resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:43:30 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 16 Sep 2020 14:43:30 +0000 Subject: [issue23832] pdb's `longlist` shows only decorator if that one contains a lambda In-Reply-To: <1427834112.73.0.627625379595.issue23832@psf.upfronthosting.co.za> Message-ID: <1600267410.74.0.81068486708.issue23832@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 10:43:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 14:43:41 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600267421.3.0.840243035514.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: ".. productionlist::" markup is related to "Grammar production displays": https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#grammar-production-displays We can try to pass a different unique name to each ".. productionlist::" markup: "The productionGroup argument to productionlist serves to distinguish different sets of production lists that belong to different grammars. Multiple production lists with the same productionGroup thus define rules in the same scope." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 11:03:09 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Sep 2020 15:03:09 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600268589.44.0.142868154754.issue41762@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21333 pull_request: https://github.com/python/cpython/pull/22281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 11:02:53 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 15:02:53 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600268573.03.0.869707980251.issue41602@roundup.psfhosted.org> Guido van Rossum added the comment: Thomas, can you explain the problem in English? Those elaborate test programs don?t do it for me, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 12:09:28 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 16 Sep 2020 16:09:28 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600272568.66.0.976071869617.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: Mark, Stefan, I don't want this to be stale so I propose to move with my suggestions: 1. We make the new API public. Mark, if you have objections to that - please elaborate with some details. IMO, the corresponding Python API is long public and there's no harm in exposing a C version of it. Especially given the fact that uvloop, cython, and even asyncio itself will be relying on that API. 2. I propose to name the new API `PyIter_Send`. Motivation: it will work with both generators and coroutines and plays nicely with `PyIter_Next`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 13:01:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Sep 2020 17:01:40 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600275700.29.0.489772479907.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: As for returned value, I propose to return -1 in case of error, 1 for yielded value and 0 for returned value (i.e. define PYGEN_RETURN = 0, PYGEN_YIELD = 1 and PYGEN_ERROR = -1, but without exposing public names). It would be uniform with other C API: many functions return -1 on error (if they return int and can fail), and PyDict_Next() and _PySet_NextEntry() return 1 for every yielded item, and 0 if the iteration has been finished. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 13:05:40 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 16 Sep 2020 17:05:40 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600275940.94.0.675346880589.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > As for returned value, I propose to return -1 in case of error, 1 for yielded value and 0 for returned value (i.e. define PYGEN_RETURN = 0, PYGEN_YIELD = 1 and PYGEN_ERROR = -1, but without exposing public names). Sure, that works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 13:26:57 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 17:26:57 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600277217.65.0.967597230628.issue39728@roundup.psfhosted.org> Ethan Furman added the comment: New changeset c95ad7a91fbd7636f33a098d3b39964ab083bf49 by Ethan Furman in branch 'master': bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) https://github.com/python/cpython/commit/c95ad7a91fbd7636f33a098d3b39964ab083bf49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 13:30:04 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 17:30:04 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600277404.44.0.730952865426.issue39728@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21334 pull_request: https://github.com/python/cpython/pull/22282 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 13:34:09 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 17:34:09 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600277649.87.0.637904389777.issue39728@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21335 pull_request: https://github.com/python/cpython/pull/22283 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:09:57 2020 From: report at bugs.python.org (Jay Patel) Date: Wed, 16 Sep 2020 18:09:57 +0000 Subject: [issue41799] splunklib.client does not handle Unicode characters Message-ID: <1600279797.15.0.70851751953.issue41799@roundup.psfhosted.org> New submission from Jay Patel : Using splunklib.client module to use Pythonic interface to the Splunk REST API. I am using the connect method of the module to connect and log in to a Splunk instance. Code: import splunklib.client as splunk_client kwargs_config_flags = { 'host': "test_instance??", 'port': 8089, 'username': , 'password': , 'owner': None, 'app': None} sc = splunk_client.connect(**kwargs_config_flags) For python 3 Output: ''latin-1' codec can't encode characters in position 0-1: ordinal not in range(256)' I tried to encode the host to utf-8, "test_instance??".encode("utf-8") Output: 'a bytes-like object is required, not 'str'' For python 2 It is working as expected. output: 'nodename nor servname provided, or not known' Is there a way by which this can be handled at the module level? ---------- components: Unicode messages: 377005 nosy: ezio.melotti, jpatel, vstinner priority: normal severity: normal status: open title: splunklib.client does not handle Unicode characters type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:15:38 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 16 Sep 2020 18:15:38 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600280138.98.0.311160540791.issue41756@roundup.psfhosted.org> Stefan Behnel added the comment: I'm happy to see this moving forward. Not convinved of the "PyIter_Send()" name, though. I don't consider this part of the iterator protocol. It's specific to generators and coroutines. Cython would probably guard its usage by "PyGen_CheckExact()" or "PyCoro_CheckExact()", and not use it for arbitrary iterators. Since coroutines inherit the generator protocol more or less, I think "PyGen_Send()" is a more suitable name, better than "PyCoro_Send()". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:20:03 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 18:20:03 +0000 Subject: [issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto() In-Reply-To: <1584703504.0.0.0724934497115.issue40025@roundup.psfhosted.org> Message-ID: <1600280403.33.0.368595292851.issue40025@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21336 pull_request: https://github.com/python/cpython/pull/22284 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:22:32 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Wed, 16 Sep 2020 18:22:32 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600280552.05.0.740079444249.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: Also should it be specific to generators/coroutines and accept PyGenObject* or should it try to handle multiple cases and expose the result for them in uniform way, i.e. ``` if (PyGen_CheckExact(gen) || PyCoro_CheckExact(gen)) { // use coroutine/generator specific code that avoids raising exceptions *result = ... return PYGEN_RETURN; } PyObject *ret; if (arg == Py_None) { ret = Py_TYPE(gen)->tp_iternext(gen); } else { ret = _PyObject_CallMethodIdOneArg(coro, &PyId_send, arg); } if (ret != NULL) { *result = ret; return PYGEN_YIELD; } if (_PyGen_FetchStopIterationValue(result) == 0) { return PYGEN_RETURN; } return PYGEN_ERROR; ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:27:41 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 16 Sep 2020 18:27:41 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600280861.59.0.291569523631.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > Since coroutines inherit the generator protocol more or less, I think "PyGen_Send()" is a more suitable name, better than "PyCoro_Send()". OK, +1. PyGen_Send it is. > Also should it be specific to generators/coroutines and accept PyGenObject* I think it should be specific to generators and coroutines. Calling `PyObject_CallMethodIdOneArg(coro, &PyId_send, arg);` and interpreting exceptions to emulate the low level API seems a bit too much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:33:31 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 16 Sep 2020 18:33:31 +0000 Subject: [issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto() In-Reply-To: <1584703504.0.0.0724934497115.issue40025@roundup.psfhosted.org> Message-ID: <1600281211.1.0.914437497104.issue40025@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21337 pull_request: https://github.com/python/cpython/pull/22285 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:33:29 2020 From: report at bugs.python.org (Brett Cannon) Date: Wed, 16 Sep 2020 18:33:29 +0000 Subject: [issue41797] PyModule_GetState doesn't work with LazyLoader In-Reply-To: <1600262618.31.0.325694341017.issue41797@roundup.psfhosted.org> Message-ID: <1600281209.89.0.135731220176.issue41797@roundup.psfhosted.org> Brett Cannon added the comment: Probably making LazyLoader skip being lazy for non-source modules probably makes the most sense and would be easiest to implement since it's an explicit opt-out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:42:07 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 16 Sep 2020 18:42:07 +0000 Subject: [issue41746] Add optional type information to asdl_seq objects In-Reply-To: <1599597077.35.0.913235954629.issue41746@roundup.psfhosted.org> Message-ID: <1600281727.87.0.721251557129.issue41746@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset a5634c406767ef694df49b624adf9cfa6c0d9064 by Pablo Galindo in branch 'master': bpo-41746: Add type information to asdl_seq objects (GH-22223) https://github.com/python/cpython/commit/a5634c406767ef694df49b624adf9cfa6c0d9064 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:44:35 2020 From: report at bugs.python.org (Sourabh) Date: Wed, 16 Sep 2020 18:44:35 +0000 Subject: [issue38981] better name for re.error Exception class. In-Reply-To: <1575564967.92.0.182367459899.issue38981@roundup.psfhosted.org> Message-ID: <1600281875.41.0.0878666818746.issue38981@roundup.psfhosted.org> Change by Sourabh : ---------- nosy: +sourabh025 type: enhancement -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 14:57:22 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 Sep 2020 18:57:22 +0000 Subject: [issue41799] splunklib.client does not handle Unicode characters In-Reply-To: <1600279797.15.0.70851751953.issue41799@roundup.psfhosted.org> Message-ID: <1600282642.71.0.510561143042.issue41799@roundup.psfhosted.org> Eric V. Smith added the comment: This looks like an issue with splunklib, which is not distributed with python. I'm not sure if it's the same splunklib, but you might try https://github.com/IntegralDefense/splunklib ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:08:56 2020 From: report at bugs.python.org (Thomas Grainger) Date: Wed, 16 Sep 2020 19:08:56 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600283336.31.0.962711371894.issue41602@roundup.psfhosted.org> Thomas Grainger added the comment: The return code of python on linux when the program is ended with a KeyboardInterrupt should be -2, this works in most cases - except when called via "python -m" Does this repl help? Python 3.8.2 (default, Jul 16 2020, 14:00:26) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pathlib, subprocess >>> pathlib.Path("spam.py").write_text("raise KeyboardInterrupt") 23 >>> subprocess.run(["python3", "spam.py"]) Traceback (most recent call last): File "spam.py", line 1, in raise KeyboardInterrupt KeyboardInterrupt CompletedProcess(args=['python3', 'spam.py'], returncode=-2) >>> subprocess.run(["python3", "-m", "spam"]) Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/graingert/projects/spam.py", line 1, in raise KeyboardInterrupt KeyboardInterrupt CompletedProcess(args=['python3', '-m', 'spam'], returncode=1) >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:34:32 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:34:32 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600284872.18.0.286833824419.issue41602@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, I got it. Now my next question. What do you mean by "I've eliminated runpy" and various other remarks along those lines? Have you actually identified the root cause of the problem? What's your suggested fix (without test framework). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:36:44 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 16 Sep 2020 19:36:44 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600285004.21.0.645516836652.issue41602@roundup.psfhosted.org> Eryk Sun added the comment: > The return code of python on linux when the program is ended with > a KeyboardInterrupt should be -2 In general, the exit status for an unhandled KeyboardInterrupt (i.e. _Py_UnhandledKeyboardInterrupt) should be the same as the default SIGINT handler. This is implemented by exit_sigint in Modules/main.c. In POSIX, it uses the actual default SIGINT handler via kill(). In Windows, it uses the exit status that the default console control handler would use, STATUS_CONTROL_C_EXIT (0xC000_013A). ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:36:54 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:36:54 +0000 Subject: [issue40697] add fissix as a lib2to3 alternative In-Reply-To: <1589970118.75.0.588225923307.issue40697@roundup.psfhosted.org> Message-ID: <1600285014.4.0.635752272273.issue40697@roundup.psfhosted.org> Guido van Rossum added the comment: Closing for lack of activity. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:37:50 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:37:50 +0000 Subject: [issue37604] warnings should use a ContextVar to manage filters/registry In-Reply-To: <1563283497.67.0.626244687635.issue37604@roundup.psfhosted.org> Message-ID: <1600285070.54.0.862844902632.issue37604@roundup.psfhosted.org> Guido van Rossum added the comment: Closing for lack of activity. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:39:12 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:39:12 +0000 Subject: [issue37350] print ResourceWarning object traceback when raised as error with -W error and -X tracemalloc In-Reply-To: <1561047387.04.0.201074176939.issue37350@roundup.psfhosted.org> Message-ID: <1600285152.76.0.274323521219.issue37350@roundup.psfhosted.org> Guido van Rossum added the comment: Closing for lack of activity. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:40:54 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:40:54 +0000 Subject: [issue36586] multiprocessing.Queue.close doesn't behave as documented In-Reply-To: <1554892951.92.0.81637767288.issue36586@roundup.psfhosted.org> Message-ID: <1600285254.28.0.247039394098.issue36586@roundup.psfhosted.org> Guido van Rossum added the comment: Closing for lack of activity. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:41:07 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:41:07 +0000 Subject: [issue36586] multiprocessing.Queue.close doesn't behave as documented In-Reply-To: <1554892951.92.0.81637767288.issue36586@roundup.psfhosted.org> Message-ID: <1600285267.12.0.489436216265.issue36586@roundup.psfhosted.org> Change by Guido van Rossum : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:41:14 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:41:14 +0000 Subject: [issue37350] print ResourceWarning object traceback when raised as error with -W error and -X tracemalloc In-Reply-To: <1561047387.04.0.201074176939.issue37350@roundup.psfhosted.org> Message-ID: <1600285274.7.0.913716086716.issue37350@roundup.psfhosted.org> Change by Guido van Rossum : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:41:24 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:41:24 +0000 Subject: [issue37604] warnings should use a ContextVar to manage filters/registry In-Reply-To: <1563283497.67.0.626244687635.issue37604@roundup.psfhosted.org> Message-ID: <1600285284.99.0.649512287268.issue37604@roundup.psfhosted.org> Change by Guido van Rossum : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:41:45 2020 From: report at bugs.python.org (Thomas Grainger) Date: Wed, 16 Sep 2020 19:41:45 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600285305.08.0.040547041457.issue41602@roundup.psfhosted.org> Thomas Grainger added the comment: > Okay, I got it. Now my next question. What do you mean by "I've eliminated runpy" and various other remarks along those lines? I can use `runpy._run_module_as_main` from another Python entry, eg -c and get the correct `-2` >>> subprocess.run(["python3", "-c", "__import__('runpy')._run_module_as_main('spam')"]) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/home/graingert/projects/osirium-main/spam.py", line 1, in raise KeyboardInterrupt KeyboardInterrupt CompletedProcess(args=['python3', '-c', "__import__('runpy')._run_module_as_main('spam')"], returncode=-2) > Have you actually identified the root cause of the problem? What's your suggested fix (without test framework). No I don't have a fix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 15:44:20 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 19:44:20 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600285460.17.0.174229354329.issue41602@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, so according to eryksun the fix requires C code. @graingert, are you interested in developing such a fix? Or @eryksun do you have an idea on how to fix it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 16:16:41 2020 From: report at bugs.python.org (Thomas Grainger) Date: Wed, 16 Sep 2020 20:16:41 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600287401.37.0.630300969213.issue41602@roundup.psfhosted.org> Thomas Grainger added the comment: I'm assuming _Py_UnhandledKeyboardInterrupt is getting incorrectly cleared somewhere in here https://github.com/python/cpython/blob/fc23a9483ef0d7c98bea9f82392377d0b6ef7b18/Modules/main.c#L291-L300 Py_DECREF(runpy); Py_DECREF(runmodule); Py_DECREF(module); Py_DECREF(runargs); if (result == NULL) { return pymain_exit_err_print(); } Py_DECREF(result); return 0; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 16:21:28 2020 From: report at bugs.python.org (E. Paine) Date: Wed, 16 Sep 2020 20:21:28 +0000 Subject: [issue37903] IDLE Shell sidebar. In-Reply-To: <1566370033.98.0.615651298891.issue37903@roundup.psfhosted.org> Message-ID: <1600287688.24.0.845392901147.issue37903@roundup.psfhosted.org> Change by E. Paine : ---------- assignee: -> terry.reedy components: +IDLE nosy: +epaine versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 16:40:27 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 20:40:27 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600288827.74.0.439638876433.issue41602@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks, I think this is the fix: diff --git a/Modules/main.c b/Modules/main.c index 4a76f4461b..3d1bbee3a0 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -288,6 +288,10 @@ pymain_run_module(const wchar_t *modname, int set_argv0) return pymain_exit_err_print(); } result = PyObject_Call(runmodule, runargs, NULL); + if (!result && PyErr_Occurred() == PyExc_KeyboardInterrupt) { + _Py_UnhandledKeyboardInterrupt = 1; + } + Py_DECREF(runpy); Py_DECREF(runmodule); Py_DECREF(module); Can you submit it as a PR? I don't have the time (but I can review once you've got tests working etc.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 16:40:49 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 20:40:49 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600288849.09.0.588828226384.issue41602@roundup.psfhosted.org> Change by Guido van Rossum : ---------- stage: patch review -> needs patch versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 16:44:00 2020 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 16 Sep 2020 20:44:00 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600289040.9.0.490740641054.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > I think it should be specific to generators and coroutines. Calling `PyObject_CallMethodIdOneArg(coro, &PyId_send, arg);` and interpreting exceptions to emulate the low level API seems a bit too much. To add to my point: typically higher-level APIs go under the `PyObject_*` namespace, whereas `Py{Type}_*` is more concrete. So I'd make `PyGen_Send` to only work with `PyGen` and `PyCoro`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 17:08:21 2020 From: report at bugs.python.org (Thomas Grainger) Date: Wed, 16 Sep 2020 21:08:21 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600290501.6.0.0654135675536.issue41602@roundup.psfhosted.org> Thomas Grainger added the comment: I pushed that patch ---------- versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 17:14:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Sep 2020 21:14:53 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600290893.9.0.679539367627.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: There are other abstract object APIs: PyNumber, PySequence, PyMapping, etc. In particularly PyIter_Next() works with the iterator protocol, there is no single iterator class. Seems PyGen_* API is related to concrete class, but we can introduce new namespace for the generator protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 17:15:26 2020 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Wed, 16 Sep 2020 21:15:26 +0000 Subject: [issue39452] Improve the __main__ module documentation In-Reply-To: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org> Message-ID: <1600290926.21.0.969521984145.issue39452@roundup.psfhosted.org> G?ry added the comment: Thanks for your extended review Steven. > You state that these two phrases are from the runpy documentation: > > * "run from the module namespace" > * "run from the file system" > > but neither of those phrases appear in the runpy documentation here: > > https://docs.python.org/3/library/runpy.html I agree. Actually the first paragraph of the page uses the phrases: - "located using the module namespace"; - "located using the file system", so instead of saying: - "run a module located using the module namespace" to mean "python - "run a module located using the file system" to mean "python -m ", I simplified to: - "run from the module namespace" - "run from the file system" But since the terminology is misleading I have used these phrases instead: - `python`: "module initialized from an interactive prompt"; - `python < `: "module initialized from standard input"; - `python `: "module initialized from a file argument"; - `python -c `: "module initialized from a `-c` argument"; - `python -m `: "module initialized from a `-m` argument"; - `import `: "module initialized from an import statement". What the documentation tries to explain is that in all of these cases except the last one, code is executed in the __main__ module. I have updated the PR. ---- > The PR changes the term "scope" to "environment", but I think that is wrong. An environment is potentially greater than a scope. `__main__` is a module namespace, hence a scope. The environment includes things outside of that scope, such as the builtins, environment variables, the current working directory, the python path, etc. We don't talk about modules being an environment, but as making up a scope. I disagree. According to Wikipedia (https://en.wikipedia.org/wiki/Scope_(computer_science)), the term "scope" is the part of a program where a name binding is valid, while the term "environment" (synonym of "context") is the set of name bindings that are valid within a part of a program. Therefore "scope" is a property of a name binding (a name binding has a scope), and "environment" is a property of a part of a program (a part of a program has an environment). And the term "environment" is actually already used in the original title and synopsis of the document (and it is correct): > :mod:`__main__` --- Top-level script environment > .. module:: __main__ > :synopsis: The environment where the top-level script is run. So my change to the body fixes the inconsistent and incorrect usage of "scope": - ``'__main__'`` is the name of the scope in which top-level code executes. + ``'__main__'`` is the name of the environment where top-level code is run. - A module can discover whether or not it is running in the main scope + A module can discover whether or not it is running in the main environment ---- > Placing the comment above the `if`, where it will apply to the entire `if` statement, is incorrect. I agree. Sometimes you see comments before if statements but they usually don't start with "execute". I have updated the PR. ---- > The second problem is that when running a module with -m it *is* imported. PEP 338 is clear about this: I agree. I should have said "when the module is not initialized from an import statement". But note that even before my change the original document already used the phrase "not imported": - executing code in a module when it is run as a script or with ``python - -m`` but not when it is imported:: + executing code in a module when it is not imported:: - # execute only if run as a script + # Execute only if the module is not imported. I have updated the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 17:24:43 2020 From: report at bugs.python.org (Thomas Grainger) Date: Wed, 16 Sep 2020 21:24:43 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600291483.73.0.4411527764.issue41602@roundup.psfhosted.org> Thomas Grainger added the comment: nice the tests pass with that fix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 17:24:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 16 Sep 2020 21:24:41 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600291481.1.0.394081660802.issue41602@roundup.psfhosted.org> Guido van Rossum added the comment: Why did you remove 3.10? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 17:42:37 2020 From: report at bugs.python.org (Rick) Date: Wed, 16 Sep 2020 21:42:37 +0000 Subject: [issue37296] pdb next vs __next__ In-Reply-To: <1560626859.25.0.0533027405715.issue37296@roundup.psfhosted.org> Message-ID: <1600292557.74.0.821078510565.issue37296@roundup.psfhosted.org> Rick added the comment: I have no idea what program this was in, it's lost in the depths of time. I can't retain these things for over a year, too old, maybe in my twenties I would have remembered what code this was in but no longer. Can it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 18:34:38 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 16 Sep 2020 22:34:38 +0000 Subject: [issue41799] splunklib.client does not handle Unicode characters In-Reply-To: <1600279797.15.0.70851751953.issue41799@roundup.psfhosted.org> Message-ID: <1600295678.3.0.1925840913.issue41799@roundup.psfhosted.org> Change by Eric V. Smith : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 18:45:44 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 16 Sep 2020 22:45:44 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600296344.05.0.935563509423.issue27032@roundup.psfhosted.org> Irit Katriel added the comment: This was pending Python 2 EOL, so should be ok to do now, right? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 18:49:02 2020 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 16 Sep 2020 22:49:02 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600296542.65.0.231940177789.issue27032@roundup.psfhosted.org> Senthil Kumaran added the comment: Irit, yes. Serhiy's patch could be converted to a GitHub PR and it can be merged. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 19:51:22 2020 From: report at bugs.python.org (Danilo G. Baio) Date: Wed, 16 Sep 2020 23:51:22 +0000 Subject: [issue40900] uuid module build fix on FreeBSD proposal In-Reply-To: <1591544143.85.0.748554475357.issue40900@roundup.psfhosted.org> Message-ID: <1600300282.99.0.820222798027.issue40900@roundup.psfhosted.org> Change by Danilo G. Baio : ---------- nosy: +dbaio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 20:26:27 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 17 Sep 2020 00:26:27 +0000 Subject: [issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto() In-Reply-To: <1584703504.0.0.0724934497115.issue40025@roundup.psfhosted.org> Message-ID: <1600302387.87.0.901139820937.issue40025@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21338 pull_request: https://github.com/python/cpython/pull/22287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 20:26:45 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 17 Sep 2020 00:26:45 +0000 Subject: [issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto() In-Reply-To: <1584703504.0.0.0724934497115.issue40025@roundup.psfhosted.org> Message-ID: <1600302405.15.0.0602428704326.issue40025@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21339 pull_request: https://github.com/python/cpython/pull/22286 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 20:32:48 2020 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Sep 2020 00:32:48 +0000 Subject: [issue40025] enum: _generate_next_value_ is not called if its definition occurs after calls to auto() In-Reply-To: <1584703504.0.0.0724934497115.issue40025@roundup.psfhosted.org> Message-ID: <1600302768.98.0.154198546222.issue40025@roundup.psfhosted.org> Ethan Furman added the comment: There was an effort to make it so `_generate_next_value_` could be defined last and still work correctly -- unfortunately, it could not handle the more common case of using `auto()` with the default `_generate_next_value_`: class I(Enum): first = auto() second = first + 2 # this line would fail Closing the ticket. Thank you everyone! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 20:37:55 2020 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Sep 2020 00:37:55 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600303075.29.0.134577491633.issue39728@roundup.psfhosted.org> Ethan Furman added the comment: New changeset a9ba8ba9a71f3cb8d274c354ff67b6206abeb8ac by Ethan Furman in branch '3.9': [3.9] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22282) https://github.com/python/cpython/commit/a9ba8ba9a71f3cb8d274c354ff67b6206abeb8ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 20:38:18 2020 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Sep 2020 00:38:18 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600303098.32.0.31891430711.issue39728@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 5efb1a77e75648012f8b52960c8637fc296a5c6d by Ethan Furman in branch '3.8': [3.8] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22283) https://github.com/python/cpython/commit/5efb1a77e75648012f8b52960c8637fc296a5c6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 20:39:09 2020 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Sep 2020 00:39:09 +0000 Subject: [issue39728] Instantiating enum with invalid value results in ValueError twice In-Reply-To: <1582448824.79.0.766917894274.issue39728@roundup.psfhosted.org> Message-ID: <1600303149.85.0.961452781835.issue39728@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 16 22:09:38 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 17 Sep 2020 02:09:38 +0000 Subject: [issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API In-Reply-To: <1600265269.2.0.881235166904.issue41798@roundup.psfhosted.org> Message-ID: <1600308578.41.0.894545059687.issue41798@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 02:23:09 2020 From: report at bugs.python.org (Dominik Schmid) Date: Thu, 17 Sep 2020 06:23:09 +0000 Subject: [issue41761] multiprocessing.Queue prevents program exit when containing a reasonable amount of data In-Reply-To: <1599820644.84.0.266224553021.issue41761@roundup.psfhosted.org> Message-ID: <1600323789.55.0.122576284695.issue41761@roundup.psfhosted.org> Change by Dominik Schmid : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:18:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Sep 2020 07:18:50 +0000 Subject: [issue39452] Improve the __main__ module documentation In-Reply-To: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org> Message-ID: <1600327130.06.0.833428481322.issue39452@roundup.psfhosted.org> Terry J. Reedy added the comment: The main issue I have with the existing doc is its use of 'top-level' to mean the main, initial, startup module that first executes the user code for a python 'program'. We routinely use 'top-level' instead for the global scope of a module. Example: https://docs.python.org/3/glossary.html, 'qualified name' entry, line 2: "For top-level functions and classes, ..." Within '__main__', some code is top-level, but class and function bodies are not. But this does not have to be part of this PR. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:29:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 07:29:00 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600327740.84.0.466945372015.issue27032@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +21340 pull_request: https://github.com/python/cpython/pull/22288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:29:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 07:29:00 +0000 Subject: [issue37328] remove deprecated HTMLParser.unescape In-Reply-To: <1560839410.8.0.633433607628.issue37328@roundup.psfhosted.org> Message-ID: <1600327740.99.0.499494388207.issue37328@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka nosy_count: 2.0 -> 3.0 pull_requests: +21341 pull_request: https://github.com/python/cpython/pull/22288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:31:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 07:31:19 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600327879.93.0.0328750257163.issue27032@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was already removed in issue37328. The only not applied part of the patch is adding a What's New entry. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:31:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 07:31:41 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600327901.99.0.108320900077.issue27032@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:34:42 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 07:34:42 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1600328082.08.0.574295215646.issue41715@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset dcfaa520c4638a67052a4ff4a2a820be68750ad7 by Serhiy Storchaka in branch 'master': bpo-41715: Fix potential catastrofic backtracking in c_analyzer. (GH-22091) https://github.com/python/cpython/commit/dcfaa520c4638a67052a4ff4a2a820be68750ad7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:35:48 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 07:35:48 +0000 Subject: [issue41662] Bugs in binding parameters in sqlite3 In-Reply-To: <1598706308.83.0.197807583291.issue41662@roundup.psfhosted.org> Message-ID: <1600328148.12.0.46377230395.issue41662@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 0b419b791077414bbc011a412698ebb362b63761 by Serhiy Storchaka in branch 'master': bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998) https://github.com/python/cpython/commit/0b419b791077414bbc011a412698ebb362b63761 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:36:26 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 17 Sep 2020 07:36:26 +0000 Subject: [issue41662] Bugs in binding parameters in sqlite3 In-Reply-To: <1598706308.83.0.197807583291.issue41662@roundup.psfhosted.org> Message-ID: <1600328186.05.0.838437132172.issue41662@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21343 pull_request: https://github.com/python/cpython/pull/22290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:36:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 07:36:35 +0000 Subject: [issue41715] REDoS in c_analyzer In-Reply-To: <1599217884.95.0.47859264992.issue41715@roundup.psfhosted.org> Message-ID: <1600328195.11.0.890934055815.issue41715@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:36:17 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 17 Sep 2020 07:36:17 +0000 Subject: [issue41662] Bugs in binding parameters in sqlite3 In-Reply-To: <1598706308.83.0.197807583291.issue41662@roundup.psfhosted.org> Message-ID: <1600328177.81.0.341027015064.issue41662@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21342 pull_request: https://github.com/python/cpython/pull/22289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:49:13 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Thu, 17 Sep 2020 07:49:13 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already Message-ID: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> New submission from Jurko Gospodneti? : This issue seems to affect all Python 3 Windows installers. Reproduced on: - various Windows 10 systems - one Windows 8 system - one Windows 7 system - all tested Python 3+ installers up to and including 3.8.5 Scenario: 1. there is already an existing Python 3+ installation on a Windows system, installed for all users 2. you run a Python 3+ installer (any version, even the one matching the already installed Python version) under the `systemprofile` Windows user account, targeting all users and the same target folder that the currently existing installation is located in - example how to do this manually: - using the Microsoft/SysInternals `psexec` utility to open a command prompt running under the `systemprofile` Windows user account: `psexec -i -s cmd` - run the Python installer from that command-prompt, in our case it was the following command: `python-3.8.5.exe /passive TargetDir=C:\Python38 InstallAllUsers=1 PrependPath=1` 3. result will be any of the following at random: - failed installation with different Windows error codes, including totally opaque 0x80070643 `Fatal Error during installation` - successful installation - seemingly successful installation that does not really install all the Python components, e.g. the whole `Lib` folder may end up being empty - seemingly successful installation that then can not be uninstalled as the uninstaller reports that it can not find the existing installation on the system - this effect can often, but not always, be fixed by rerunning the installer and then running the uninstaller - you can run the uninstaller from the command-line using something like: `python-3.8.5.exe /uninstall /passive` Additional notes on produced results: - each installation seems to generate differently named log files in the `C:\Windows\Temp` folder, i.e. the `systemprofile` user account's `%TEMP%` folder - the log file names indicate whether each specific component is being installed for the current-user or all-user variants, and those seem to be chosen at random in our problematic scenario - it seems like the components whose log files are marked as being installed for the current user are not getting installed at all, or may possibly be getting installed to some other undisclosed location The same does not occur if any of the following is true: - if the installation is run from an regular end-user account - if there is no Python currently installed on the system A workaround we found in our case (Python gets installed as a step in one of our installers) is to basically do (uninstall, install) in a loop with some hand-crafted checking to see if the existing installation is ok (includes running some Python code + checking for some specific Python distribution files we've found to be missing in some scenarios). ---------- components: Installation messages: 377039 nosy: Jurko.Gospodneti? priority: normal severity: normal status: open title: Python installation fails when run under system account if there is already an existing installation on the system already versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:50:31 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Thu, 17 Sep 2020 07:50:31 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already In-Reply-To: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> Message-ID: <1600329031.36.0.0486320248002.issue41800@roundup.psfhosted.org> Jurko Gospodneti? added the comment: This also seems related to https://bugs.python.org/issue29033. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:51:22 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Thu, 17 Sep 2020 07:51:22 +0000 Subject: [issue29033] Windows Python installer rolls back when run under SYSTEM account (SCCM) In-Reply-To: <1482311785.5.0.564825395885.issue29033@psf.upfronthosting.co.za> Message-ID: <1600329082.11.0.995016469155.issue29033@roundup.psfhosted.org> Jurko Gospodneti? added the comment: This seems related to https://bugs.python.org/issue41800. ---------- nosy: +Jurko.Gospodneti? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 03:57:21 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 17 Sep 2020 07:57:21 +0000 Subject: [issue41662] Bugs in binding parameters in sqlite3 In-Reply-To: <1598706308.83.0.197807583291.issue41662@roundup.psfhosted.org> Message-ID: <1600329441.61.0.103809541652.issue41662@roundup.psfhosted.org> miss-islington added the comment: New changeset f76a3889d1fc6c5514323866a047b642c6da4e9b by Miss Islington (bot) in branch '3.9': bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998) https://github.com/python/cpython/commit/f76a3889d1fc6c5514323866a047b642c6da4e9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:15:41 2020 From: report at bugs.python.org (Danny Lin) Date: Thu, 17 Sep 2020 08:15:41 +0000 Subject: [issue37529] Mimetype module duplicates In-Reply-To: <1562680761.15.0.288138014947.issue37529@roundup.psfhosted.org> Message-ID: <1600330541.62.0.846241444553.issue37529@roundup.psfhosted.org> Danny Lin added the comment: It doesn't seem so... In Python 3.8.5 this code is still seen in mimetypes.py (line 492-504): '.bmp' : 'image/bmp', '.gif' : 'image/gif', '.ief' : 'image/ief', '.jpg' : 'image/jpeg', '.jpe' : 'image/jpeg', '.jpeg' : 'image/jpeg', '.png' : 'image/png', '.svg' : 'image/svg+xml', '.tiff' : 'image/tiff', '.tif' : 'image/tiff', '.ico' : 'image/vnd.microsoft.icon', '.ras' : 'image/x-cmu-raster', '.bmp' : 'image/x-ms-bmp', ---------- nosy: +danny87105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:15:51 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Thu, 17 Sep 2020 08:15:51 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already In-Reply-To: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> Message-ID: <1600330551.16.0.11185905097.issue41800@roundup.psfhosted.org> Jurko Gospodneti? added the comment: Some other potentially related issues: - https://bugs.python.org/issue25164 - https://bugs.python.org/issue32966 - https://bugs.python.org/issue37756 And some other related links: - https://docs.microsoft.com/en-us/troubleshoot/windows-server/application-management/msi-installation-error-1603 - https://superuser.com/questions/1238473/cant-uninstall-python-3-6-on-windows-10 - https://www.programmersought.com/article/41342430755/ - https://www.programmersought.com/article/41342430755/ And I'm attaching some of the Python installer logs I found from one of the debugging sessions researching this problem. It contains logs from a few installation runs and you can see there from the first log file in each batch and from the names of the other log files that the initial two failed while the last one was presumably done after an uninstall and worked. ---------- Added file: https://bugs.python.org/file49461/Python 3.8.3 (32-bit)_20200723053832.7z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:21:39 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Thu, 17 Sep 2020 08:21:39 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already In-Reply-To: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> Message-ID: <1600330899.02.0.336885100503.issue41800@roundup.psfhosted.org> Change by Jurko Gospodneti? : ---------- versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:21:57 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Thu, 17 Sep 2020 08:21:57 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already In-Reply-To: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> Message-ID: <1600330917.92.0.811407162014.issue41800@roundup.psfhosted.org> Change by Jurko Gospodneti? : ---------- versions: -Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:23:54 2020 From: report at bugs.python.org (Ethan Furman) Date: Thu, 17 Sep 2020 08:23:54 +0000 Subject: [issue32218] add __iter__ to enum.Flag members In-Reply-To: <1512445452.31.0.213398074469.issue32218@psf.upfronthosting.co.za> Message-ID: <1600331034.85.0.807998112034.issue32218@roundup.psfhosted.org> Change by Ethan Furman : ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:34:35 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 17 Sep 2020 08:34:35 +0000 Subject: [issue37105] Add deprecated-remove information on stream doc In-Reply-To: <1559266839.05.0.214061892347.issue37105@roundup.psfhosted.org> Message-ID: <1600331675.43.0.358215784984.issue37105@roundup.psfhosted.org> Irit Katriel added the comment: I think this issue can be closed because the deprecation info was added. If it's staying open for the actual removal in 3.10, should the title change accordingly? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:49:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 08:49:06 +0000 Subject: [issue37328] remove deprecated HTMLParser.unescape In-Reply-To: <1560839410.8.0.633433607628.issue37328@roundup.psfhosted.org> Message-ID: <1600332546.35.0.141251276882.issue37328@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a33f2c2bae759fc9d06e1c032fd2026135f2df45 by Serhiy Storchaka in branch 'master': bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288) https://github.com/python/cpython/commit/a33f2c2bae759fc9d06e1c032fd2026135f2df45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:49:06 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 08:49:06 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600332546.25.0.370723687563.issue27032@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a33f2c2bae759fc9d06e1c032fd2026135f2df45 by Serhiy Storchaka in branch 'master': bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288) https://github.com/python/cpython/commit/a33f2c2bae759fc9d06e1c032fd2026135f2df45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 04:51:18 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Sep 2020 08:51:18 +0000 Subject: [issue41662] Bugs in binding parameters in sqlite3 In-Reply-To: <1598706308.83.0.197807583291.issue41662@roundup.psfhosted.org> Message-ID: <1600332678.83.0.409350296799.issue41662@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 05:29:29 2020 From: report at bugs.python.org (Tal Einat) Date: Thu, 17 Sep 2020 09:29:29 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600334969.27.0.46997950938.issue41561@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 05:29:20 2020 From: report at bugs.python.org (Tal Einat) Date: Thu, 17 Sep 2020 09:29:20 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600334960.05.0.131676106404.issue41561@roundup.psfhosted.org> Tal Einat added the comment: I just ran into this too on Ubuntu 20.04. I don't recommend changing /etc/ssl/openssl.cnf. Instead, make a local copy, for example at $HOME/cpython-dev-openssl.cnf, with the changes suggested by Vladyslav Bondar. Then run the tests with: OPENSSL_CONF=$HOME/openssl-cpython-dev.cnf ./python -m test ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 05:33:23 2020 From: report at bugs.python.org (Tal Einat) Date: Thu, 17 Sep 2020 09:33:23 +0000 Subject: [issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora In-Reply-To: <1573836860.92.0.531253629667.issue38815@roundup.psfhosted.org> Message-ID: <1600335203.09.0.162256170702.issue38815@roundup.psfhosted.org> Tal Einat added the comment: Ping? ---------- nosy: +taleinat status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 05:43:10 2020 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Thu, 17 Sep 2020 09:43:10 +0000 Subject: [issue39452] Improve the __main__ module documentation In-Reply-To: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org> Message-ID: <1600335790.94.0.0800829790066.issue39452@roundup.psfhosted.org> G?ry added the comment: I agree with you Terry. Another thing that bothers me: in the current document, the __main__ module is reduced to its environment (aka context or dictionary), whereas a module object has other important attributes such as its code. So how about adding the following changes? - :mod:`__main__` --- Top-level code environment - ============================================== + :mod:`__main__` --- Startup module + ================================== - :synopsis: The environment where top-level code is run. + :synopsis: The first module from which the code is executed at startup. - ``'__main__'`` is the name of the environment where top-level code is run. + ``'__main__'`` is the name of the startup module. - A module can discover whether or not it is running in the main environment + A module can discover whether or not it is initialized as the :mod:`__main__` module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 06:03:19 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 17 Sep 2020 10:03:19 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600336999.14.0.581102488189.issue41756@roundup.psfhosted.org> Mark Shannon added the comment: I agree with Serhiy, that `PyGen_` is a bad prefix. Unless a function takes generator objects and *only* generators objects, then it shouldn't have a `PyGen` prefix. The API function is the C equivalent of obj.send(val). The first parameter is an object. Coroutines do not inherit from generators. That the the C implementations are so coupled is an unfortunate historical accident, and may well be changed. Regardless of how this is implemented internally, any API function's signature should reflect the equivalent Python code. And please use an enum, not an int, as the return value. It's a huge boon for readability. I would suggest: `PySendResult PyIter_Send(PyObject *obj, PyObject *arg, PyObject **result);` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 06:48:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Sep 2020 10:48:28 +0000 Subject: [issue41801] 23 tests failed for 3.9.0b2-64 installed on Windows 10 Message-ID: <1600339708.31.0.111996920302.issue41801@roundup.psfhosted.org> New submission from Terry J. Reedy : Win10, master repository 32-debug build: test_locale and test__locale fail as they have for a year. test_compileall test_asyncio failed as they have before, but not a few weels ago. *** PermissionError: [WinError 5] Access is denied: 'f:\\dev\\3x\\\\lib\\__pycache__\\quopri.cpython-310.pyc.39387352' -> 'f:\\dev\\3x\\\\lib\\__pycache__\\quopri.cpython-310.pyc' test test_asyncio failed -- Traceback (most recent call last): File "f:\dev\3x\lib\test\test_asyncio\test_sendfile.py", line 464, in test_sendfile_close_peer_in_the_middle_of_receiving self.assertTrue(1024 <= self.file.tell() < len(self.DATA), AssertionError: False is not true : 131088 Installed 64-bit 3.9.0b2 has 19 more (same after 'repair'): 12 failed with ModuleNotFoundError: No module named '_testinternalcapi' test_buffer test_capi test_deque test_fstring test_grammar test_keyword test_memoryio test_parser test_string_literals test_struct test_syntax test_traceback 7 failed otherwise, usually with multiple errors test_array test_exceptions test_flufl test_itertools test_ordered_dict test_pickle test_sys test_xml_etree_c ---------- components: Installation, Windows messages: 377052 nosy: lukasz.langa, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: 23 tests failed for 3.9.0b2-64 installed on Windows 10 type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 07:05:53 2020 From: report at bugs.python.org (Campbell Barton) Date: Thu, 17 Sep 2020 11:05:53 +0000 Subject: [issue41802] Missing documentation for 'PyDict_DelItem' behavior Message-ID: <1600340753.64.0.782309837767.issue41802@roundup.psfhosted.org> New submission from Campbell Barton : When calling 'PyDict_DelItem' on a key that isn't in the hash a KeyError is raised. This is not documented. ---------- components: C API messages: 377053 nosy: ideasman42 priority: normal severity: normal status: open title: Missing documentation for 'PyDict_DelItem' behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 07:20:48 2020 From: report at bugs.python.org (Campbell Barton) Date: Thu, 17 Sep 2020 11:20:48 +0000 Subject: [issue41802] Missing documentation for 'PyDict_DelItem' behavior In-Reply-To: <1600340753.64.0.782309837767.issue41802@roundup.psfhosted.org> Message-ID: <1600341648.1.0.73607836252.issue41802@roundup.psfhosted.org> Campbell Barton added the comment: Edit: When calling 'PyDict_DelItem' on a key that isn't in the dictionary, a 'KeyError' is raised. This is not documented. >From reading the current documentation, it only seems as if an error is raised if the key can't be hashed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 07:50:11 2020 From: report at bugs.python.org (Skyreka Agence Web) Date: Thu, 17 Sep 2020 11:50:11 +0000 Subject: [issue41803] Robots.txt Message-ID: <1600343411.93.0.266726612445.issue41803@roundup.psfhosted.org> New submission from Skyreka Agence Web : I can't documentation about it, but all of the robots.txt checkers I find behave like this. You can test on this site: http://www.skyreka.com/robots.txt, I believe that this is how it's implemented now in most parsers ? ---------- messages: 377055 nosy: admin2 priority: normal severity: normal status: open title: Robots.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 08:00:23 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 17 Sep 2020 12:00:23 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600344023.54.0.0692458065414.issue27032@roundup.psfhosted.org> Irit Katriel added the comment: This issue can be closed now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 08:07:25 2020 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 17 Sep 2020 12:07:25 +0000 Subject: [issue41803] Robots.txt In-Reply-To: <1600343411.93.0.266726612445.issue41803@roundup.psfhosted.org> Message-ID: <1600344445.51.0.0488468857626.issue41803@roundup.psfhosted.org> Eric V. Smith added the comment: It's not clear what bug you're describing, or how it relates to Python. Can you provide more information, and show what behavior your seeing, and what behavior you're expecting? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 11:15:46 2020 From: report at bugs.python.org (amiir mascud) Date: Thu, 17 Sep 2020 15:15:46 +0000 Subject: [issue36207] robotsparser deny all with some rules In-Reply-To: <1551865321.24.0.407834320039.issue36207@roundup.psfhosted.org> Message-ID: <1600355746.06.0.325306951424.issue36207@roundup.psfhosted.org> amiir mascud added the comment: Can you share the robot file that you are using for your website? I am using the default robot file for my site https://meilleurdumoniteur.fr/ ---------- nosy: +amiir.mascud _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 11:56:22 2020 From: report at bugs.python.org (hai shi) Date: Thu, 17 Sep 2020 15:56:22 +0000 Subject: [issue41798] [C API] Revisit usage of the PyCapsule C API with multi-phase initialization API In-Reply-To: <1600265269.2.0.881235166904.issue41798@roundup.psfhosted.org> Message-ID: <1600358182.27.0.665092921386.issue41798@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 12:42:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Sep 2020 16:42:20 +0000 Subject: [issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9 Message-ID: <1600360940.95.0.528440416873.issue41804@roundup.psfhosted.org> New submission from STINNER Victor : test_epoll.test_control_and_wait() failed once on aarch64 RHEL8 Refleaks 3.9: https://buildbot.python.org/all/#/builders/247/builds/32 This buildbot runs test_epoll 6 times in a row and the system load was quite high (10.39). 0:03:01 load avg: 10.39 [ 97/425/1] test_epoll failed -- running: test_multiprocessing_fork (3 min), test_gdb (46.3 sec), test_peg_generator (1 min 25 sec), test_capi (2 min 26 sec), test_weakref (2 min 1 sec), test_statistics (1 min 6 sec), test_multiprocessing_spawn (2 min 44 sec), test_io (1 min 53 sec) beginning 6 repetitions 123456 ...test test_epoll failed -- Traceback (most recent call last): File "/home/buildbot/buildarea/3.9.cstratak-RHEL8-aarch64.refleak/build/Lib/test/test_epoll.py", line 199, in test_control_and_wait self.assertEqual(events, expected) AssertionError: Lists differ: [(5, 5)] != [(4, 5), (5, 5)] First differing element 0: (5, 5) (4, 5) Second list contains 1 additional elements. First extra element 1: (5, 5) - [(5, 5)] + [(4, 5), (5, 5)] ---------- components: Tests messages: 377059 nosy: vstinner priority: normal severity: normal status: open title: test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 12:43:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Sep 2020 16:43:47 +0000 Subject: [issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9 In-Reply-To: <1600360940.95.0.528440416873.issue41804@roundup.psfhosted.org> Message-ID: <1600361027.03.0.216960916416.issue41804@roundup.psfhosted.org> STINNER Victor added the comment: Code of the test with a comment on the line which fails: def test_control_and_wait(self): client, server = self._connected_pair() ep = select.epoll(16) ep.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT | select.EPOLLET) ep.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT | select.EPOLLET) now = time.monotonic() events = ep.poll(1, 4) then = time.monotonic() self.assertFalse(then - now > 0.1, then - now) events.sort() expected = [(client.fileno(), select.EPOLLOUT), (server.fileno(), select.EPOLLOUT)] expected.sort() self.assertEqual(events, expected) events = ep.poll(timeout=2.1, maxevents=4) self.assertFalse(events) client.send(b"Hello!") server.send(b"world!!!") now = time.monotonic() events = ep.poll(1, 4) then = time.monotonic() self.assertFalse(then - now > 0.01) events.sort() expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT), (server.fileno(), select.EPOLLIN | select.EPOLLOUT)] expected.sort() self.assertEqual(events, expected) # <====== FAIL HERE ep.unregister(client.fileno()) ep.modify(server.fileno(), select.EPOLLOUT) now = time.monotonic() events = ep.poll(1, 4) then = time.monotonic() self.assertFalse(then - now > 0.01) expected = [(server.fileno(), select.EPOLLOUT)] self.assertEqual(events, expected) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 12:44:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Sep 2020 16:44:32 +0000 Subject: [issue41804] test_epoll fails test_control_and_wait() randomly on aarch64 RHEL8 Refleaks 3.9 In-Reply-To: <1600360940.95.0.528440416873.issue41804@roundup.psfhosted.org> Message-ID: <1600361072.64.0.57486853698.issue41804@roundup.psfhosted.org> STINNER Victor added the comment: I managed to reproduce the failure in 50 seconds using the command: $ ./python -m test test_epoll -F -v -j20 (...) 0:00:49 load avg: 4.81 [257/1] test_epoll failed test_add (test.test_epoll.TestEPoll) ... ok test_badcreate (test.test_epoll.TestEPoll) ... ok test_close (test.test_epoll.TestEPoll) ... ok test_context_manager (test.test_epoll.TestEPoll) ... ok test_control_and_wait (test.test_epoll.TestEPoll) ... FAIL test_create (test.test_epoll.TestEPoll) ... ok test_errors (test.test_epoll.TestEPoll) ... ok test_fd_non_inheritable (test.test_epoll.TestEPoll) ... ok test_fromfd (test.test_epoll.TestEPoll) ... ok test_unregister_closed (test.test_epoll.TestEPoll) ... ok ====================================================================== FAIL: test_control_and_wait (test.test_epoll.TestEPoll) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_epoll.py", line 199, in test_control_and_wait self.assertEqual(events, expected) AssertionError: Lists differ: [(5, 5)] != [(4, 5), (5, 5)] First differing element 0: (5, 5) (4, 5) Second list contains 1 additional elements. First extra element 1: (5, 5) - [(5, 5)] + [(4, 5), (5, 5)] ---------------------------------------------------------------------- Ran 10 tests in 2.120s FAILED (failures=1) test test_epoll failed (...) Total duration: 49.3 sec Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 12:46:44 2020 From: report at bugs.python.org (hai shi) Date: Thu, 17 Sep 2020 16:46:44 +0000 Subject: [issue41797] PyModule_GetState doesn't work with LazyLoader In-Reply-To: <1600262618.31.0.325694341017.issue41797@roundup.psfhosted.org> Message-ID: <1600361204.07.0.291943495913.issue41797@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 12:52:12 2020 From: report at bugs.python.org (Bale) Date: Thu, 17 Sep 2020 16:52:12 +0000 Subject: [issue41794] Memory leak in asyncio server In-Reply-To: <1600234888.13.0.392251732884.issue41794@roundup.psfhosted.org> Message-ID: <1600361532.62.0.641004320219.issue41794@roundup.psfhosted.org> Bale added the comment: Ok since nobody is replying, the bug seems to be that if the asyncio server sends data, and I do not use s.recv() to clear the buffer, and I use s.close() instead, a reference to handle_echo is kept and is never deleted. Using gc.collect() does delete the leaked object. The socket that you use to connect to the server seems to also determine whether the bug works, like how I can not do it when I create the connection on my windows computer, but the bug is triggered when I do it on my ubuntu server. I should also mention that I am running the asyncio server on my ubuntu server, on python 3.8. Here is output of the bug happening. FROM CLIENT ON MY WINDOWS COMPUTER ON PY3.8: >>> s = socket.socket() >>> s.connect(("x.x.x.x", 8888)) >>> s.send(b"test") 4 # Wait for server to send data, but dont use s.recv(), just assume >>> s.close() Server output: Received 'test' from ('x.x.x.x', 42241) Send: 'test' connection lost DELETED OBJECT After connection was lost, DELETED OBJECT was printed, so everything worked fine. But when I create the socket in a different environment, such as on ubuntu python 3.8: Client side code (exact same as before): >>> s = socket.socket() >>> s.connect(("x.x.x.x", 8888)) >>> s.send(b"test") 4 # Wait for server to send data, but dont use s.recv(), just assume >>> s.close() Server side output: Received 'test' from ('x.x.x.x', 42249) Send: 'test' connection lost We can see that connection lost was printed, but DELETED OBJECT was not. This is evidence that there is a memory leak bug with asyncio.start_server ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 15:17:57 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Thu, 17 Sep 2020 19:17:57 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600370277.91.0.367579665955.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: I guess `PyIter_Send` would imply that this function should work for all inputs (like in https://bugs.python.org/msg377007) which also sounds reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 15:28:28 2020 From: report at bugs.python.org (Patrick Reader) Date: Thu, 17 Sep 2020 19:28:28 +0000 Subject: [issue41805] types.GenericAlias and types.Union have no documentation Message-ID: <1600370908.0.0.224627521485.issue41805@roundup.psfhosted.org> New submission from Patrick Reader : See title. For reference: `GenericAlias` was added by Guido van Rossum in commit 48b069a003ba6c684a9ba78493fbbec5e89f10b8 "bpo-39481: Implementation for [PEP 585](https://www.python.org/dev/peps/pep-0585/) (#18239)" `Union` was added by Maggi Moss in commit 1b4552c5e8e925f24c15f707050f22c977171125 "bpo-41428: Implementation for [PEP 604](https://www.python.org/dev/peps/pep-0604/) (GH-21515)" I can do a PR which would need backporting (is that the right word?) to 3.9 at least for `GenericAlias`. ---------- assignee: docs at python components: Documentation messages: 377064 nosy: docs at python, pxeger priority: normal severity: normal status: open title: types.GenericAlias and types.Union have no documentation versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 16:25:37 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 Sep 2020 20:25:37 +0000 Subject: [issue41806] socket methods with timeout take very slow path on Windows Message-ID: <1600374337.91.0.20537040247.issue41806@roundup.psfhosted.org> New submission from Steve Dower : When a socket object has a non-zero timeout, all send/recv/etc. calls are preceded by a select() call before making the actual call. If there is no timeout, the select call is skipped. It appears that on Windows, select() will block until the previous operation has completed, even if the next one would reliably succeed. For example, http.client uses a default blocksize of 8192 bytes (which is _really_ small for 2020, but probably not for 2002 when it was set - can we just increase it?), which will break up a stream into many little chunks. With no timeout set: send() is called repeatedly and Windows buffers blocks internally, resulting in the actual sends being bigger (as seen with a network trace - they'd range from 8KB-50KB). With a timeout set: select() is called and waits for the previous send() to complete, then calls the next send(). This results in every single send being exactly 8KB. This latter case also results in every operation becoming essentially synchronous, instead of picking up some implied parallelism in the OS and network driver. (Yes, increasing the block size in the above example also helps, but doesn't prevent the issue in the first place, nor does it help with other cases.) Has anyone ever looked into alternate ways to have the timeout work here? Such as SO_SNDTIMEO? I don't want to force through a full redesign here, but getting the select() call out of the main path here seems like an easy win. Would anyone like to take a look? I'm happy to help mentor someone through a patch (as long as you're familiar with networking/sockets already). ---------- components: Library (Lib), Windows messages: 377065 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: socket methods with timeout take very slow path on Windows type: performance versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 17:11:47 2020 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 17 Sep 2020 21:11:47 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600377107.4.0.503760435089.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > I guess `PyIter_Send` would imply that this function should work for all inputs (like in https://bugs.python.org/msg377007) which also sounds reasonable. I like `PyIter_Send` (and why I initially proposed it myself) because it will also work with the "send" slot defined on some types if we end up adding one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 17:21:23 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Thu, 17 Sep 2020 21:21:23 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600377683.15.0.374792627908.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: so to summarize: Proposed function signature: ``` PySendResult PyIter_Send(PyObject *obj, PyObject *arg, PyObject **result); ``` For generators/coroutines function will delegate to specialized implementation that does not raise StopIteration exception For types that provide `tp_iternext` if arg is Py_None function call invoke `Py_TYPE(obj)->tp_iternext(obj)` For all other cases function will try to call `send` method Regarding of the case function will not raise StopIteration and will always return pair status/result. Does it sound correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 17:51:20 2020 From: report at bugs.python.org (Hassanbot) Date: Thu, 17 Sep 2020 21:51:20 +0000 Subject: [issue29099] sqlite3 timestamp converter cannot handle timezone In-Reply-To: <1482966269.67.0.620298847284.issue29099@psf.upfronthosting.co.za> Message-ID: <1600379480.3.0.943828726476.issue29099@roundup.psfhosted.org> Hassanbot added the comment: This still isn't fixed as of 3.8 (or in master I think). I can understand why you wouldn't want to allow serializing and deserializing time zones, since tzinfo objects cannot be accurately serialized with a simple UTC offset, but you should at least get an error when trying to insert an aware object. Anything is better than it is now, where you get no warning or error when inserting the object, and get a hard to interpret error ("invalid literal for int() with base 10") when trying to retrieve it. For deserialization, the datetime class now (since 3.7) includes a fromisoformat() method that could be used as a counterpart to the isoformat() method used when serializing. At least it would be consistent then. ---------- nosy: +hassanbot versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 18:01:45 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 Sep 2020 22:01:45 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already In-Reply-To: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> Message-ID: <1600380105.17.0.0185347924982.issue41800@roundup.psfhosted.org> Steve Dower added the comment: Yeah, this whole issue is basically because Burn (our installer tool) won't do per-machine bundle registration even when it's only installing per-machine packages. So the install block that it would normally throw up fails if you use a different user account to install it the second time. > (Python gets installed as a step in one of our installers) I'm intrigued by this - if Python is a dependency of your application, it's better to repackage it yourself and install to your own directory. The installer is basically there for end-users, but if you're not doing an end-user kind of install there's really nothing gained. This whole scenario is fairly under-developed though. It comes up quite infrequently, so we don't have any really convenient instructions on how to go about it. Doesn't mean we can't help, but because we don't have a clear idea of what you may be trying to achieve, we'd like to hear about it before telling you how to approach this kind of thing. ---------- nosy: +steve.dower versions: +Python 3.10, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 18:48:35 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 17 Sep 2020 22:48:35 +0000 Subject: [issue33813] Update overdue 'Deprecated ... removed in 3.x' messages In-Reply-To: <1528562784.89.0.592728768989.issue33813@psf.upfronthosting.co.za> Message-ID: <1600382915.82.0.78679511688.issue33813@roundup.psfhosted.org> Irit Katriel added the comment: This looks like a duplicate of issue27032 so I think it can be closed now. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 18:58:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 17 Sep 2020 22:58:18 +0000 Subject: [issue34514] assertEqual doesn't use maxDiff when comparing dictionaries In-Reply-To: <1535336469.7.0.56676864532.issue34514@psf.upfronthosting.co.za> Message-ID: <1600383498.44.0.596127655055.issue34514@roundup.psfhosted.org> Irit Katriel added the comment: I think this can be closed as not a bug, unless Victor can clarify with an example script why there is an issue. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 19:01:19 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 17 Sep 2020 23:01:19 +0000 Subject: [issue34422] __name__ not available for classes in typing module In-Reply-To: <1534526466.89.0.56676864532.issue34422@psf.upfronthosting.co.za> Message-ID: <1600383679.94.0.718926999612.issue34422@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python versions: +Python 3.10, Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 19:11:32 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 17 Sep 2020 23:11:32 +0000 Subject: [issue41805] types.GenericAlias and types.Union have no documentation In-Reply-To: <1600370908.0.0.224627521485.issue41805@roundup.psfhosted.org> Message-ID: <1600384292.48.0.635884659075.issue41805@roundup.psfhosted.org> Andr?s Delfino added the comment: Hi, Patrick! Yes! It would be great if you could open a PR to document those new types. The documentation of types.Union should go to master only, and the documentation of types.GenericAlias to both master and 3.9, so two PRs should me opened to address this issues separately. The backporting (yes! that's the word) to 3.9 will be (fingers-crossed) automatic thanks to Mariatta's https://github.com/python/miss-islington ---------- nosy: +adelfino _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 19:14:18 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 17 Sep 2020 23:14:18 +0000 Subject: [issue33561] Add .tostring() method to xml.etree.ElementTree.Element In-Reply-To: <1526577225.21.0.682650639539.issue33561@psf.upfronthosting.co.za> Message-ID: <1600384458.7.0.345475832239.issue33561@roundup.psfhosted.org> Irit Katriel added the comment: Should this issue be closed as 'rejected', or is there anything left to do? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 19:25:35 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Thu, 17 Sep 2020 23:25:35 +0000 Subject: [issue41791] mimetypes module does not recognize jp2 type In-Reply-To: <1600144307.97.0.591745605568.issue41791@roundup.psfhosted.org> Message-ID: <1600385135.74.0.102511821679.issue41791@roundup.psfhosted.org> Andr?s Delfino added the comment: Hi, Radim! I've tested with 3.7.8 and got (None, None). I'm curious on how you got that 'image/jp2' output. It seems jp2 was never supported by looking into the git history of Lib/mimetypes.py. Would you like to open a PR to support it? :) ---------- nosy: +adelfino _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 19:41:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Sep 2020 23:41:28 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600386088.39.0.778454574805.issue27032@roundup.psfhosted.org> Terry J. Reedy added the comment: The backport to 3.9 is still pending. The bot claims that there is a merge conflict. This should not happen because What's New in 3.9 should be identical in master and 3.9. My guess is that someone only changed it in 3.9, though another change in master might not have been backported. I will try to determine the problem. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 19:46:00 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Sep 2020 23:46:00 +0000 Subject: [issue33813] Update overdue 'Deprecated ... removed in 3.x' messages In-Reply-To: <1528562784.89.0.592728768989.issue33813@psf.upfronthosting.co.za> Message-ID: <1600386360.34.0.461084157904.issue33813@roundup.psfhosted.org> Terry J. Reedy added the comment: This is definitely moot as the method was removed in #37328 (rather than in #27032). Thanks for catching this. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> remove deprecated HTMLParser.unescape _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:09:08 2020 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 18 Sep 2020 00:09:08 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600387748.77.0.0895495254146.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > Does it sound correct? It does, but given the amount of back and forth on this, I'd wait for Serhiy and Stefan to confirm if they're OK. IMO the `PyIter_Send` name is OK (given how generic the implementation will be) and returning an enum, while a tad unconventional for the C API is way more convenient for the developer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:10:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 00:10:58 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600387858.85.0.757054267254.issue27032@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +21344 pull_request: https://github.com/python/cpython/pull/22293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:10:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 00:10:59 +0000 Subject: [issue37328] remove deprecated HTMLParser.unescape In-Reply-To: <1560839410.8.0.633433607628.issue37328@roundup.psfhosted.org> Message-ID: <1600387859.05.0.208949993269.issue37328@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +terry.reedy nosy_count: 3.0 -> 4.0 pull_requests: +21345 pull_request: https://github.com/python/cpython/pull/22293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:40:16 2020 From: report at bugs.python.org (zamunda) Date: Fri, 18 Sep 2020 00:40:16 +0000 Subject: [issue41807] Warnings when installing Linter on VS code on Linux and Windows. Message-ID: <1600389616.58.0.106724247852.issue41807@roundup.psfhosted.org> New submission from zamunda : nstalled VS code, installed Python extension and when it loaded a pop up showed "Linter is not available" or something like that. Press Install, choose linter or never show again options. Pressed Install - and it loaded the code to install it. It installed some stuff but there are errors about Path or something. See in the screenshot. I've never had such Warnings before. When I installed Python (on my system Windows) I put a checkmark on Add to Path, so it's not the problem. Then I moved to Linux hoping it will work better and without warnings. Same Warining there too. I guess there is a problem with python3-pip or something. ---------- components: Installation files: 93283029-5dfbc880-f7d8-11ea-8552-fa5ee1e1d924.png messages: 377078 nosy: zamunda priority: normal severity: normal status: open title: Warnings when installing Linter on VS code on Linux and Windows. type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49462/93283029-5dfbc880-f7d8-11ea-8552-fa5ee1e1d924.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:41:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 18 Sep 2020 00:41:06 +0000 Subject: [issue41803] Robots.txt In-Reply-To: <1600343411.93.0.266726612445.issue41803@roundup.psfhosted.org> Message-ID: <1600389666.09.0.50876207642.issue41803@roundup.psfhosted.org> Change by Eric V. Smith : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:45:29 2020 From: report at bugs.python.org (zamunda) Date: Fri, 18 Sep 2020 00:45:29 +0000 Subject: [issue41807] Warnings when installing Linter on VS code on Linux and Windows. In-Reply-To: <1600389616.58.0.106724247852.issue41807@roundup.psfhosted.org> Message-ID: <1600389929.39.0.428330189071.issue41807@roundup.psfhosted.org> Change by zamunda : ---------- nosy: +admin2, eric.smith -zamunda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:47:43 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 00:47:43 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600390063.51.0.183149635659.issue27032@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4daeb9eec294f73a5811ef6ab3a0f8e61174a24c by Terry Jan Reedy in branch '3.9': [3.9] bpo-27032, bpo-37328: Document removing HTMLParser.unescape() (GH-22288) https://github.com/python/cpython/commit/4daeb9eec294f73a5811ef6ab3a0f8e61174a24c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:47:43 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 00:47:43 +0000 Subject: [issue37328] remove deprecated HTMLParser.unescape In-Reply-To: <1560839410.8.0.633433607628.issue37328@roundup.psfhosted.org> Message-ID: <1600390063.6.0.703161334487.issue37328@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4daeb9eec294f73a5811ef6ab3a0f8e61174a24c by Terry Jan Reedy in branch '3.9': [3.9] bpo-27032, bpo-37328: Document removing HTMLParser.unescape() (GH-22288) https://github.com/python/cpython/commit/4daeb9eec294f73a5811ef6ab3a0f8e61174a24c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:48:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 00:48:26 +0000 Subject: [issue27032] Remove deprecated html.parser.HTMLParser.unescape() In-Reply-To: <1463339146.08.0.655083281356.issue27032@psf.upfronthosting.co.za> Message-ID: <1600390106.32.0.741219721951.issue27032@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:50:10 2020 From: report at bugs.python.org (zamunda) Date: Fri, 18 Sep 2020 00:50:10 +0000 Subject: [issue41807] Warnings when installing Linter on VS code on Linux and Windows. In-Reply-To: <1600389616.58.0.106724247852.issue41807@roundup.psfhosted.org> Message-ID: <1600390210.97.0.817787077537.issue41807@roundup.psfhosted.org> Change by zamunda : ---------- nosy: +paul.moore, steve.dower, tim.golden, zach.ware, zamunda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 20:50:57 2020 From: report at bugs.python.org (zamunda) Date: Fri, 18 Sep 2020 00:50:57 +0000 Subject: [issue41807] Warnings when installing Linter on VS code on Linux and Windows. In-Reply-To: <1600389616.58.0.106724247852.issue41807@roundup.psfhosted.org> Message-ID: <1600390257.1.0.138173282567.issue41807@roundup.psfhosted.org> Change by zamunda : ---------- nosy: +Marcus.Smith, dstufft, ncoghlan, pradyunsg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 21:02:29 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 01:02:29 +0000 Subject: [issue41808] Synchronize What's New in 3.9 master and 3.9 copies Message-ID: <1600390949.09.0.806445771766.issue41808@roundup.psfhosted.org> New submission from Terry J. Reedy : The 3.9 copy is 5 lines longer, meaning that after the b1 split, something was added to 3.9 directly instead of to master first and backported, or added to both and deleted from master. Lukasz, is checking the two copies part of the final release process? The 5 lines not in master are from PR-21012 and PR-21039 of issue 40939, by Lysandros and Pablo. Please one of you verify that they should be added to master, as in the PR I will add, and not deleted from 3.9. ___ * The Public C API functions :c:func:`PyParser_SimpleParseStringFlags`, :c:func:`PyParser_SimpleParseStringFlagsFilename`, :c:func:`PyParser_SimpleParseFileFlags` and :c:func:`PyNode_Compile` are deprecated and will be removed in Python 3.10 together with the old parser. ___ ---------- assignee: docs at python components: Documentation messages: 377081 nosy: docs at python, lukasz.langa, lys.nikolaou, pablogsal, terry.reedy priority: normal severity: normal stage: test needed status: open title: Synchronize What's New in 3.9 master and 3.9 copies versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 21:07:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 01:07:28 +0000 Subject: [issue41808] Synchronize What's New in 3.9 master and 3.9 copies In-Reply-To: <1600390949.09.0.806445771766.issue41808@roundup.psfhosted.org> Message-ID: <1600391248.31.0.713292767694.issue41808@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21346 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/22294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 21:07:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 01:07:28 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1600391248.39.0.260864838612.issue40939@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +terry.reedy nosy_count: 8.0 -> 9.0 pull_requests: +21347 pull_request: https://github.com/python/cpython/pull/22294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 21:47:29 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 01:47:29 +0000 Subject: [issue41808] Synchronize What's New in 3.9 master and 3.9 copies In-Reply-To: <1600390949.09.0.806445771766.issue41808@roundup.psfhosted.org> Message-ID: <1600393649.25.0.570360469855.issue41808@roundup.psfhosted.org> Terry J. Reedy added the comment: The 3.9 copy (only) of What'New 3.9, line 882 has duplicated words 'deprecated deprecated'. I made a branch off of updated 3.9 to fix this and pushed to my fork, but github repeated refuses to make a PR (against 3.9), giving me the unicorn page instead. https://github.com/terryjreedy/cpython/tree/3.9-dedup If this were fixed, the two copies would be identical. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 21:57:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 01:57:13 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1600394233.0.0.576936728858.issue40939@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 5a8364780b7e881385f6fabcf072d599e80f51b8 by Terry Jan Reedy in branch 'master': bpo-41808: Add What's New 3.9 entry missing from master (#22294) https://github.com/python/cpython/commit/5a8364780b7e881385f6fabcf072d599e80f51b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 17 21:57:13 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 01:57:13 +0000 Subject: [issue41808] Synchronize What's New in 3.9 master and 3.9 copies In-Reply-To: <1600390949.09.0.806445771766.issue41808@roundup.psfhosted.org> Message-ID: <1600394233.12.0.122578621688.issue41808@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 5a8364780b7e881385f6fabcf072d599e80f51b8 by Terry Jan Reedy in branch 'master': bpo-41808: Add What's New 3.9 entry missing from master (#22294) https://github.com/python/cpython/commit/5a8364780b7e881385f6fabcf072d599e80f51b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 00:10:00 2020 From: report at bugs.python.org (Bug Reporter) Date: Fri, 18 Sep 2020 04:10:00 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600402200.12.0.722443035977.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: I confirm that Tal Einat's workaround also works. ---------- versions: -Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 01:41:01 2020 From: report at bugs.python.org (Radim Novotny) Date: Fri, 18 Sep 2020 05:41:01 +0000 Subject: [issue41791] mimetypes module does not recognize jp2 type In-Reply-To: <1600144307.97.0.591745605568.issue41791@roundup.psfhosted.org> Message-ID: <1600407661.84.0.469746434633.issue41791@roundup.psfhosted.org> Radim Novotny added the comment: Hi Andr?s, tried again and the difference is between 3.7.4 and 3.7.5 The jp2 mimetype is read from /etc/apache2/mime.types (see knownfiles in mimetypes.py) so the mime type does not have to be in the mimetypes.py hardcoded, but in version 3.7.5 it stopped working. I think it's because of using _types_map_default instead of types_map in some places. Since jp2 is an official mime type it should be added to the list but I also think we should try to identify the issue with _types_map_default. Seems to be related to https://bugs.python.org/issue4963 I will have look if I can find out what was changed and why. Cheers, Radim ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 01:51:47 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 18 Sep 2020 05:51:47 +0000 Subject: [issue25739] Add PAYLOAD_TOO_LARGE / URI_TOO_LONG (new name in RFC 7231) In-Reply-To: <1448584204.43.0.941086994375.issue25739@psf.upfronthosting.co.za> Message-ID: <1600408307.75.0.336953196344.issue25739@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 2.0 -> 3.0 pull_requests: +21348 pull_request: https://github.com/python/cpython/pull/22295 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 02:42:26 2020 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Fri, 18 Sep 2020 06:42:26 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already In-Reply-To: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> Message-ID: <1600411346.57.0.383151151975.issue41800@roundup.psfhosted.org> Jurko Gospodneti? added the comment: Hi Steve, Thanks for a quick reply. > Yeah, this whole issue is basically because Burn (our installer tool) won't do > per-machine bundle registration even when it's only installing per-machine > packages. So the install block that it would normally throw up fails if you > use a different user account to install it the second time. Hmmm, I'm not sure this is exactly the case as this seems to happen even when we install Python using the `systemuser` user account initially and then rerun the installer using that same user account. Might I suggest adding this information to some 'known defects/limitations' Python documentation though? Together with more details on what it implies and how to deal with it? The current behaviour definitely does not seem like something one would expect as a user. > > (Python gets installed as a step in one of our installers) > > I'm intrigued by this - if Python is a dependency of your application, it's > better to repackage it yourself and install to your own directory. The > installer is basically there for end-users, but if you're not doing an > end-user kind of install there's really nothing gained. > > This whole scenario is fairly under-developed though. It comes up quite > infrequently, so we don't have any really convenient instructions on how to go > about it. Doesn't mean we can't help, but because we don't have a clear idea > of what you may be trying to achieve, we'd like to hear about it before > telling you how to approach this kind of thing. Our thinking was that if Python already wrapped up all of its installation logic to 'work correctly' (clean install, upgrade, uninstall, detecting files already in use, updating any relevant registry settings or globally installed files, etc.), we might as well use that, so we run the installer in silent mode and just process its exit code for stuff like errors, reboot required, etc. Logically the same process that Microsoft gives as the official way to install its Visual Studio run-time libraries (not saying that process is not filled with its own caveats :-D). We can of course take the installed Python distribution folder content and package that up in our installer directly, and that would avoid the official Python installer problems. We were hoping to avoid the problem of manually updating such a repackaging, e.g. Python deciding to add some more data to the Windows registry, some add-on installation copes with that and now requires that information to work correctly as well so now we have to debug/detect that also and tweak our installer to do the same, deal with any related version updating logic, etc. By embedding your installer, our 'Python version upgrade' process basically becomes: - pop the new Python installer into our 3rdparty library archive - update the used Python version configuration - run the installer build So if this bad installer behaviour is not going to get fixed, I guess we'll go and play with getting this working using Python's Windows embeddable zip file distribution instead. All suggestions welcome. :-) Thanks again! Best regards, Jurko Gospodneti? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:01:35 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 07:01:35 +0000 Subject: [issue41808] Synchronize What's New in 3.9 master and 3.9 copies In-Reply-To: <1600390949.09.0.806445771766.issue41808@roundup.psfhosted.org> Message-ID: <1600412495.75.0.586994548992.issue41808@roundup.psfhosted.org> Serhiy Storchaka added the comment: I have backported and merged deduplication changes manually. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:08:25 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 07:08:25 +0000 Subject: [issue33561] Add .tostring() method to xml.etree.ElementTree.Element In-Reply-To: <1526577225.21.0.682650639539.issue33561@psf.upfronthosting.co.za> Message-ID: <1600412905.79.0.410636465958.issue33561@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:10:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 07:10:24 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600413024.49.0.260812558625.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8af239eacfcf52e4e0e2b0223e7cea4672309483 by Victor Stinner in branch 'master': bpo-41762: Fix usage of productionlist markup in the doc (GH-22281) https://github.com/python/cpython/commit/8af239eacfcf52e4e0e2b0223e7cea4672309483 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:10:32 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 18 Sep 2020 07:10:32 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600413032.9.0.406704976208.issue41762@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +21349 pull_request: https://github.com/python/cpython/pull/22300 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:12:06 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 18 Sep 2020 07:12:06 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600413126.53.0.425020812143.issue41762@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21350 pull_request: https://github.com/python/cpython/pull/22301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:14:50 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 07:14:50 +0000 Subject: [issue29099] sqlite3 timestamp converter cannot handle timezone In-Reply-To: <1482966269.67.0.620298847284.issue29099@psf.upfronthosting.co.za> Message-ID: <1600413290.14.0.223007344791.issue29099@roundup.psfhosted.org> Serhiy Storchaka added the comment: Xiang Zhang, was there a discussion on Python-Dev? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:27:31 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 18 Sep 2020 07:27:31 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600414051.98.0.427169978091.issue41762@roundup.psfhosted.org> miss-islington added the comment: New changeset c053402927d36f9f26160ded24999bf5109ea5eb by Miss Islington (bot) in branch '3.9': bpo-41762: Fix usage of productionlist markup in the doc (GH-22281) https://github.com/python/cpython/commit/c053402927d36f9f26160ded24999bf5109ea5eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:36:31 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 07:36:31 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600414591.46.0.349124305589.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: I would be fine even with a generator-specific API as a first step, for simplicity. But the end goal is to support all generator-like objects. It is much more useful for end users and does not have drawbacks. Enum for result seems not necessary (other functions with three-state result just return -1, 0 or 1), but if other core developers want it -- OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:39:36 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 07:39:36 +0000 Subject: [issue38981] better name for re.error Exception class. In-Reply-To: <1575564967.92.0.182367459899.issue38981@roundup.psfhosted.org> Message-ID: <1600414776.13.0.962500286641.issue38981@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- type: security -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:41:55 2020 From: report at bugs.python.org (honglei jiang) Date: Fri, 18 Sep 2020 07:41:55 +0000 Subject: [issue40754] Test installers before releasing (ModuleNotFoundErrors) In-Reply-To: <1590324430.61.0.117510991737.issue40754@roundup.psfhosted.org> Message-ID: <1600414915.42.0.0580615186109.issue40754@roundup.psfhosted.org> honglei jiang added the comment: Still missing _testinternalcapi module for Python3.9rc2 like https://bugs.python.org/issue36635 C:\Users\Admin>c:\python39\python.exe -m test test_deque 0:00:00 Run tests sequentially 0:00:00 [1/1] test_deque test test_deque failed -- Traceback (most recent call last): File "c:\python39\lib\test\test_deque.py", line 781, in test_sizeof check(deque(), basesize + blocksize) File "c:\python39\lib\test\support\__init__.py", line 1484, in check_sizeof import _testinternalcapi ModuleNotFoundError: No module named '_testinternalcapi' test_deque failed == Tests result: FAILURE == 1 test failed: test_deque Total duration: 1.1 sec Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:49:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 07:49:41 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600415381.08.0.401873530649.issue41784@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oh, would not be worth to add Py_buffer to the limited API? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 03:58:02 2020 From: report at bugs.python.org (Mertcan) Date: Fri, 18 Sep 2020 07:58:02 +0000 Subject: [issue41783] Standard Color class In-Reply-To: <1600101879.5.0.216501247063.issue41783@roundup.psfhosted.org> Message-ID: <1600415882.91.0.367349414657.issue41783@roundup.psfhosted.org> Change by Mertcan : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 04:02:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 08:02:47 +0000 Subject: [issue41808] Synchronize What's New in 3.9 master and 3.9 copies In-Reply-To: <1600390949.09.0.806445771766.issue41808@roundup.psfhosted.org> Message-ID: <1600416167.95.0.538859422025.issue41808@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 04:31:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 08:31:32 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600417892.28.0.833982839131.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c5cddc17b5c046bb22072c1cf58b898c7ab92e07 by Miss Islington (bot) in branch '3.8': bpo-41762: Fix usage of productionlist markup in the doc (GH-22281) (GH-22300) https://github.com/python/cpython/commit/c5cddc17b5c046bb22072c1cf58b898c7ab92e07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 04:32:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 08:32:20 +0000 Subject: [issue41762] Documentation job fails on CIs: duplicate token description of format_spec In-Reply-To: <1599821124.33.0.316149667628.issue41762@roundup.psfhosted.org> Message-ID: <1600417940.44.0.404947726534.issue41762@roundup.psfhosted.org> STINNER Victor added the comment: I fixed the issue. See bpo-35293 for deprecation warnings. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 04:58:18 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 18 Sep 2020 08:58:18 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600419498.06.0.126268923891.issue41756@roundup.psfhosted.org> Stefan Behnel added the comment: I would also have preferred a more type specific function, but yeah, as long as the types for which the function would normally be used are special cased early enough in the implementation, it makes no big difference. Fine with me, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:11:10 2020 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 18 Sep 2020 09:11:10 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600420270.48.0.145447978088.issue41756@roundup.psfhosted.org> Stefan Behnel added the comment: BTW, just to give this a house number, I remember having measured a performance improvement of up to 70% at some point when switching from "generators always raise a StopIteration at the end" to "generators just return NULL" in Cython. For short-running generators and coroutines, this can make a big difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:22:44 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 18 Sep 2020 09:22:44 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600420964.8.0.212704878795.issue35293@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 6595cb0af4c51c0381c233b97884fe916a4ddd35 by Dong-hee Na in branch 'master': bpo-35293: Remove RemovedInSphinx40Warning (GH-22198) https://github.com/python/cpython/commit/6595cb0af4c51c0381c233b97884fe916a4ddd35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:22:59 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 18 Sep 2020 09:22:59 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600420979.21.0.866963126977.issue35293@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21352 pull_request: https://github.com/python/cpython/pull/22303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:22:51 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 18 Sep 2020 09:22:51 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600420971.23.0.191409606375.issue35293@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +21351 pull_request: https://github.com/python/cpython/pull/22302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:31:37 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 18 Sep 2020 09:31:37 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600421497.63.0.774012717098.issue35293@roundup.psfhosted.org> miss-islington added the comment: New changeset b7cdea8f087699aaa6486ce5a4f6e5a143dc355e by Miss Islington (bot) in branch '3.8': bpo-35293: Remove RemovedInSphinx40Warning (GH-22198) https://github.com/python/cpython/commit/b7cdea8f087699aaa6486ce5a4f6e5a143dc355e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:37:17 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 09:37:17 +0000 Subject: [issue37575] Python Documentation on strings (tutorial section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1600421837.22.0.608655931547.issue37575@roundup.psfhosted.org> Irit Katriel added the comment: I think this issue can be closed (not a bug). ---------- nosy: +iritkatriel status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:38:46 2020 From: report at bugs.python.org (miss-islington) Date: Fri, 18 Sep 2020 09:38:46 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600421926.98.0.915322529416.issue35293@roundup.psfhosted.org> miss-islington added the comment: New changeset f3e0eceff6207d5072befeef0e1ec195c3e2b0ab by Miss Islington (bot) in branch '3.9': bpo-35293: Remove RemovedInSphinx40Warning (GH-22198) https://github.com/python/cpython/commit/f3e0eceff6207d5072befeef0e1ec195c3e2b0ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 05:44:16 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 09:44:16 +0000 Subject: [issue23510] multiprocessing bug SyncManager and 'with' In-Reply-To: <1424784474.12.0.228863603483.issue23510@psf.upfronthosting.co.za> Message-ID: <1600422256.6.0.245998292369.issue23510@roundup.psfhosted.org> Irit Katriel added the comment: I don't see this problem in python 3.10. Is it a python 2-only issue, and if so then can this issue be closed? Running Release|Win32 interpreter... Python 3.10.0a0 (heads/bpo-24792-dirty:1e183f4de5, Sep 14 2020, 15:53:51) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing.managers >>> with multiprocessing.managers.SyncManager() as s: ... print("here") ... here >>> ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 06:56:44 2020 From: report at bugs.python.org (Guilherme Salgado) Date: Fri, 18 Sep 2020 10:56:44 +0000 Subject: [issue30083] Asyncio: GeneratorExit + strange exception In-Reply-To: <1492366722.76.0.0689582979435.issue30083@psf.upfronthosting.co.za> Message-ID: <1600426604.68.0.755964155928.issue30083@roundup.psfhosted.org> Guilherme Salgado added the comment: I've also been affected by this and found that if you use asyncio.run() the coroutine is interrupted with a CancelledError as you'd expect. The following script shows that ======================= import asyncio async def handle_connection(reader, writer): try: await reader.readexactly(42) except BaseException as err: print('Interesting: %r.' % err) raise finally: writer.close() async def main(): listener = await asyncio.start_server(handle_connection, '127.0.0.1', 8888) try: async with listener: await listener.serve_forever() except KeyboardInterrupt: print('KeyboardInterrupt') asyncio.run(main()) ============================================= ---------- nosy: +salgado _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 07:05:45 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 18 Sep 2020 11:05:45 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600427145.12.0.87412380163.issue35293@roundup.psfhosted.org> Dong-hee Na added the comment: /home/travis/virtualenv/python3.6.10/lib/python3.6/site-packages/sphinx/util/nodes.py:151: FutureWarning: The iterable returned by Node.traverse() https://travis-ci.com/github/python/cpython/jobs/386971271 The issue is still left, I am going to investigate this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 07:35:09 2020 From: report at bugs.python.org (Alex Gaynor) Date: Fri, 18 Sep 2020 11:35:09 +0000 Subject: [issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384) In-Reply-To: <1600112223.54.0.368726029107.issue41784@roundup.psfhosted.org> Message-ID: <1600428909.81.0.0579563226811.issue41784@roundup.psfhosted.org> Alex Gaynor added the comment: It's a big project I think :-) Py_Buffer is allocated on the stack, so either we'd have to agree to never change it's ABI (size, alignment, etc.) or we'd need to completely change the interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 07:37:07 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 11:37:07 +0000 Subject: [issue1690840] xmlrpclib methods submit call on __str__, __repr__ Message-ID: <1600429027.78.0.93805652863.issue1690840@roundup.psfhosted.org> Irit Katriel added the comment: Python 3.10.0a0 (heads/master:6595cb0af4, Sep 18 2020, 12:33:44) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import xmlrpc.client >>> s = xmlrpc.client.ServerProxy("http://google.com") >>> print(s.somecall) >>> ---------- nosy: +iritkatriel status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 07:37:13 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 11:37:13 +0000 Subject: [issue1690840] xmlrpclib methods submit call on __str__, __repr__ Message-ID: <1600429033.05.0.698997738053.issue1690840@roundup.psfhosted.org> Irit Katriel added the comment: Since this was fixed in python 3, and the backport to python 2 is no longer relevant, I think this issue can now be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 07:40:54 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 11:40:54 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600429254.42.0.0108751243698.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: We introduced _PyObject_LookupAttr() and _PyObject_GetMethod() for similar purposes. And they have similar signatures. Although they all are private. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 07:43:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Sep 2020 11:43:26 +0000 Subject: [issue1690840] xmlrpclib methods submit call on __str__, __repr__ Message-ID: <1600429406.27.0.597200472289.issue1690840@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: fixed -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 08:00:41 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 12:00:41 +0000 Subject: [issue28964] AST literal_eval exceptions provide no information about line number In-Reply-To: <1481665664.26.0.256194535172.issue28964@psf.upfronthosting.co.za> Message-ID: <1600430441.77.0.562891143192.issue28964@roundup.psfhosted.org> Irit Katriel added the comment: Steve, are you planning to work on porting this patch to github? Note: it would need a unit test, and also node is not guaranteed to have a lineno field. ---------- nosy: +iritkatriel status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 08:04:38 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 12:04:38 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1600430678.56.0.670838874715.issue10117@roundup.psfhosted.org> Irit Katriel added the comment: Since there won't be a python 2.7 backport, should this issue be closed? ---------- nosy: +iritkatriel status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 08:05:05 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 18 Sep 2020 12:05:05 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600430705.13.0.246862628455.issue35293@roundup.psfhosted.org> Change by Dong-hee Na : ---------- assignee: -> corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 08:22:11 2020 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 18 Sep 2020 12:22:11 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1600402200.12.0.722443035977.issue41561@roundup.psfhosted.org> Message-ID: Skip Montanaro added the comment: > > I confirm that Tal Einat's workaround also works. > Should workarounds be required to successfully run the test suite? I routinely unset PYTHONSTARTUP, but that's because I can and sometimes do weird things to support interactive use. It concerns me a bit that any system settings need to be overridden. That suggests to me that it will eventually bite users at runtime. > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 08:27:11 2020 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Fri, 18 Sep 2020 12:27:11 +0000 Subject: [issue41791] mimetypes module does not recognize jp2 type In-Reply-To: <1600144307.97.0.591745605568.issue41791@roundup.psfhosted.org> Message-ID: <1600432031.37.0.729287573429.issue41791@roundup.psfhosted.org> Andr?s Delfino added the comment: Nice debugging! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 08:58:23 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 12:58:23 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1600433903.36.0.16484866442.issue10117@roundup.psfhosted.org> STINNER Victor added the comment: > Committed in r85695. Leaving open to discuss whether anything can/should be done for the case when reindent acts as an stdin to stdout filter. Also, what is the policy on backporting Tools' bug fixes? This is the commit: commit 4a98e3b6d06e5477e5d62f18e85056cbb7253f98 Author: Alexander Belopolsky Date: Mon Oct 18 14:43:38 2010 +0000 Issue #10117: Tools/scripts/reindent.py now accepts source files that use encoding other than ASCII or UTF-8. Source encoding is preserved when reindented code is written to a file. > Since there won't be a python 2.7 backport, should this issue be closed? Right, 2.7 branch is closed. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 09:08:36 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 18 Sep 2020 13:08:36 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600434516.35.0.376300072612.issue35293@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +21353 pull_request: https://github.com/python/cpython/pull/22305 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 09:08:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 13:08:47 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600434527.81.0.862933077457.issue35293@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21354 pull_request: https://github.com/python/cpython/pull/22306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 09:16:26 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 13:16:26 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600434986.5.0.905267909256.issue35293@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21355 pull_request: https://github.com/python/cpython/pull/22307 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 09:50:35 2020 From: report at bugs.python.org (Bug Reporter) Date: Fri, 18 Sep 2020 13:50:35 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600437035.47.0.616461722196.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: I think it is not a real solution, just a workaround. What do you think the solution should be? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 09:57:56 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 18 Sep 2020 13:57:56 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600437476.99.0.258408789142.issue41561@roundup.psfhosted.org> Christian Heimes added the comment: Could you please modify the test case to check for TLS 1.0 and run it Ubuntu? @requires_minimum_version @requires_tls_version('TLSv1_2') @requires_tls_version('TLSv1') def test_min_max_version_mismatch(self): For Python 3.10 I'm planning to drop support for TLS 1.1 and earlier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:08:37 2020 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 18 Sep 2020 14:08:37 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1600437476.99.0.258408789142.issue41561@roundup.psfhosted.org> Message-ID: Skip Montanaro added the comment: > Could you please modify the test case to check for TLS 1.0 and run it Ubuntu? > > @requires_minimum_version > @requires_tls_version('TLSv1_2') > @requires_tls_version('TLSv1') > def test_min_max_version_mismatch(self): Confirmed. test_min_max_version_mismatch passes with those three decorators. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:15:35 2020 From: report at bugs.python.org (Christian Heimes) Date: Fri, 18 Sep 2020 14:15:35 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600438535.36.0.256898423949.issue41561@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +21356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22308 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:23:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 14:23:22 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600439002.25.0.471843268346.issue35293@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8394500cca56490cc347604d39ca40abcdce46c3 by Victor Stinner in branch 'master': bpo-35293: Travis CI uses "make venv" for the doc (GH-22307) https://github.com/python/cpython/commit/8394500cca56490cc347604d39ca40abcdce46c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:24:23 2020 From: report at bugs.python.org (musiquegraeme) Date: Fri, 18 Sep 2020 14:24:23 +0000 Subject: [issue41809] finding file attributes in Windows seems to fail Message-ID: <1600439063.01.0.806947932317.issue41809@roundup.psfhosted.org> New submission from musiquegraeme : When I try this in shell os.stat('MyFile2.iso').st_file_attributes I get a value - 32 When I try this in IDLE print (os.stat('MyFile2.iso').st_file_attributes) I get the error message. AttributeError: 'os.stat_result' object has no attribute 'st_file_atributes' ---------- assignee: terry.reedy components: IDLE messages: 377119 nosy: musiquegraeme, terry.reedy priority: normal severity: normal status: open title: finding file attributes in Windows seems to fail type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:27:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 14:27:32 +0000 Subject: [issue41809] finding file attributes in Windows seems to fail In-Reply-To: <1600439063.01.0.806947932317.issue41809@roundup.psfhosted.org> Message-ID: <1600439252.18.0.23791067561.issue41809@roundup.psfhosted.org> STINNER Victor added the comment: What is the Python version of IDLE? Try: >>> import sys; sys.version '3.8.5 (default, Aug 12 2020, 00:00:00) \n[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)]' ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:28:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 14:28:03 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600439283.17.0.308351587656.issue35293@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21357 pull_request: https://github.com/python/cpython/pull/22309 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:31:38 2020 From: report at bugs.python.org (musiquegraeme) Date: Fri, 18 Sep 2020 14:31:38 +0000 Subject: [issue41809] finding file attributes in Windows seems to fail In-Reply-To: <1600439063.01.0.806947932317.issue41809@roundup.psfhosted.org> Message-ID: <1600439498.69.0.0714955468073.issue41809@roundup.psfhosted.org> musiquegraeme added the comment: I got '3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:53:50 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 14:53:50 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600440830.42.0.127341147215.issue35293@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9e73cac173e5e9010bd18c8334fffeee1cade3a4 by Victor Stinner in branch '3.9': bpo-35293: Travis CI uses "make venv" for the doc (GH-22307) (GH-22309) https://github.com/python/cpython/commit/9e73cac173e5e9010bd18c8334fffeee1cade3a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:52:37 2020 From: report at bugs.python.org (E. Paine) Date: Fri, 18 Sep 2020 14:52:37 +0000 Subject: [issue41809] finding file attributes in Windows seems to fail In-Reply-To: <1600439063.01.0.806947932317.issue41809@roundup.psfhosted.org> Message-ID: <1600440757.31.0.840906497858.issue41809@roundup.psfhosted.org> E. Paine added the comment: Thank you for reporting this. Please could you double check what you ran because your code says 'st_file_attributes' but the error says 'st_file_atributes' (missing a t in attributes). ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 10:58:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 14:58:45 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600441125.62.0.521692513316.issue35293@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21358 pull_request: https://github.com/python/cpython/pull/22310 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 11:07:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Sep 2020 15:07:41 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600441661.84.0.629485354063.issue35293@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 11:15:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 15:15:10 +0000 Subject: [issue24078] inspect.getsourcelines ignores context and returns wrong line # In-Reply-To: <1430348672.59.0.934013457033.issue24078@psf.upfronthosting.co.za> Message-ID: <1600442110.28.0.594319820197.issue24078@roundup.psfhosted.org> Irit Katriel added the comment: I think this was fixed under issue35113. ---------- nosy: +iritkatriel, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 11:20:07 2020 From: report at bugs.python.org (jeanotlapin) Date: Fri, 18 Sep 2020 15:20:07 +0000 Subject: [issue36207] robotsparser deny all with some rules In-Reply-To: <1551865321.24.0.407834320039.issue36207@roundup.psfhosted.org> Message-ID: <1600442407.82.0.51530298615.issue36207@roundup.psfhosted.org> jeanotlapin added the comment: Bonjour, j'ai rencontr? le m?me soucis. J'ai essay? de le faire fonctionner en vain. J'ai tent? de faire crawler par les robots la page de notre agence de communication ? Montpellier https://www.monagencedecommunication.com/agence/montpellier/ mais cela n'a pas visiblement pas march?... ---------- nosy: +jeanotlapin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 11:21:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 15:21:33 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600442493.59.0.80823102842.issue35293@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3acc403f21642f1e916f035abf24c3fb81495b3c by Victor Stinner in branch '3.8': bpo-35293: Travis CI uses "make venv" for the doc (GH-22307) (GH-22309) (GH-22310) https://github.com/python/cpython/commit/3acc403f21642f1e916f035abf24c3fb81495b3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 11:34:42 2020 From: report at bugs.python.org (Zachary Ware) Date: Fri, 18 Sep 2020 15:34:42 +0000 Subject: [issue37575] Python Documentation on strings (tutorial section 3.1.2.) In-Reply-To: <1562964607.44.0.971161139684.issue37575@roundup.psfhosted.org> Message-ID: <1600443282.16.0.412440778979.issue37575@roundup.psfhosted.org> Change by Zachary Ware : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 11:37:22 2020 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Sep 2020 15:37:22 +0000 Subject: [issue35293] make doctest (Sphinx) emits a lot of warnings In-Reply-To: <1542835631.23.0.788709270274.issue35293@psf.upfronthosting.co.za> Message-ID: <1600443442.72.0.0149583613469.issue35293@roundup.psfhosted.org> STINNER Victor added the comment: Building the documentation of Python 3.8, 3.9 and 3.10 don't produce warnings anymore, I close the issue. I created https://github.com/python/docsbuild-scripts/issues/95 "Update Sphinx to 2.4.4". ---------- components: +Documentation resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 12:03:49 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 16:03:49 +0000 Subject: [issue29108] Documentation: Clarify role of callback with map_async In-Reply-To: <1483048651.39.0.165070292977.issue29108@psf.upfronthosting.co.za> Message-ID: <1600445029.97.0.261362724347.issue29108@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python title: Python 3.6.0 multiprocessing map_async callback -> Documentation: Clarify role of callback with map_async _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 12:36:49 2020 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 18 Sep 2020 16:36:49 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600447009.99.0.408013783153.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > I would also have preferred a more type specific function, but yeah, as long as the types for which the function would normally be used are special cased early enough in the implementation, it makes no big difference. Maybe add two API funcs: PyGen_Send (specific to generators & coroutines) and PyIter_Send? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 13:30:36 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 17:30:36 +0000 Subject: [issue15128] inspect raises exception when frames are misleading about source line numbers In-Reply-To: <1340301668.18.0.785702018205.issue15128@psf.upfronthosting.co.za> Message-ID: <1600450236.64.0.563814925448.issue15128@roundup.psfhosted.org> Irit Katriel added the comment: I think this was fixed by now: I changed the script to print the result: ****************************************** import inspect, sys # /etc/hostname is one line, but our source has multiple lines code = compile('\n\n\n1/0', '/etc/hostname', 'exec') try: exec(code, {}) except Exception: tb = sys.exc_info()[2] else: assert False, "unreachable, exec should always raise exception" # this fails with an IndexError print(inspect.getinnerframes(tb)) ****************************************** and I got this output: C:\Users\User\src\cpython>python.bat x.py Running Release|Win32 interpreter... [FrameInfo(frame=>, filename='C:\\Users\\User\\src\\cpython\\x.py', lineno=7, function='', code_context=[' exec(code, {})\n'], index=0), FrameInfo(frame=>, filename='/etc/hostname', lineno=4, function='', code_context=None, index=None)] ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 13:43:08 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 17:43:08 +0000 Subject: [issue11414] Add import fix for email.Message In-Reply-To: <1299428963.38.0.740283733384.issue11414@psf.upfronthosting.co.za> Message-ID: <1600450988.87.0.80930673799.issue11414@roundup.psfhosted.org> Irit Katriel added the comment: It this still relevant? Presumably anyone who was going to be broken has been broken by now and moved to lower case message. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 13:44:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 17:44:24 +0000 Subject: [issue11414] Add import fix for email.Message In-Reply-To: <1299428963.38.0.740283733384.issue11414@psf.upfronthosting.co.za> Message-ID: <1600451064.55.0.912212075008.issue11414@roundup.psfhosted.org> Irit Katriel added the comment: Ah sorry this is about adding a 2to3 fixer. I thought the request was to put Message back in __all__. A fixer may still be relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 13:55:09 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 18 Sep 2020 17:55:09 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600451709.2.0.551823492177.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: Sounds like a good middleground to start: add ``PySendResult `` and `PySendResult PyGen_Send(PyGenObject*, PyObject* PyObject**)` specific to generators and coroutines. Subsequent changes could introduce `PySendResult PyIter_Send(PyObject*, PyObject*, PyObject**)` that would be more generic (call tp_next, invoke "send" or maybe in the future use dedicated slot for "send" operator so i.e. asyncio.Future or Cython coroutines could benefit from the same optimization) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 14:12:44 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 18:12:44 +0000 Subject: [issue11414] Add import fix for email.Message In-Reply-To: <1299428963.38.0.740283733384.issue11414@psf.upfronthosting.co.za> Message-ID: <1600452764.19.0.382246460069.issue11414@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +21359 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 14:13:10 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 18:13:10 +0000 Subject: [issue11414] Add import fix for email.Message In-Reply-To: <1299428963.38.0.740283733384.issue11414@psf.upfronthosting.co.za> Message-ID: <1600452790.66.0.369954162245.issue11414@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> behavior versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 14:34:02 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 18:34:02 +0000 Subject: [issue29107] traceback module incorrectly formats args-less syntax errors In-Reply-To: <1483035828.75.0.241561980745.issue29107@psf.upfronthosting.co.za> Message-ID: <1600454042.57.0.0190103423686.issue29107@roundup.psfhosted.org> Irit Katriel added the comment: As stated above, this has been fixed in python 3: ********************************************************** C:\Users\User\src\cpython>type x.py def f(x): global x C:\Users\User\src\cpython>python.bat Running Release|Win32 interpreter... Python 3.10.0a0 (heads/bpo11414-dirty:6595cb0af4, Sep 18 2020, 19:01:13) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import traceback >>> import x Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython\x.py", line 2 global x ^ SyntaxError: name 'x' is parameter and global >>> try: ... import x ... except: ... traceback.print_exc() ... Traceback (most recent call last): File "", line 2, in File "C:\Users\User\src\cpython\x.py", line 2 global x ^ SyntaxError: name 'x' is parameter and global >>> ********************************************************** >>> e = SyntaxError("some message", ("myfile.py", None, None, None)) >>> raise e Traceback (most recent call last): File "", line 1, in SyntaxError: some message (myfile.py) >>> try: ... raise e ... except: ... traceback.print_exc() ... Traceback (most recent call last): File "", line 2, in File "", line 2, in File "", line 1, in File "myfile.py", line None SyntaxError: some message ********************************************************** >>> e = SyntaxError("some message", ("myfile.py", 3, 10, "hello")) >>> raise r Traceback (most recent call last): File "", line 1, in NameError: name 'r' is not defined >>> raise e Traceback (most recent call last): File "", line 1, in File "myfile.py", line 3 hello ^ SyntaxError: some message >>> try: ... raise e ... except: ... traceback.print_exc() ... Traceback (most recent call last): File "", line 2, in File "", line 1, in File "myfile.py", line 3 hello ^ SyntaxError: some message ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 14:34:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 18:34:42 +0000 Subject: [issue29107] traceback module incorrectly formats args-less syntax errors In-Reply-To: <1483035828.75.0.241561980745.issue29107@psf.upfronthosting.co.za> Message-ID: <1600454082.84.0.697836619143.issue29107@roundup.psfhosted.org> Irit Katriel added the comment: Since this is a python 2-only issue, I think this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 15:29:00 2020 From: report at bugs.python.org (Bas van Beek) Date: Fri, 18 Sep 2020 19:29:00 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing Message-ID: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> New submission from Bas van Beek : `Ellipsis` is one of the few builtin objects whose type is not exposed via the `types` module. This is not really an issue during runtime, as you can always call `type(Ellipsis)`, but for the purpose of typing it is detrimental; the lack of suitable type means that it is impossible to properly annotate a function which takes or returns `Ellipsis` (unless one is willing to resort to the use of non-public types: https://github.com/python/typeshed/issues/3556). In order to resolve this issue I propose to reintroduce `types.EllipsisType`. This should be a fairly simple process, so if there are no objections I'd be willing to give it a shot. ---------- components: Library (Lib) messages: 377135 nosy: BvB93 priority: normal severity: normal status: open title: Consider reintroducing `types.EllipsisType` for the sake of typing type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 16:13:43 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 18 Sep 2020 20:13:43 +0000 Subject: [issue29107] traceback module incorrectly formats args-less syntax errors In-Reply-To: <1483035828.75.0.241561980745.issue29107@psf.upfronthosting.co.za> Message-ID: <1600460023.53.0.593811681306.issue29107@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 16:35:05 2020 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 18 Sep 2020 20:35:05 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600461305.32.0.401064774911.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > Sounds like a good middleground to start: add ``PySendResult `` and `PySendResult PyGen_Send(PyGenObject*, PyObject* PyObject**)` specific to generators and coroutines. Yes, it seems that everybody agreed on that. I can give the PR another review -- is it ready? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 16:38:41 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Fri, 18 Sep 2020 20:38:41 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600461521.74.0.479269715639.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: Yes, it should be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 16:39:10 2020 From: report at bugs.python.org (Christoph Zwerschke) Date: Fri, 18 Sep 2020 20:39:10 +0000 Subject: [issue18319] gettext() cannot find translations with plural forms In-Reply-To: <1372373603.42.0.596981858746.issue18319@psf.upfronthosting.co.za> Message-ID: <1600461550.37.0.950760510169.issue18319@roundup.psfhosted.org> Change by Christoph Zwerschke : ---------- nosy: +cito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 16:41:44 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 20:41:44 +0000 Subject: [issue41809] finding file attributes in Windows seems to fail In-Reply-To: <1600439063.01.0.806947932317.issue41809@roundup.psfhosted.org> Message-ID: <1600461704.65.0.901313808583.issue41809@roundup.psfhosted.org> Terry J. Reedy added the comment: I am closing this report because 1) it appears to be a result of a typo; 2) os.stat works fine for me (also on Windows); and 3) I am 99.99% sure that IDLE does not delete user code object attributes. If a system has two files with the same name in two different directories and one manages to run python twice with the different directories as current directory, so that the same name referred to the two different files, then os.stat might return different values for particular attributes. But IDLE is not Python. It is run by some python.exe and it sends user code to the same python.exe for execution (with exec()). So running code with IDLE cannot delete the attributes of objects created by user code. (musiquegrame), you can still post the result of checking. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 17:00:59 2020 From: report at bugs.python.org (Tal Einat) Date: Fri, 18 Sep 2020 21:00:59 +0000 Subject: [issue40049] tarfile cannot extract from stdin In-Reply-To: <1584978858.02.0.829307540722.issue40049@roundup.psfhosted.org> Message-ID: <1600462859.01.0.529247840695.issue40049@roundup.psfhosted.org> Tal Einat added the comment: GNU tar (v1.30, Ubuntu 20.04) does indeed overwrite files with symlinks upon extracting, while both `ln -s` and `os.symlink` do not. Therefore I agree that the appropriate behavior would seem to be to overwrite this way, as in the attached PR. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 17:50:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 21:50:35 +0000 Subject: [issue41768] unittest.mock spec calls class properties In-Reply-To: <1599873024.24.0.929930382889.issue41768@roundup.psfhosted.org> Message-ID: <1600465835.17.0.458820364256.issue41768@roundup.psfhosted.org> Terry J. Reedy added the comment: Without lines numbers, I cannot test which of the two identical asserts failed. Either comments or msg arguments will differentiate. Nor can I run snippets from two different files. Here is a minimal reproducible self-contained code that demonstrates the claim (which I verified on 3.9 and current master). import unittest from unittest.mock import Mock class SomethingElse(object): def __init__(self): self._instance = None @property def instance(self): if not self._instance: self._instance = 'object' class Test(unittest.TestCase): def test_property_not_called_with_spec_mock(self): obj = SomethingElse() self.assertIsNone(obj._instance, msg='before') # before mock = Mock(spec=obj) self.assertIsNone(obj._instance, msg='after') # after unittest.main() ---------- nosy: +michael.foord, terry.reedy versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 18:12:09 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 22:12:09 +0000 Subject: [issue41769] Positional arguments with boolean actions behave differently In-Reply-To: <1599878288.06.0.921718987462.issue41769@roundup.psfhosted.org> Message-ID: <1600467129.59.0.200871672764.issue41769@roundup.psfhosted.org> Terry J. Reedy added the comment: You think the behavior is wrong. Does it disagree with the doc? If not, this is an design change (enhancement) issue limited to future version. If so, it might be a bug that can be backported. However, when I run the code on Windows with an argument f:\dev\3x>py -3.8 f:/python/a/tem3.py a b usage: tem3.py [-h] ... I do not get an error, but get the same usage message as without. Adding quotes on the command line makes no difference. ---------- nosy: +terry.reedy stage: -> test needed title: Positional arguments which use store boolean actions do not behave as other actions. -> Positional arguments with boolean actions behave differently _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 19:09:22 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Sep 2020 23:09:22 +0000 Subject: [issue41770] Import module doesn't updated In-Reply-To: <1599879614.84.0.25424318959.issue41770@roundup.psfhosted.org> Message-ID: <1600470562.39.0.424476919572.issue41770@roundup.psfhosted.org> Terry J. Reedy added the comment: I carefully redid your test, corrected, 3 times, and it works as expected. Win 10, 3.9.0rc2. >>> import a.tem3 as t >>> t.b Traceback (most recent call last): File "", line 1, in t.b AttributeError: module 'a.tem3' has no attribute 'b' # Add 'b = 2' to a/tem3.py and save. >>> import sys >>> del sys.modules['a.tem3'] >>> import a.tem3 as t >>> t.b 2 Without seeing exactly what you did and when, I can only guess that you imported a version of xxx without the 'b' binding. I once added it but *forgot to save* before re-importing. Note that dictionary deletion and importing are well tested operations, so that bugs in normal imports are very unlikely. If you really get a failure, there must be some relevant details that you have omitted, like importing from a remote system that is locally cached, with the local cache unchanged by editing the remote original. Or having an OS bug such that saving a file does not update the 'last changed' time. If you disagree with a closing, please request re-opening and give us a chance to reproduce and discuss first rather than doing so yourself. ---------- nosy: +terry.reedy -paul.moore, steve.dower, tim.golden, zach.ware resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 19:21:11 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 18 Sep 2020 23:21:11 +0000 Subject: [issue27139] Increased test coverage for statistics.median_grouped In-Reply-To: <1464446645.63.0.403096467331.issue27139@psf.upfronthosting.co.za> Message-ID: <1600471271.89.0.983531428457.issue27139@roundup.psfhosted.org> Irit Katriel added the comment: This issue can be closed - the added tests have been merged. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 20:02:03 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 00:02:03 +0000 Subject: [issue23833] email.header.Header folding modifies headers that include semi-colons In-Reply-To: <1427840786.4.0.777280344269.issue23833@psf.upfronthosting.co.za> Message-ID: <1600473723.73.0.535898273347.issue23833@roundup.psfhosted.org> Irit Katriel added the comment: David, if this was fixed in Python 3 as you say then this issue can be closed now. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 20:22:38 2020 From: report at bugs.python.org (Josh Bode) Date: Sat, 19 Sep 2020 00:22:38 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600474958.5.0.753353917511.issue41810@roundup.psfhosted.org> Change by Josh Bode : ---------- nosy: +joshbode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 20:24:12 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Sep 2020 00:24:12 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600475052.14.0.939743866059.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +21360 pull_request: https://github.com/python/cpython/pull/22315 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 20:55:02 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 19 Sep 2020 00:55:02 +0000 Subject: [issue40915] multiple problems with mmap.resize() in Windows In-Reply-To: <1591657683.26.0.992231826575.issue40915@roundup.psfhosted.org> Message-ID: <1600476902.97.0.654463212776.issue40915@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 21:36:28 2020 From: report at bugs.python.org (Bug Reporter) Date: Sat, 19 Sep 2020 01:36:28 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600479388.76.0.0817291984532.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: On my system, it still fails. Here is the content of modified Lib/test/test_ssl.py: 3827 @requires_minimum_version 3828 @requires_tls_version('TLSv1_2') 3829 @requires_tls_version('TLSv1') 3830 def test_min_max_version_mismatch(self): 3831 client_context, server_context, hostname = testing_context() 3832 # client 1.0, server 1.2 (mismatch) 3833 server_context.maximum_version = ssl.TLSVersion.TLSv1_2 3834 server_context.minimum_version = ssl.TLSVersion.TLSv1_2 3835 client_context.maximum_version = ssl.TLSVersion.TLSv1 3836 client_context.minimum_version = ssl.TLSVersion.TLSv1 3837 with ThreadedEchoServer(context=server_context) as server: 3838 with client_context.wrap_socket(socket.socket(), 3839 server_hostname=hostname) as s: 3840 with self.assertRaises(ssl.SSLError) as e: 3841 s.connect((HOST, server.port)) 3842 self.assertIn("alert", str(e.exception)) 3843 3844 @requires_minimum_version 3845 @requires_tls_version('SSLv3') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 21:38:46 2020 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 19 Sep 2020 01:38:46 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600479526.0.0.81899856754.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: New changeset 2b05361bf7cbbd76035206fd9befe87f37489f1e by Vladimir Matveev in branch 'master': bpo-41756: Introduce PyGen_Send C API (GH-22196) https://github.com/python/cpython/commit/2b05361bf7cbbd76035206fd9befe87f37489f1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 21:40:34 2020 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 19 Sep 2020 01:40:34 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600479634.06.0.0336756451339.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: Thanks, Vladimir! Also huge thanks to Mark, Serhiy, and Stefan. If there are any nits to fix let's do that in follow up PRs. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 18 21:40:55 2020 From: report at bugs.python.org (Bug Reporter) Date: Sat, 19 Sep 2020 01:40:55 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600479655.44.0.486954215939.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tar.xz ... ====================================================================== ERROR: test_protocol_tlsv1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1 server with various client options ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 217, in wrapper return func(*args, **kw) File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 3286, in test_protocol_tlsv1 try_protocol_combo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_TLSv1, 'TLSv1') File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 2780, in try_protocol_combo stats = server_params_test(client_context, server_context, File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 2695, in server_params_test s.connect((HOST, server.port)) File "/home/bugrep/Downloads/Python-3.8.5/Lib/ssl.py", line 1342, in connect self._real_connect(addr, False) File "/home/bugrep/Downloads/Python-3.8.5/Lib/ssl.py", line 1333, in _real_connect self.do_handshake() File "/home/bugrep/Downloads/Python-3.8.5/Lib/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL] internal error (_ssl.c:1123) ====================================================================== ERROR: test_protocol_tlsv1_1 (test.test_ssl.ThreadedTests) Connecting to a TLSv1.1 server with various client options. ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 217, in wrapper return func(*args, **kw) File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 3302, in test_protocol_tlsv1_1 try_protocol_combo(ssl.PROTOCOL_TLSv1_1, ssl.PROTOCOL_TLSv1_1, 'TLSv1.1') File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 2780, in try_protocol_combo stats = server_params_test(client_context, server_context, File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 2695, in server_params_test s.connect((HOST, server.port)) File "/home/bugrep/Downloads/Python-3.8.5/Lib/ssl.py", line 1342, in connect self._real_connect(addr, False) File "/home/bugrep/Downloads/Python-3.8.5/Lib/ssl.py", line 1333, in _real_connect self.do_handshake() File "/home/bugrep/Downloads/Python-3.8.5/Lib/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL] internal error (_ssl.c:1123) ====================================================================== FAIL: test_min_max_version_mismatch (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 217, in wrapper return func(*args, **kw) File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 217, in wrapper return func(*args, **kw) File "/home/bugrep/Downloads/Python-3.8.5/Lib/test/test_ssl.py", line 3842, in test_min_max_version_mismatch self.assertIn("alert", str(e.exception)) AssertionError: 'alert' not found in '[SSL: NO_PROTOCOLS_AVAILABLE] no protocols available (_ssl.c:1123)' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 00:31:43 2020 From: report at bugs.python.org (Joshua Root) Date: Sat, 19 Sep 2020 04:31:43 +0000 Subject: [issue41617] __builtin_bswap16 is used without checking it is supported In-Reply-To: <1598144567.0.0.176317601198.issue41617@roundup.psfhosted.org> Message-ID: <1600489903.99.0.472449465669.issue41617@roundup.psfhosted.org> Joshua Root added the comment: > I'm curious. Can I ask you on which platform do you use clang older than 3.2? Mac OS X 10.7 / Xcode 4.6.3. I'm not using it personally, but we have automated builds on that platform. Unfortunately the patch ultimately committed did not fix the build there. Clang reports its version as "Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)". __clang_major__ is 4 and __clang_minor__ is 2. Apple's versioning scheme is different to that of LLVM upstream, which is one reason why I preferred detecting features directly rather than inserting externally-derived knowledge about which versions provide which features. Apologies for not getting back to you about this sooner; the notifications appear to have gotten lost. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 01:18:22 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 19 Sep 2020 05:18:22 +0000 Subject: [issue24078] inspect.getsourcelines ignores context and returns wrong line # In-Reply-To: <1430348672.59.0.934013457033.issue24078@psf.upfronthosting.co.za> Message-ID: <1600492702.98.0.862446469736.issue24078@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks iritkatriel for triaging. I can confirm it's fixed with the linked issue. Closing it as duplicate. ./python Python 3.10.0a0 (heads/master:2b05361bf7, Sep 19 2020, 04:38:05) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import inspect, a >>> inspect.getsourcelines(a.C.B) ([' class B(object):\n', ' pass\n'], 6) ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> inspect.getsource returns incorrect source for classes when class definition is part of multiline strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 03:18:56 2020 From: report at bugs.python.org (Pinto) Date: Sat, 19 Sep 2020 07:18:56 +0000 Subject: [issue40562] SEO: differentiate between Python 2 and Python 3 docs on Google SERP In-Reply-To: <1588948512.43.0.0539170221338.issue40562@roundup.psfhosted.org> Message-ID: <1600499936.1.0.512873111464.issue40562@roundup.psfhosted.org> Pinto added the comment: Merci Julien j'ai reussi ? r?gler le m?me probl?me rencontr? sur mon site https://lesmarketing.fr/agence-seo-montpellier/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 04:30:17 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 08:30:17 +0000 Subject: [issue32218] add __iter__ to enum.Flag members In-Reply-To: <1512445452.31.0.213398074469.issue32218@psf.upfronthosting.co.za> Message-ID: <1600504217.37.0.565140457186.issue32218@roundup.psfhosted.org> Ethan Furman added the comment: Problem: What to do when the Flag has compound members? class Color(Flag): BLACK = 0 RED = 1 GREEN = 2 BLUE = 4 PURPLE = RED|BLUE WHITE = RED|GREEN|BLUE I think the answer is: only return the single members. So --> list(Color.WHITE) [Color.BLUE, Color.GREEN, Color.RED] ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 04:49:31 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 08:49:31 +0000 Subject: [issue41811] pstats.SortKey enum is broken Message-ID: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> New submission from Ethan Furman : Currently, __new__ creates each member as an empty string, then adds the _value_ attribute. Because of this, each member is equal to each other, and all appear the same to any data structure that relies on equality and hash as distinguishers (so, basically, all of them). The fix is to use the first value as the string to be created. ---------- assignee: ethan.furman components: Library (Lib) messages: 377153 nosy: ethan.furman priority: normal severity: normal status: open title: pstats.SortKey enum is broken type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 04:57:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 Sep 2020 08:57:21 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600505841.14.0.577341025217.issue41810@roundup.psfhosted.org> Serhiy Storchaka added the comment: Can not `type(Ellipsis)` be used for typing too? ---------- nosy: +gvanrossum, levkivskyi, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 05:02:05 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 09:02:05 +0000 Subject: [issue41811] pstats.SortKey enum is broken In-Reply-To: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> Message-ID: <1600506125.19.0.139404976114.issue41811@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21361 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22316 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 05:32:42 2020 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 19 Sep 2020 09:32:42 +0000 Subject: [issue39385] Add an assertNoLogs context manager to unittest TestCase In-Reply-To: <1579379123.37.0.908861475494.issue39385@roundup.psfhosted.org> Message-ID: <1600507962.45.0.791081912988.issue39385@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson nosy_count: 8.0 -> 9.0 pull_requests: +21362 pull_request: https://github.com/python/cpython/pull/22317 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 05:47:05 2020 From: report at bugs.python.org (Christian Heimes) Date: Sat, 19 Sep 2020 09:47:05 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600508825.7.0.116741146888.issue41561@roundup.psfhosted.org> Christian Heimes added the comment: It's starting to look like a misconfiguration in either Ubuntu's OpenSSL build or your system. has_tls_version() checks compile time options and runtime configuration options. It should detect that TLS 1.1 and 1.0 are not available. "[SSL] internal error" also points to an unusual error condition that should never be triggered by these tests. Please run this on your system: import ssl print((ssl.HAS_TLSv1, ssl.HAS_TLSv1_1, ssl.HAS_TLSv1_2, ssl.HAS_TLSv1_3)) print(ssl.SSLContext().maximum_version) print(ssl.SSLContext().minimum_version) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 06:39:21 2020 From: report at bugs.python.org (Tomohiko Kinebuchi) Date: Sat, 19 Sep 2020 10:39:21 +0000 Subject: [issue41812] Broken link on documentation header Message-ID: <1600511961.8.0.4482824701.issue41812@roundup.psfhosted.org> New submission from Tomohiko Kinebuchi : the link "Documentation" on the head of the top page leads 404 pages. ---------- assignee: docs at python components: Documentation files: Screen Shot 2020-09-11 at 22.10.37.png messages: 377156 nosy: cocoatomo, docs at python priority: normal severity: normal status: open title: Broken link on documentation header versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49463/Screen Shot 2020-09-11 at 22.10.37.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 06:42:12 2020 From: report at bugs.python.org (Tomohiko Kinebuchi) Date: Sat, 19 Sep 2020 10:42:12 +0000 Subject: [issue41812] Broken link on documentation header In-Reply-To: <1600511961.8.0.4482824701.issue41812@roundup.psfhosted.org> Message-ID: <1600512132.41.0.140616197465.issue41812@roundup.psfhosted.org> Tomohiko Kinebuchi added the comment: the link "Documentation" on the head of the top page leads 404 pages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:16:40 2020 From: report at bugs.python.org (Henk-Jaap Wagenaar) Date: Sat, 19 Sep 2020 11:16:40 +0000 Subject: [issue41812] Broken link on documentation header In-Reply-To: <1600511961.8.0.4482824701.issue41812@roundup.psfhosted.org> Message-ID: <1600514200.09.0.219054160485.issue41812@roundup.psfhosted.org> Henk-Jaap Wagenaar added the comment: I can confirm this seems to happen, link to reproduce (click on "Documentation"): https://docs.python.org/ja/3/index.html It redirects to: https://docs.python.org/ja/index.html which is a 404 ---------- nosy: +cryvate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:33:58 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 11:33:58 +0000 Subject: [issue30166] Import command-line parsing modules only when needed In-Reply-To: <1493195659.65.0.461959154112.issue30166@psf.upfronthosting.co.za> Message-ID: <1600515238.49.0.917769644638.issue30166@roundup.psfhosted.org> Irit Katriel added the comment: Looks like the backport was done and this issue can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:35:27 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 11:35:27 +0000 Subject: [issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange In-Reply-To: <1484914427.68.0.380715465195.issue29334@psf.upfronthosting.co.za> Message-ID: <1600515327.26.0.00480400235914.issue29334@roundup.psfhosted.org> Irit Katriel added the comment: Backport to 2.7 is no longer relevant, so I think this issue can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:36:31 2020 From: report at bugs.python.org (Tomohiko Kinebuchi) Date: Sat, 19 Sep 2020 11:36:31 +0000 Subject: [issue41812] Broken link on documentation header In-Reply-To: <1600511961.8.0.4482824701.issue41812@roundup.psfhosted.org> Message-ID: <1600515391.83.0.361610412539.issue41812@roundup.psfhosted.org> Change by Tomohiko Kinebuchi : ---------- keywords: +patch pull_requests: +21363 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22319 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:39:56 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 11:39:56 +0000 Subject: [issue30974] Update os.samefile docstring to match documentation In-Reply-To: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> Message-ID: <1600515596.61.0.118582623226.issue30974@roundup.psfhosted.org> Irit Katriel added the comment: Since backport to 2.7 is no longer relevant, I think this issue can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:43:31 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 11:43:31 +0000 Subject: [issue37408] [DOC] Precise that Tarfile "format" argument only concerns writing. In-Reply-To: <1561534819.95.0.472711593615.issue37408@roundup.psfhosted.org> Message-ID: <1600515811.11.0.868065141341.issue37408@roundup.psfhosted.org> Irit Katriel added the comment: I think this is complete and can now be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:48:46 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 11:48:46 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1600516126.51.0.848274845095.issue29887@roundup.psfhosted.org> Irit Katriel added the comment: Looks like this is complete and can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 07:53:54 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 11:53:54 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1600516434.59.0.973131931275.issue9146@roundup.psfhosted.org> Irit Katriel added the comment: Looks like this is complete and can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 08:36:33 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 12:36:33 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600518993.4.0.579348428296.issue41775@roundup.psfhosted.org> Change by Tal Einat : ---------- nosy: -taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 09:32:55 2020 From: report at bugs.python.org (Bas van Beek) Date: Sat, 19 Sep 2020 13:32:55 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600522375.06.0.35236027723.issue41810@roundup.psfhosted.org> Bas van Beek added the comment: If you're asking whether or not one can infer the return type of `type(Ellipsis)` then yes. In such case the inferred type is `builtins.ellipsis`, which is a private stub-only class (see the referenced typeshed issue in my original post). If you're asking if a valid annotation can be constructed from `type(Ellipsis)` then the answer is unfortunately no (see below for a few examples). ``` EllipsisType = type(Ellipsis) # Both examples are considered invalid def func1(a: type(Ellipsis): ... def func2(a: EllipsisType): ... ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 09:57:34 2020 From: report at bugs.python.org (Paolo Lammens) Date: Sat, 19 Sep 2020 13:57:34 +0000 Subject: [issue41813] Clarify specification of object.__await__ Message-ID: <1600523854.86.0.266063347768.issue41813@roundup.psfhosted.org> New submission from Paolo Lammens : The current specification of object.__await__ is just: > `object.__await__(self)` > > Must return an iterator. Should be used to implement awaitable objects. For instance, `asyncio.Future` implements this method to be compatible with the await expression. This is pretty vague leaves the doubt of *what* objects is the iterator expected to yield (and how the value of the yielded object affects the management of the awaitable object). Although the vagueness is probably on purpose (since this isn't tied to any particular event loop implementation, so it can be an arbitrary iterable), I think it's worthwhile adding a note clarifying this aspect. I originally posed this question on StackOverflow: https://stackoverflow.com/q/63964011/6117426 ---------- assignee: docs at python components: Documentation messages: 377166 nosy: docs at python, plammens priority: normal severity: normal status: open title: Clarify specification of object.__await__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 10:00:31 2020 From: report at bugs.python.org (Paolo Lammens) Date: Sat, 19 Sep 2020 14:00:31 +0000 Subject: [issue41813] Clarify specification of object.__await__ In-Reply-To: <1600523854.86.0.266063347768.issue41813@roundup.psfhosted.org> Message-ID: <1600524031.37.0.0621731644017.issue41813@roundup.psfhosted.org> Change by Paolo Lammens : ---------- keywords: +patch pull_requests: +21365 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 10:09:52 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 19 Sep 2020 14:09:52 +0000 Subject: [issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange In-Reply-To: <1484914427.68.0.380715465195.issue29334@psf.upfronthosting.co.za> Message-ID: <1600524592.17.0.962734141575.issue29334@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 10:10:07 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 19 Sep 2020 14:10:07 +0000 Subject: [issue29887] test_normalization doesn't work In-Reply-To: <1490288230.58.0.523545383484.issue29887@psf.upfronthosting.co.za> Message-ID: <1600524607.66.0.433933811511.issue29887@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 10:23:05 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Sep 2020 14:23:05 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600525385.58.0.49611728554.issue41810@roundup.psfhosted.org> Guido van Rossum added the comment: Let?s do this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:27:49 2020 From: report at bugs.python.org (Paolo Lammens) Date: Sat, 19 Sep 2020 15:27:49 +0000 Subject: [issue41813] Clarify specification of object.__await__ In-Reply-To: <1600523854.86.0.266063347768.issue41813@roundup.psfhosted.org> Message-ID: <1600529269.68.0.839974277875.issue41813@roundup.psfhosted.org> Paolo Lammens added the comment: The proposed addition (see attached PR) is the following note: .. note:: The language doesn't place any restriction on the type or value of the objects yielded by the iterator returned by :meth:`__await__`, as this is specific to the implementation of the event loop that will be managing the :term:`awaitable` object. In the case of :mod:`asyncio`, user code should always be using other :term:`coroutines `, :mod:`asyncio` Tasks, Futures, and other :mod:`asyncio` objects to implement :meth:`__await__`, yielding objects from these, and never yielding objects directly?as the kind of objects that the event loop expects are considered a private implementation detail of :mod:`asyncio`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:34:28 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 Sep 2020 15:34:28 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600529668.5.0.667762440879.issue41810@roundup.psfhosted.org> Serhiy Storchaka added the comment: Would not be better to make MyPy supporting type(Ellipsis)? It would work also on Python versions older than 3.10. Also, could not Literal[Ellipsis] be used as annotation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:36:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 Sep 2020 15:36:00 +0000 Subject: [issue30166] Import command-line parsing modules only when needed In-Reply-To: <1493195659.65.0.461959154112.issue30166@psf.upfronthosting.co.za> Message-ID: <1600529760.42.0.923008026632.issue30166@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:36:24 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 15:36:24 +0000 Subject: [issue40838] inspect.getsourcefile documentation doesn't mention it can return None In-Reply-To: <1591011704.27.0.0385051429778.issue40838@roundup.psfhosted.org> Message-ID: <1600529784.79.0.22572677526.issue40838@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:42:22 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 15:42:22 +0000 Subject: [issue40049] tarfile cannot extract from stdin In-Reply-To: <1584978858.02.0.829307540722.issue40049@roundup.psfhosted.org> Message-ID: <1600530142.32.0.82472640529.issue40049@roundup.psfhosted.org> Tal Einat added the comment: This is actually a duplicate of issue12800, which itself describe precisely the same issue as in issue10761, which was fixed but then the fix was lost in a bad merge. I'm closing this, as discussion should happen on the original issues. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:43:58 2020 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sat, 19 Sep 2020 15:43:58 +0000 Subject: [issue41814] Mismatch between the manipulation of `sys.path` by `runpy` and by the Python command-line interface Message-ID: <1600530238.56.0.932749272178.issue41814@roundup.psfhosted.org> New submission from G?ry : Nicholas, I have noticed that `runpy.run_path` alters `sys.path` as expected for a file_path argument which is a valid `sys.path` entry (typically a directory or zip file). That is to say it adds the file_path argument to the beginning of `sys.path`, like `python `. However, I have also noticed that `runpy.run_path` does not alter `sys.path` as expected for a file_path argument which is a Python source or bytecode file path. That is to say it does not add the *parent path* of the file_path argument to the beginning of `sys.path`, contrary to `python `. Likewise, I have also noticed that `runpy.run_module` (with the alter_sys argument set to `True` of course) does not alter `sys.path` as expected. That is to say it does not add the path of the *current directory* to the beginning of `sys.path`, contrary to `python -m `. Only the first of the three previous `sys.path` manipulations is documented in https://docs.python.org/3/library/runpy.html though, so the `runpy` implementation is at least compliant with its specification. So is the mismatch between the manipulation of `sys.path` by `runpy` and by the Python command-line interface a specification bug or is it the intended behaviour? ---------- components: Library (Lib) messages: 377171 nosy: maggyero, ncoghlan priority: normal severity: normal status: open title: Mismatch between the manipulation of `sys.path` by `runpy` and by the Python command-line interface type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:46:05 2020 From: report at bugs.python.org (Bug Reporter) Date: Sat, 19 Sep 2020 15:46:05 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600530365.28.0.343512683095.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: (True, True, True, True) TLSVersion.MAXIMUM_SUPPORTED TLSVersion.MINIMUM_SUPPORTED ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:50:07 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 15:50:07 +0000 Subject: [issue12800] 'tarfile.StreamError: seeking backwards is not allowed' when extract symlink In-Reply-To: <1313881060.54.0.449889075101.issue12800@psf.upfronthosting.co.za> Message-ID: <1600530607.69.0.423397887462.issue12800@roundup.psfhosted.org> Tal Einat added the comment: See also another duplicate of this issue, issue40049. ---------- nosy: +taleinat versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:52:48 2020 From: report at bugs.python.org (Bug Reporter) Date: Sat, 19 Sep 2020 15:52:48 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600530768.41.0.947036386055.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: In case it's needed: TLSVersion.MAXIMUM_SUPPORTED == -1 TLSVersion.MINIMUM_SUPPORTED == -2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 11:55:21 2020 From: report at bugs.python.org (Mathias Fredriksson) Date: Sat, 19 Sep 2020 15:55:21 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1600530921.21.0.653859390752.issue35328@roundup.psfhosted.org> Mathias Fredriksson added the comment: I believe GH-21587 does not fully address this issue because VIRTUAL_ENV_PROMPT is being conditionally set only if VIRTUAL_ENV_DISABLE_PROMPT is unset. Shell prompts must set VIRTUAL_ENV_DISABLE_PROMPT to non-empty to prevent venv from hijacking PS1. I'm one of the maintainers of the Pure prompt for zsh, and it would be great if VIRTUAL_ENV_PROMPT could always be set, just as VIRTUAL_ENV is too. ---------- nosy: +mafredri _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 12:08:19 2020 From: report at bugs.python.org (Peter McCormick) Date: Sat, 19 Sep 2020 16:08:19 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database Message-ID: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> New submission from Peter McCormick : Attempting to backup a closed database will trigger segfault: ``` target = sqlite.connect(':memory:') source = sqlite.connect(":memory:") source.close() source.backup(target) ``` ---------- files: fix.patch keywords: patch messages: 377176 nosy: pdmccormick priority: normal severity: normal status: open title: SQLite: segfault if backup called on closed database type: crash versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49464/fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 12:11:40 2020 From: report at bugs.python.org (Roundup Robot) Date: Sat, 19 Sep 2020 16:11:40 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600531900.9.0.330740231896.issue41815@roundup.psfhosted.org> Change by Roundup Robot : ---------- nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +21367 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22322 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 12:36:49 2020 From: report at bugs.python.org (Mark Roseman) Date: Sat, 19 Sep 2020 16:36:49 +0000 Subject: [issue28694] tkinter interface to fontchooser In-Reply-To: <1479174800.7.0.200377827869.issue28694@psf.upfronthosting.co.za> Message-ID: <1600533409.07.0.937941296452.issue28694@roundup.psfhosted.org> Mark Roseman added the comment: For future reference, if anyone is wondering why the font chooser is so complicated to use in a way that makes sense across platforms, here is its current behaviour... >From the manual: - configure -font is the font currently shown or font shown when dialog is initially shown (neither guaranteed on all platforms) - implementation-dependent which actions result in callback being called and event being sent Windows - modal; show blocks until dismissed, cannot interact with other windows - ok/cancel - apply button added if a command option is specified - with command (apply button present) - if apply: callback generated with font currently set in dialog, event generated [configure -font is NOT updated] - if ok: callback generated with font in dialog, dialog closed, event generated, configure -font not updated - if no command (no apply button) - on ok, get event, configure -font not updated (correct, since dialog not visible) - fontchange event not generated if option is set in code X11 - not modal; show returns immediately, can interact with other windows - ok/cancel - apply button added if a command option is specified - with command (apply button present): - if apply: callback generated with font currently set in dialog, event generated [configure -font is NOT updated) - if ok: callback generated with font in dialog, dialog closed; no event, configure -font NOT updated - with no command (no apply button): - no event generated, configure -font NOT updated - fontchnaged event generated if option is set in code, configure -font updated - configure -font never updated by user interaction - conclusion: need to set command, hold onto current value returned macOS - no ok/cancel buttons, works like a palette - non-modal; show returns immediately, can interact with other windows - BUG:can appear when tk first loaded (sometimes..) - happens when left open on previous launches and program exited abnormally e.g. ctl-C in terminal - ~/Library/Saved Application State/com.tcltk.wish.savedState/windows.plist still holds font chooser - if so, -visible initially is false, but is true after idle... no intervening <> event - will segfault if set options e.g. font - workaround: hide on startup - fontchange event generated on every change in dialog, configure -font updated to font in dialog - fontchange event generated when option set in code, configure -font updated to font in dialog - command callback (if specified) invoked on every change from user (not in code), configure -font updated ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 12:39:58 2020 From: report at bugs.python.org (Mathias Fredriksson) Date: Sat, 19 Sep 2020 16:39:58 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1600533598.03.0.176039643301.issue35328@roundup.psfhosted.org> Change by Mathias Fredriksson : ---------- pull_requests: +21368 pull_request: https://github.com/python/cpython/pull/22324 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 13:12:30 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 19 Sep 2020 17:12:30 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600535550.54.0.567883651761.issue41810@roundup.psfhosted.org> Guido van Rossum added the comment: > Would not be better to make MyPy supporting type(Ellipsis)? It would work also on Python versions older than 3.10. That would be quite complicated. There is no place in annotations where a function call is currently supported, so I'd prefer not to go there. > Also, could not Literal[Ellipsis] be used as annotation? Alas, it currently doesn't work (PEP 586 only allows specific types, and type checkers have implemented it exactly). Making it work would be more complicated than the proposal -- once it exists in types.py, it's trivial to add support to mypy. IMO ideally, eventually, all "hidden" built-in types ought to be exposed somewhere, unless they are truly implementation details -- but since Ellipsis is a first-class singleton object, I don't see how its type could be an implementation detail. (Its name is actually clearly visible in repr(type(Ellipsis)).) Note that we have started exporting the types of other constructs through types.py, e.g. type(int|str) is types.Union, and type(list[str]) is types.GenericAlias. This is revealed in their repr(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:03:39 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 18:03:39 +0000 Subject: [issue37490] poor documentation for .startswith, .endswith In-Reply-To: <1562130095.71.0.839529776545.issue37490@roundup.psfhosted.org> Message-ID: <1600538619.37.0.129022561197.issue37490@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:07:20 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 18:07:20 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600538840.86.0.339914279429.issue41561@roundup.psfhosted.org> Tal Einat added the comment: Likewise here on Ubuntu 20.04: (True, True, True, True) -1 -2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:13:40 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 19 Sep 2020 18:13:40 +0000 Subject: [issue41811] pstats.SortKey enum is broken In-Reply-To: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> Message-ID: <1600539220.32.0.953230076731.issue41811@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +21369 pull_request: https://github.com/python/cpython/pull/22325 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:13:23 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 18:13:23 +0000 Subject: [issue41811] pstats.SortKey enum is broken In-Reply-To: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> Message-ID: <1600539203.39.0.825437849731.issue41811@roundup.psfhosted.org> Ethan Furman added the comment: New changeset ae0d2a33ec05aece939a959d36fcf1df1e210a08 by Ethan Furman in branch 'master': bpo-41811: create SortKey members using first given value (GH-22316) https://github.com/python/cpython/commit/ae0d2a33ec05aece939a959d36fcf1df1e210a08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:13:48 2020 From: report at bugs.python.org (miss-islington) Date: Sat, 19 Sep 2020 18:13:48 +0000 Subject: [issue41811] pstats.SortKey enum is broken In-Reply-To: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> Message-ID: <1600539228.38.0.266155837565.issue41811@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21370 pull_request: https://github.com/python/cpython/pull/22326 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:44:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Sep 2020 18:44:40 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600541080.86.0.0274741512896.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +21371 pull_request: https://github.com/python/cpython/pull/22327 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:51:40 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 18:51:40 +0000 Subject: [issue41277] documentation: os.setxattr() errno EEXIST and ENODATA In-Reply-To: <1594446359.56.0.57719330174.issue41277@roundup.psfhosted.org> Message-ID: <1600541500.78.0.368122921888.issue41277@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:52:43 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 18:52:43 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry In-Reply-To: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> Message-ID: <1600541563.61.0.712757324617.issue33689@roundup.psfhosted.org> Tal Einat added the comment: This is certainly a bug fix, but since it may break backwards-compatibility in delicate ways, I'm not going to backport it to earlier versions. Expect this to land in 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:53:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 18:53:48 +0000 Subject: [issue26214] textwrap should minimize number of breaks in extra long words In-Reply-To: <1453882121.55.0.184610339904.issue26214@psf.upfronthosting.co.za> Message-ID: <1600541628.29.0.123841998365.issue26214@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:57:39 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 18:57:39 +0000 Subject: [issue34798] pprint ignores the compact parameter for dicts In-Reply-To: <1537886741.82.0.545547206417.issue34798@psf.upfronthosting.co.za> Message-ID: <1600541859.44.0.108687776429.issue34798@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:57:44 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 18:57:44 +0000 Subject: [issue26214] textwrap should minimize number of breaks in extra long words In-Reply-To: <1453882121.55.0.184610339904.issue26214@psf.upfronthosting.co.za> Message-ID: <1600541864.1.0.462690820665.issue26214@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 14:59:37 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 18:59:37 +0000 Subject: [issue41755] Docs: Please remove `from distutils.core import setup` In-Reply-To: <1599769753.52.0.764816611922.issue41755@roundup.psfhosted.org> Message-ID: <1600541977.68.0.596511290478.issue41755@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:11 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:11 +0000 Subject: [issue19081] zipimport behaves badly when the zip file changes while the process is running In-Reply-To: <1379995203.41.0.89812771706.issue19081@psf.upfronthosting.co.za> Message-ID: <1600542071.21.0.626652874645.issue19081@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:44 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:44 +0000 Subject: [issue20119] pdb c(ont(inue)) optional one-time-only breakpoint (like perl debugger) In-Reply-To: <1388808811.19.0.853662131976.issue20119@psf.upfronthosting.co.za> Message-ID: <1600542104.85.0.324012632544.issue20119@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:28 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:28 +0000 Subject: =?utf-8?q?=5Bissue25467=5D_Put_=E2=80=9Cdeprecated=E2=80=9D_warnings_firs?= =?utf-8?q?t?= In-Reply-To: <1445621003.26.0.876373693451.issue25467@psf.upfronthosting.co.za> Message-ID: <1600542088.54.0.0354421460408.issue25467@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:40 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:40 +0000 Subject: [issue24160] Pdb sometimes raises exception when trying to remove a breakpoint defined in a different debugger session In-Reply-To: <1431275416.99.0.134014878289.issue24160@psf.upfronthosting.co.za> Message-ID: <1600542100.19.0.25916531855.issue24160@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:53 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:53 +0000 Subject: [issue26794] curframe can be None in pdb.py In-Reply-To: <1460965664.24.0.92280915097.issue26794@psf.upfronthosting.co.za> Message-ID: <1600542113.51.0.053444566021.issue26794@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:02:04 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:02:04 +0000 Subject: [issue18280] Documentation is too personalized In-Reply-To: <1371889714.5.0.753258621658.issue18280@psf.upfronthosting.co.za> Message-ID: <1600542124.51.0.798584567213.issue18280@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:02:11 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:02:11 +0000 Subject: [issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart In-Reply-To: <1200309434.22.0.561367082724.issue1823@psf.upfronthosting.co.za> Message-ID: <1600542131.38.0.372577231398.issue1823@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:49 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:49 +0000 Subject: [issue22577] local variable changes lost after pdb jump command In-Reply-To: <1412763709.52.0.382735862315.issue22577@psf.upfronthosting.co.za> Message-ID: <1600542109.32.0.185410156469.issue22577@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:34 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:34 +0000 Subject: [issue23163] pdb docs need to contain a statement on threads/multithreaded debugging In-Reply-To: <1420366883.83.0.11703664982.issue23163@psf.upfronthosting.co.za> Message-ID: <1600542094.62.0.812607107522.issue23163@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:01:59 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:01:59 +0000 Subject: [issue22107] tempfile module misinterprets access denied error on Windows In-Reply-To: <1406724041.52.0.0365391579019.issue22107@psf.upfronthosting.co.za> Message-ID: <1600542119.43.0.104638967868.issue22107@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:02:34 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 19:02:34 +0000 Subject: [issue41134] distutils.dir_util.copy_tree FileExistsError when updating symlinks In-Reply-To: <1593228362.42.0.387933635808.issue41134@roundup.psfhosted.org> Message-ID: <1600542154.2.0.047316372865.issue41134@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Distutils nosy: +dstufft, eric.araujo type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:02:22 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:02:22 +0000 Subject: [issue26053] regression in pdb output between 2.7 and 3.5 In-Reply-To: <1452296621.32.0.373600761217.issue26053@psf.upfronthosting.co.za> Message-ID: <1600542142.45.0.165001289816.issue26053@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:02:53 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:02:53 +0000 Subject: [issue11105] Compiling evil ast crashes interpreter In-Reply-To: <1296709360.51.0.0254918555785.issue11105@psf.upfronthosting.co.za> Message-ID: <1600542173.57.0.816698364329.issue11105@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:04:33 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:04:33 +0000 Subject: [issue1611944] sndhdr.what() does not recognize wav file Message-ID: <1600542273.91.0.689765326323.issue1611944@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:04:39 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:04:39 +0000 Subject: [issue919238] Recursive variable definition causes sysconfig infinite loop Message-ID: <1600542279.29.0.00477272155261.issue919238@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:04:20 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:04:20 +0000 Subject: [issue1105770] null source chars handled oddly by tokenize Message-ID: <1600542260.88.0.325318194211.issue1105770@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:03:37 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:03:37 +0000 Subject: [issue19915] int.bit_at(n) - Accessing a single bit in O(1) In-Reply-To: <1386376026.32.0.661343465084.issue19915@psf.upfronthosting.co.za> Message-ID: <1600542217.1.0.0688639131748.issue19915@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:04:08 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:04:08 +0000 Subject: [issue1249749] Encodings and aliases do not match runtime Message-ID: <1600542248.07.0.915355495531.issue1249749@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:04:48 2020 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Sep 2020 19:04:48 +0000 Subject: [issue1678077] improve telnetlib.Telnet so option negotiation becomes easie Message-ID: <1600542288.92.0.608840086115.issue1678077@roundup.psfhosted.org> Change by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:10:07 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 19:10:07 +0000 Subject: [issue37827] IDLE: Have the shell mimic terminal handling of \r and \b control characters in outputs In-Reply-To: <1565592773.8.0.657523892243.issue37827@roundup.psfhosted.org> Message-ID: <1600542607.56.0.427400586444.issue37827@roundup.psfhosted.org> Tal Einat added the comment: As the creator of this issue, I'm reverting the name back to the original, since I did not propose to add a new "mode" to the IDLE shell. Such a proposal could be a separate issue. I'm unfortunately going to mark close this as "rejected". If in the future there is interest in this again, it may be reopened. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed title: IDLE Shell: add a terminal mode that responds to \a, \b, and \r -> IDLE: Have the shell mimic terminal handling of \r and \b control characters in outputs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:12:04 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 19:12:04 +0000 Subject: [issue40530] distutils/cygwinccompiler.py doesn't support recent msvc versions In-Reply-To: <1588768743.33.0.586739194503.issue40530@roundup.psfhosted.org> Message-ID: <1600542724.46.0.660596709491.issue40530@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Distutils nosy: +dstufft, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:13:36 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 19:13:36 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry In-Reply-To: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> Message-ID: <1600542816.7.0.116851424477.issue33689@roundup.psfhosted.org> Tal Einat added the comment: New changeset 0c71a66b53f6ea262aa5a60784c8c625ae0bb98c by idomic in branch 'master': bpo-33689: Blank lines in .pth file cause a duplicate sys.path entry (GH-20679) https://github.com/python/cpython/commit/0c71a66b53f6ea262aa5a60784c8c625ae0bb98c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:14:50 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 19:14:50 +0000 Subject: [issue33689] Blank lines in .pth file cause a duplicate sys.path entry In-Reply-To: <1527634994.48.0.682650639539.issue33689@psf.upfronthosting.co.za> Message-ID: <1600542890.0.0.513462336593.issue33689@roundup.psfhosted.org> Tal Einat added the comment: Thanks for bringing this up again Malcolm, for the original Patch Ammar, and for the work on the PR Ido! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:17:38 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 19:17:38 +0000 Subject: [issue40430] ast.Slice is no longer a subclass of ast.slice In-Reply-To: <1588114083.65.0.758237100014.issue40430@roundup.psfhosted.org> Message-ID: <1600543058.3.0.974822071536.issue40430@roundup.psfhosted.org> Irit Katriel added the comment: Looks like the answer is: it is a deliberate change, not a bug. Should this issue be closed? ---------- components: +Library (Lib) nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:20:58 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 19:20:58 +0000 Subject: [issue41816] need StrEnum in enum.py Message-ID: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> New submission from Ethan Furman : Due to the nature of `str`, if an Enum tries to mixin the str type, all of it's members will be strings -- even if they didn't start out that way: class MyStrEnum(str, Enum): tuple = 'oops', okay = 'correct' >>> list(MyStrEnum) [, MyStrEnum.okay: 'correct'>] The StrEnum class will have a check to ensure that each value was already a string, or can be converted to a string via str(bytes, encoding, errors) ---------- assignee: ethan.furman components: Library (Lib) messages: 377186 nosy: barry, eli.bendersky, ethan.furman, serhiy.storchaka, terry.reedy priority: normal severity: normal stage: needs patch status: open title: need StrEnum in enum.py type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:22:07 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 19:22:07 +0000 Subject: [issue37849] IDLE: Completion window misplaced when shown above current line In-Reply-To: <1565764849.72.0.621293975284.issue37849@roundup.psfhosted.org> Message-ID: <1600543327.44.0.120192322381.issue37849@roundup.psfhosted.org> Change by Tal Einat : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:27:37 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 19:27:37 +0000 Subject: [issue40534] ShUtil doc deficiencies In-Reply-To: <1588779829.75.0.0438051451832.issue40534@roundup.psfhosted.org> Message-ID: <1600543657.07.0.669682581436.issue40534@roundup.psfhosted.org> Irit Katriel added the comment: for copy and copy2 it doesn't say anything about what happens if dst exists. for copy file, copy tree and move it does. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:36:58 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 19:36:58 +0000 Subject: [issue41817] Incorrect types in tkinter.EventType Enum Message-ID: <1600544218.82.0.650310547242.issue41817@roundup.psfhosted.org> New submission from Ethan Furman : Several of the EventType members, such as Key, are actually tuples instead of strings. I suspect the comma was accidentally left in place when EventType was created from a different data structure. Switching the Enum type to the new StrEnum fixes the problem. (It will be merged in in the next couple days.) ---------- components: Library (Lib) messages: 377188 nosy: ethan.furman, gpolo, serhiy.storchaka, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Incorrect types in tkinter.EventType Enum versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:56:20 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 19:56:20 +0000 Subject: [issue41811] pstats.SortKey enum is broken In-Reply-To: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> Message-ID: <1600545380.59.0.805238976337.issue41811@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 0e4d526de47eae24b75f3623cd56bb0453fc8c74 by Miss Islington (bot) in branch '3.9': bpo-41811: create SortKey members using first given value (GH-22316) (GH-22325) https://github.com/python/cpython/commit/0e4d526de47eae24b75f3623cd56bb0453fc8c74 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:57:03 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 19:57:03 +0000 Subject: [issue37827] IDLE: Have the shell mimic terminal handling of \r and \b control characters in outputs In-Reply-To: <1565592773.8.0.657523892243.issue37827@roundup.psfhosted.org> Message-ID: <1600545423.21.0.470244590804.issue37827@roundup.psfhosted.org> Tal Einat added the comment: I will highlight the fact that IDLE's shell currently allows no way of showing a progress indicator, beyond extremely simple bar that only fill up from left to right, without any indication of the rightmost limit, a percentage indicator, or a rotating progress indicator. Specifically, all common progress indicator libraries do not work properly in IDLE. This is a true detriment to interactive work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:56:33 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 19:56:33 +0000 Subject: [issue41811] pstats.SortKey enum is broken In-Reply-To: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> Message-ID: <1600545393.23.0.98525445282.issue41811@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 488e3eb70d24d5ce55ae0d7aed13a3721d3eb8a1 by Miss Islington (bot) in branch '3.8': bpo-41811: create SortKey members using first given value (GH-22316) (GH-22326) https://github.com/python/cpython/commit/488e3eb70d24d5ce55ae0d7aed13a3721d3eb8a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 15:57:36 2020 From: report at bugs.python.org (Ethan Furman) Date: Sat, 19 Sep 2020 19:57:36 +0000 Subject: [issue41811] pstats.SortKey enum is broken In-Reply-To: <1600505371.4.0.907102076211.issue41811@roundup.psfhosted.org> Message-ID: <1600545456.65.0.521754150376.issue41811@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 16:21:33 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 19 Sep 2020 20:21:33 +0000 Subject: [issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr() In-Reply-To: <1478776450.68.0.870801686772.issue28657@psf.upfronthosting.co.za> Message-ID: <1600546893.07.0.244400242486.issue28657@roundup.psfhosted.org> Tal Einat added the comment: I agree with Raymond's reasoning on this. Following the discussion, I'm closing this as wontfix. Thanks to everyone involved for the detailed, clear and focused discussion. ---------- nosy: +taleinat resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 16:49:30 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 20:49:30 +0000 Subject: [issue39524] Escape sequences in doc string of ast._pad_whitespace In-Reply-To: <1580616588.9.0.5083341091.issue39524@roundup.psfhosted.org> Message-ID: <1600548570.71.0.897200019167.issue39524@roundup.psfhosted.org> Irit Katriel added the comment: The backport of the patch to 3.8 has failed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 18:50:41 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 22:50:41 +0000 Subject: [issue37963] No URL for docs of pth files In-Reply-To: <1566917462.27.0.631733525423.issue37963@roundup.psfhosted.org> Message-ID: <1600555841.71.0.488166972481.issue37963@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 19:17:11 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 19 Sep 2020 23:17:11 +0000 Subject: [issue35286] wrong result for difflib.SequenceMatcher Message-ID: <1600557431.78.0.189418047386.issue35286@roundup.psfhosted.org> Irit Katriel added the comment: Can this issue be closed? It looks like Boris simply misunderstood the semantics of difflib, which Raymond has clarified. ---------- components: +Library (Lib) nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 19:19:34 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Sat, 19 Sep 2020 23:19:34 +0000 Subject: [issue41818] Lib/pty.py major revision Message-ID: <1600557574.22.0.272934906824.issue41818@roundup.psfhosted.org> New submission from Soumendra Ganguly : The current pty library has the following issues: 1. Does not set slave termios. Documented in the source. 2. Does not set initial slave window size. Documented in the source. Does not handle SIGWINCH. See bpo-41494, bpo-41541. This is essential in the following practical scenarios: i. creating split windows/panes while using a terminal multiplexer; ii. when resizing GUI terminal emulator window, especially relevant when using tiling window managers; iii. resizing an ansi-term window created inside a GNU Emacs frame. 3. Does not perform signal handling. Signals must be blocked during sensitive portions of code. 4. Hangs on FreeBSD. See bpo-26228. 5. Includes deprecated functions pty.master_open(), pty.slave_open(). 6. In pty.fork(), the fallback code should try using TIOCSCTTY first. It is still using the old method of opening a tty to make it the controlling tty. Currently even SysV based systems provide TIOCSCTTY. See https://stackoverflow.com/questions/51593530/code-explanation-for-glibc-login-tty-function-openttyname-immediately-f The current version of pty.spawn() uses pty.fork() internally. However, pty.fork() closes slave and only returns (pid, master_fd). To update winsize, access to slave is necessary. Further, slave termios must be properly set. The proposed modifications do this by implementing a login_tty(3) based function ( tty.login() ), and using that in pty.spawn() instead of pty.fork(). tty.login() tries TIOCSCTTY before falling back to the old SysV method because Python currently does not provide an interface to the native login_tty(3). 7. tty.setraw() is called right after tty.tcgetattr(). This increases redundancy of code because tty.setraw() itself makes an identical tty.tcgetattr() call. 8. Requires testing/porting to more platforms. Solaris, Illumos, macOS, Cygwin, etc. Windows ConPTY? 9. There should be an option in pty.spawn() to turn off slave's ECHO flag. For example, when it is being used in a pipe. See https://github.com/karelzak/util-linux/commit/1eee1acb245a8b724e441778dfa9b858465bf7e5 and https://github.com/karelzak/util-linux/commit/75ccd75a2fa1194c6415c47b0024a438e26f1ad7#diff-3834a3d25eeaf20d9d0dcb05a46995f6 10. Tests are incomplete. Tests consider OSes such as Tru64 but not {Free/Net/Open/...}BSD. Find ongoing work here: https://github.com/8vasu/pypty2 ---------- components: FreeBSD, Library (Lib), Tests, Windows, macOS messages: 377195 nosy: koobs, ned.deily, paul.moore, ronaldoussoren, soumendra, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Lib/pty.py major revision versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 19:33:03 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Sat, 19 Sep 2020 23:33:03 +0000 Subject: [issue41494] Adds window resizing support to Lib/pty.py [ SIGWINCH ] In-Reply-To: <1596712223.19.0.204047363548.issue41494@roundup.psfhosted.org> Message-ID: <1600558383.22.0.0407889555658.issue41494@roundup.psfhosted.org> Soumendra Ganguly added the comment: Reopening to indicate that this issue has not been resolved. However, this thread should not be used anymore. Use this instead: https://bugs.python.org/issue41818 ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 19:37:59 2020 From: report at bugs.python.org (Mark Roseman) Date: Sat, 19 Sep 2020 23:37:59 +0000 Subject: [issue28694] tkinter interface to fontchooser In-Reply-To: <1479174800.7.0.200377827869.issue28694@psf.upfronthosting.co.za> Message-ID: <1600558679.29.0.154250912328.issue28694@roundup.psfhosted.org> Mark Roseman added the comment: I've put together the first cut of a wrapper that tries to smooth over some of the non-essential differences in implementation details across platforms, while still respecting essential platform conventions. It also works around a few bugs I discovered along the way. It includes the wrapper class itself, a minimal demo, a more realistic demo, and the notes about current behaviour of the underlying Tk widget on different platforms. Current snapshot is at https://github.com/roseman/tkdocs/blob/fontchooser/fontchooser.py Obviously, this borrows hugely from previous snapshots by Lance and Elisha. Thanks! If you get a chance to try it out, would appreciate feedback if this is on the right track or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 19:55:21 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 19 Sep 2020 23:55:21 +0000 Subject: [issue37408] [DOC] Precise that Tarfile "format" argument only concerns writing. In-Reply-To: <1561534819.95.0.472711593615.issue37408@roundup.psfhosted.org> Message-ID: <1600559721.82.0.490529266929.issue37408@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 19:56:13 2020 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 19 Sep 2020 23:56:13 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1600559773.78.0.437829170735.issue9146@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 20:51:32 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 20 Sep 2020 00:51:32 +0000 Subject: [issue41818] Lib/pty.py major revision In-Reply-To: <1600557574.22.0.272934906824.issue41818@roundup.psfhosted.org> Message-ID: <1600563092.86.0.70895907257.issue41818@roundup.psfhosted.org> Kyle Stanley added the comment: In addition to the above, if a major revision is made to pty, I'd suggest also addressing the issue of "master/slave" terminology, and replace it with something comparable like "parent/child". There's an open devguide issue (https://github.com/python/devguide/issues/605) to more explicitly state terms to avoid, and support for avoiding usage of "slave/master" seems uncontroversial (especially in any new code). ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 20:58:35 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 20 Sep 2020 00:58:35 +0000 Subject: [issue19915] int.bit_at(n) - Accessing a single bit in O(1) In-Reply-To: <1386376026.32.0.661343465084.issue19915@psf.upfronthosting.co.za> Message-ID: <1600563515.23.0.231786213039.issue19915@roundup.psfhosted.org> Raymond Hettinger added the comment: If someone does develop an interest in this, feel free to re-open. Personally, I'm sure that I would use int.bit_at() but only once every five years ;-) Also, it would be only half a solution unless accompanied by int.replace_bit_at(). ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 20:59:22 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 20 Sep 2020 00:59:22 +0000 Subject: [issue27139] Increased test coverage for statistics.median_grouped In-Reply-To: <1464446645.63.0.403096467331.issue27139@psf.upfronthosting.co.za> Message-ID: <1600563562.95.0.878108383032.issue27139@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 21:14:07 2020 From: report at bugs.python.org (pmp-p) Date: Sun, 20 Sep 2020 01:14:07 +0000 Subject: [issue19915] int.bit_at(n) - Accessing a single bit in O(1) In-Reply-To: <1386376026.32.0.661343465084.issue19915@psf.upfronthosting.co.za> Message-ID: <1600564447.23.0.814683108711.issue19915@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 22:20:49 2020 From: report at bugs.python.org (mohamed koubaa) Date: Sun, 20 Sep 2020 02:20:49 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1600568449.74.0.683445117547.issue1635741@roundup.psfhosted.org> Change by mohamed koubaa : ---------- pull_requests: +21372 pull_request: https://github.com/python/cpython/pull/22328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 22:20:29 2020 From: report at bugs.python.org (hai shi) Date: Sun, 20 Sep 2020 02:20:29 +0000 Subject: [issue41726] Update refcounts info of PyType_FromModuleAndSpec in refcounts.dat In-Reply-To: <1599320432.34.0.409671228483.issue41726@roundup.psfhosted.org> Message-ID: <1600568429.35.0.827038536051.issue41726@roundup.psfhosted.org> hai shi added the comment: Hi, petr. Can you help me merge this PR to 3.9 too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 22:36:14 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 20 Sep 2020 02:36:14 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600569374.57.0.647224889816.issue41815@roundup.psfhosted.org> Kyle Stanley added the comment: With this being a segfault that's simple to replicate under normal circumstances, I've elevated the priority to release blocker. I'll wait on the release manager (Lukasz) for explicit approval for backporting to 3.9 and 3.8, with both branches being in the release candidate phase. (The attached PR looks to be ready to be merged as well, after a Misc/NEWS entry is added by the author. See https://github.com/python/cpython/pull/22322#pullrequestreview-492167467 for details.) ---------- nosy: +aeros, lukasz.langa priority: normal -> release blocker versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 22:36:30 2020 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 20 Sep 2020 02:36:30 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600569390.76.0.430221066848.issue41815@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 22:51:38 2020 From: report at bugs.python.org (Soumendra Ganguly) Date: Sun, 20 Sep 2020 02:51:38 +0000 Subject: [issue41818] Lib/pty.py major revision In-Reply-To: <1600557574.22.0.272934906824.issue41818@roundup.psfhosted.org> Message-ID: <1600570298.9.0.472560546357.issue41818@roundup.psfhosted.org> Soumendra Ganguly added the comment: Makes sense. I will happily make a change of terminology in the pypty2 repository after the most desirable alternative is determined based on the choice of the majority. I think 'mother/son' sounds cute while still retaining the same initials as before; people used to the older terminology will find this easy to remember. Terminology such as parent/child and server/client might make it a little confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 23:22:12 2020 From: report at bugs.python.org (Peter McCormick) Date: Sun, 20 Sep 2020 03:22:12 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600572132.03.0.455308448646.issue41815@roundup.psfhosted.org> Peter McCormick added the comment: Updated sample script, thanks to @aeros for catching the omission: ``` import sqlite3 target = sqlite3.connect(':memory:') source = sqlite3.connect(':memory:') source.close() source.backup(target) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 19 23:40:59 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 20 Sep 2020 03:40:59 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600573259.51.0.262392661338.issue41815@roundup.psfhosted.org> miss-islington added the comment: New changeset bfee9fad84531a471fd7864e88947320669f68e2 by Peter McCormick in branch 'master': bpo-41815: SQLite: segfault if backup called on closed database (GH-22322) https://github.com/python/cpython/commit/bfee9fad84531a471fd7864e88947320669f68e2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 02:10:02 2020 From: report at bugs.python.org (Samuel Marks) Date: Sun, 20 Sep 2020 06:10:02 +0000 Subject: [issue41819] Fix some compiler warnings Message-ID: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> New submission from Samuel Marks : https://github.com/SamuelMarks/cpython/tree/3.9-compiler-fixes ---------- components: Build messages: 377205 nosy: samuelmarks priority: normal pull_requests: 21373 severity: normal status: open title: Fix some compiler warnings type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 02:38:14 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 20 Sep 2020 06:38:14 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1600583894.47.0.747011110286.issue12178@roundup.psfhosted.org> Tal Einat added the comment: New changeset 5c0eed7375fdd791cc5e19ceabfab4170ad44062 by Berker Peksag in branch 'master': bpo-12178: Fix escaping of escapechar in csv.writer() (GH-13710) https://github.com/python/cpython/commit/5c0eed7375fdd791cc5e19ceabfab4170ad44062 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 02:40:59 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 20 Sep 2020 06:40:59 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1600584059.13.0.553550340416.issue12178@roundup.psfhosted.org> Tal Einat added the comment: After a great deal of delay, a fix for this has finally been merged, and will be available in Python 3.10. Thanks to everyone involved! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 2.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 02:46:37 2020 From: report at bugs.python.org (Anudeep Balla) Date: Sun, 20 Sep 2020 06:46:37 +0000 Subject: [issue41820] ipaddress Library gives me incorrect results Message-ID: <1600584397.02.0.984052429754.issue41820@roundup.psfhosted.org> New submission from Anudeep Balla : https://docs.python.org/3.8/library/ipaddress.html import ipaddress ADDRESSES = [ '172.16.254.00' ] for ip in ADDRESSES: addr = ipaddress.ip_address(ip) if addr.version==4: { print("true") } else: { print("false") } Screen Shot 2020-09-20 at 1 33 30 AM I tried to validate an invalid IPv4 address using IPaddress library from py 3.8.6 but somehow it considers any address ending with "00" to be valid. I hope this is helpful to the community please let me know if the issue is with validation from your end or a bug in the library. @AnudeepBalla ---------- components: Library (Lib) messages: 377208 nosy: anudeepballa07 priority: normal severity: normal status: open title: ipaddress Library gives me incorrect results type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 03:08:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Sep 2020 07:08:04 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1600585684.9.0.247059220099.issue21261@roundup.psfhosted.org> Terry J. Reedy added the comment: The current patch completes both strings keys and bytes keys mixed together. I want to challenge this. 0. What is the use case? The current patch nearly doubles the autocomple code, which handle user actions up to creation of a completion list. I would prefer smaller. 1. We agreed on completing 'string keys'. Bytes are not strings. Bytes might represent an encoded string, but might instead be anything else. Some bytes are represented by ascii chars, but the majority need hex escapes. 2. Including bytes forces quoting keys in the list box in order to add the 'b' prefix for bytes. I said above that we should quote anyway, but that was before working with the implementation and discovering the resulting usage issues. 3. Including bytes makes it harder to select a key by typing a partial key. Suppose d had hundreds of key, a to z. One want to select 'zeta13 c3'. >>> d[ opens a list box with starting with the 'a' words. One enters 'z'. Nothing happens because no entry starts with 'a'. Backspace, enter "'z". Nothings happens because the default quote used in the listbox is '"'. If 'b' did not possibly represent a bytes prefix, we could either remove surrounding quotes or ignore them when matching. ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 03:49:10 2020 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 20 Sep 2020 07:49:10 +0000 Subject: [issue39960] Using typename.__setattr__ in extension type with Py_TPFLAGS_HEAPTYPE is broken (hackcheck too eager?) In-Reply-To: <1584138664.49.0.0727456636956.issue39960@roundup.psfhosted.org> Message-ID: <1600588150.78.0.311739322812.issue39960@roundup.psfhosted.org> Stefan Behnel added the comment: Closing again since GH-21528 has been merged in issue 41295. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 04:43:55 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 20 Sep 2020 08:43:55 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1600591435.74.0.60254540388.issue21261@roundup.psfhosted.org> Tal Einat added the comment: People still get confused between bytes and strings, even with Python 3, especially novice programmers who are a major target audience of IDLE. I simply thought it would be confusing if string dict keys did appear in the completion list, but bytes keys did not. You're certainly right that removing support for completing bytes keys would simplify the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 04:44:00 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 20 Sep 2020 08:44:00 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1600591440.55.0.0416945574947.issue21261@roundup.psfhosted.org> Tal Einat added the comment: Also, please note that the PR allows using either type of quote when typing completions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 05:19:27 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Sep 2020 09:19:27 +0000 Subject: [issue21261] Teach IDLE to Autocomplete dictionary keys In-Reply-To: <1397672472.64.0.119805531416.issue21261@psf.upfronthosting.co.za> Message-ID: <1600593567.04.0.379010952498.issue21261@roundup.psfhosted.org> Terry J. Reedy added the comment: > the PR allows using either type of quote when typing completions. Only if one types a quote before the box pops up. In this case, there is no auto popup and one must request completions. The box then uses the quote typed. Thereafter, there is no choice. Backspacing to delete the quote and typing the another one disables matching. If one type >>> d[ and pauses long enough for the auto-popup, (I have 'wait' set to 200 milleseconds), one must similarly match the existing quote, because jumping ahead requires a string match. Because of the bytes inclusion, the match much include the opening quote, because otherwise an initial 'b' would be ambiguous. Without bytes, we could either removed the quotes from the box or automatically add an open quote. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 06:10:35 2020 From: report at bugs.python.org (john_miller) Date: Sun, 20 Sep 2020 10:10:35 +0000 Subject: [issue41821] Printing specific Unicode characters causes unwanted beeping in Windows 7 console Message-ID: <1600596635.97.0.661976850635.issue41821@roundup.psfhosted.org> New submission from john_miller : I noticed some beeping when printing data to the console (cmd), so I narrowed down the problem to three specific Unicode-characters somehow producing beeps when printed to the Windows console (CMD). This also works in interactive mode. (I checked every single Unicode-character up to sys.maxunicode (except character-values between 0xD800 and 0xE000) by bisecting ever-more fine-grained until I narrowed it down to only those three characters producing unwanted beeps.) Isolated example of bug: for i in ['\u2022', '\u2024', '\u2219']: print(i) \u0007 beeps too, but this works as intended. Python version: 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] Windows version: Microsoft Windows 7 Professional (6.1.7601 Service Pack 1 Build 7601) CMD active code page: 850 (According to chcp-command.) sys.stdout.encoding: utf-8 Might be loosly related to PEP-528 (https://www.python.org/dev/peps/pep-0528/) Addendum: Piping the output like: 'python.exe script.py >> testfile.txt' produced an error. This might happen with more Unicode characters but I haven't checked. Addendum-Example: Traceback (most recent call last): File "pytest2.py", line 38, in print(hex(i), ":", chr(i), end='\n') File "C:\Python38-32\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2023' in position 0: character maps to ---------- components: Unicode, Windows messages: 377214 nosy: ezio.melotti, john_miller, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: Printing specific Unicode characters causes unwanted beeping in Windows 7 console type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 07:19:19 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Sep 2020 11:19:19 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600600759.86.0.178625341754.issue41756@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +21374 pull_request: https://github.com/python/cpython/pull/22330 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 07:21:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Sep 2020 11:21:43 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600600903.44.0.937312148236.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 22330 refactors gen_send_ex(), making it similar to the new PyGen_Send(). ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 08:22:17 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 20 Sep 2020 12:22:17 +0000 Subject: [issue29526] Documenting format() function In-Reply-To: <1486736036.14.0.349493431315.issue29526@psf.upfronthosting.co.za> Message-ID: <1600604537.49.0.556741144649.issue29526@roundup.psfhosted.org> Irit Katriel added the comment: It looks like this is complete and can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 08:53:03 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 20 Sep 2020 12:53:03 +0000 Subject: [issue29526] Documenting format() function In-Reply-To: <1486736036.14.0.349493431315.issue29526@psf.upfronthosting.co.za> Message-ID: <1600606383.55.0.970878725202.issue29526@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 09:00:18 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 20 Sep 2020 13:00:18 +0000 Subject: [issue41820] ipaddress Library gives me incorrect results In-Reply-To: <1600584397.02.0.984052429754.issue41820@roundup.psfhosted.org> Message-ID: <1600606818.79.0.63306089449.issue41820@roundup.psfhosted.org> Eric V. Smith added the comment: Simplified: >>> import ipaddress >>> print(ipaddress.ip_address('172.16.254.00').version) 4 So your concern is that you think '172.16.254.00' (or equivalently, '172.16.254.0') shouldn't be treated as a valid IPv4 address. Is that correct? Can you tell us why you think it's not a valid IPv4 address? I think everything is working correctly here. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 09:02:38 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 20 Sep 2020 13:02:38 +0000 Subject: [issue41821] Printing specific Unicode characters causes unwanted beeping in Windows 7 console In-Reply-To: <1600596635.97.0.661976850635.issue41821@roundup.psfhosted.org> Message-ID: <1600606958.28.0.0623418885542.issue41821@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 09:03:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 20 Sep 2020 13:03:20 +0000 Subject: [issue19915] int.bit_at(n) - Accessing a single bit in O(1) In-Reply-To: <1386376026.32.0.661343465084.issue19915@psf.upfronthosting.co.za> Message-ID: <1600607000.09.0.0767119659505.issue19915@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 11:24:48 2020 From: report at bugs.python.org (Eryk Sun) Date: Sun, 20 Sep 2020 15:24:48 +0000 Subject: [issue41821] Printing specific Unicode characters causes unwanted beeping in Windows 7 console In-Reply-To: <1600596635.97.0.661976850635.issue41821@roundup.psfhosted.org> Message-ID: <1600615488.76.0.304497662905.issue41821@roundup.psfhosted.org> Eryk Sun added the comment: If you've selected an OEM raster font in the console properties instead of a TrueType font (Consolas, Lucida Console, etc), then the console implements some magic to support the OEM character mapping in the raster font. The following shows that encoding to codepage 850 (the system OEM codepage in the UK and Canada) maps the characters that you've flagged, and only those characters, to an ASCII bell (0x07): >>> [hex(x) for x in range(0xFFFF) ... if codecs.code_page_encode(850, chr(x), 'replace')[0] == b'\x07'] ['0x7', '0x2022', '0x2024', '0x2219'] Please confirm whether you're using an OEM raster font. If you are, then this issue can be closed. --- > UnicodeEncodeError: 'charmap' codec can't encode character > '\u2023' in position 0: character maps to Windows Python defaults to using the process active codepage (WinAPI GetACP) for non-console I/O. In Windows 7, the process active codepage is limited to the system ANSI encoding, which is limited to a legacy codepage such as 1252. You can force standard I/O to use UTF-8 via PYTHONIOENCODING, or force all I/O to default to UTF-8 by enabling UTF-8 mode via PYTHONUTF8. --- For future reference, a console session is hosted by conhost.exe. The cmd.exe shell is a console client application, which uses standard I/O just like python.exe. If you run python.exe from Explorer, you won't see cmd.exe as a parent or in any way involved with the console session. The confusion stems from how the system pretends that the process that allocates a console session owns the console window. This is a convenience to allow easily identifying and closing a console session in Task Manager, or via taskkill.exe. But it also leads people to confuse the console with the shell that they run -- such as CMD or PowerShell. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 12:03:50 2020 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 20 Sep 2020 16:03:50 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600617830.62.0.261770484563.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: Vladimir, could you please submit a PR to update 3.10/whatsnew? Need to mention both the new C API and the new perf boost in relevant sections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 13:02:11 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 Sep 2020 17:02:11 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600621331.55.0.902393469512.issue41561@roundup.psfhosted.org> Christian Heimes added the comment: Four times 'True' means that OpenSSL is compiled with TLS 1.0, 1,1, 1.2, and 1.3 support. SSLContext().minium_version == MINIMUM_SUPPORTED and maximum_version == MAXIMUM_SUPPORTED mean that no crypto policy setting or OpenSSL security level setting has modified the minimum and maximum version. TLS 1.0 and 1.1 connection should work. But it's not working for you and some connection are even failing "internal error". This smells like a Debian/Ubuntu have patched OpenSSL with a buggy patch that breaks OpenSSL's internal API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 13:04:08 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 20 Sep 2020 17:04:08 +0000 Subject: [issue41820] ipaddress Library gives me incorrect results In-Reply-To: <1600584397.02.0.984052429754.issue41820@roundup.psfhosted.org> Message-ID: <1600621448.15.0.358922529503.issue41820@roundup.psfhosted.org> Eric V. Smith added the comment: Please do not include screen shots in bug reports. They've unfriendly to people who use screen readers or other accessibility software. Instead, please copy and paste (or retype, if needed) the text into the comment section. > '172.16.254.00' *is not* equivalent to '172.16.254.0' Do you have an RFC or other document that makes that clear? I've never seen an IP address library that makes a distinction between '00' and '0'. But I'm happy to learn something new, if you can point to a standard. If this were going to be an error, it would be in the call to ipaddress.ip_address() or its equivalent. It would raise ValueError, like it does for other strings that don't represent valid addresses. But for backward compatibility reasons, unless there's a standard that explicitly disallows .00, I doubt we'd change the code to raise an exception. And even if there were a standard that says .00 is not a valid address, I'd be reluctant to make a change here. We could potentially break people's code, and we'd need a very good reason to do that. Also, is this causing you a practical problem? Is there somewhere you're getting a .00 address and you'd like to treat it as being invalid? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 13:11:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Sep 2020 17:11:09 +0000 Subject: [issue41820] ipaddress Library gives me incorrect results In-Reply-To: <1600584397.02.0.984052429754.issue41820@roundup.psfhosted.org> Message-ID: <1600621869.25.0.467624111524.issue41820@roundup.psfhosted.org> Serhiy Storchaka added the comment: Why do you think it is invalid? What formal document specify this? In contrary, there are examples of using 0-padded notation for IPv4 addresses (000.rrr.rrr.rrr, 128.000.rrr.rrr, 192.000.001.rrr and 224.000.000.000) in RFC 790. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 13:47:40 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 Sep 2020 17:47:40 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600624060.88.0.0349912762616.issue41561@roundup.psfhosted.org> Christian Heimes added the comment: Does "test_min_max_version_mismatch" pass on your system when you add client_context.set_ciphers("@SECLEVEL=1:HIGH") ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 14:22:37 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 20 Sep 2020 18:22:37 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600626157.26.0.965744005119.issue41561@roundup.psfhosted.org> Tal Einat added the comment: No, adding that after the first line of test_min_max_version_mismatch() still results in the same error: ssl.SSLError: [SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:1122) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 14:31:54 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 20 Sep 2020 18:31:54 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600626714.48.0.260975907215.issue41819@roundup.psfhosted.org> Irit Katriel added the comment: Can you give more details about what you're fixing: what were the compiler warnings, which compiler (and which version of the compiler), which system? Also, why did you create the PR against the 3.9 branch rather than master? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 14:38:53 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 20 Sep 2020 18:38:53 +0000 Subject: [issue1207613] Idle Editor: Bottom Scroll Bar Message-ID: <1600627133.21.0.692883172108.issue1207613@roundup.psfhosted.org> Tal Einat added the comment: We've run into a significant technical hurdle in trying to implement a horizontal scrollbar: The Tk text widget sets the horizontal scroll position only according to the currently visible lines! If the text was scrolled to the right, scrolling down to where there are only shorter lines will scroll the text back to the left!! Implementing this will require either getting a fix for this into Tk itself, or finding a good workaround. The workaround I was considering--wrapping the text widget with a frame and implementing custom scrolling logic--is very unlikely to provide reasonable performance with large files. This is because it will have to have all of the text widget rendered at all times, which the Tk Text widget takes special care to avoid in order to achieve good performance. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 14:39:36 2020 From: report at bugs.python.org (Christian Heimes) Date: Sun, 20 Sep 2020 18:39:36 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600627176.62.0.548677896387.issue41561@roundup.psfhosted.org> Christian Heimes added the comment: What happens if you modify both contexts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 14:57:04 2020 From: report at bugs.python.org (Anudeep Balla) Date: Sun, 20 Sep 2020 18:57:04 +0000 Subject: [issue41820] ipaddress Library gives me incorrect results In-Reply-To: <1600621448.15.0.358922529503.issue41820@roundup.psfhosted.org> Message-ID: Anudeep Balla added the comment: That was the whole point I was trying to make that there were no references that state .00 is equivalent to .0 and if you would try any IP validator or would check by any means you would find that the IP address is invalid. I truly understand the point that you are trying to make but if my program says a invalid IP address as valid I don't see how that helps. I have checked almost every online IP validators to give me the same INVALID as result for 172.16.254.00 while they say 172.16.254.0 is VALID. On Sun, 20 Sep 2020 at 12:04, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Please do not include screen shots in bug reports. They've unfriendly to > people who use screen readers or other accessibility software. Instead, > please copy and paste (or retype, if needed) the text into the comment > section. > > > '172.16.254.00' *is not* equivalent to '172.16.254.0' > > Do you have an RFC or other document that makes that clear? I've never > seen an IP address library that makes a distinction between '00' and '0'. > But I'm happy to learn something new, if you can point to a standard. > > If this were going to be an error, it would be in the call to > ipaddress.ip_address() or its equivalent. It would raise ValueError, like > it does for other strings that don't represent valid addresses. But for > backward compatibility reasons, unless there's a standard that explicitly > disallows .00, I doubt we'd change the code to raise an exception. And even > if there were a standard that says .00 is not a valid address, I'd be > reluctant to make a change here. We could potentially break people's code, > and we'd need a very good reason to do that. > > Also, is this causing you a practical problem? Is there somewhere you're > getting a .00 address and you'd like to treat it as being invalid? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 15:00:47 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 20 Sep 2020 19:00:47 +0000 Subject: [issue41820] ipaddress Library gives me incorrect results In-Reply-To: <1600584397.02.0.984052429754.issue41820@roundup.psfhosted.org> Message-ID: <1600628447.24.0.286229431484.issue41820@roundup.psfhosted.org> Eric V. Smith added the comment: Given that RFC 790 uses 000 as an octet (thanks Serhiy), I think the bug here, if there is one, is in the other validator that you're using. Without a standard saying not to accept 00 or 000, I think we won't make any change here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 15:15:10 2020 From: report at bugs.python.org (john_miller) Date: Sun, 20 Sep 2020 19:15:10 +0000 Subject: [issue41821] Printing specific Unicode characters causes unwanted beeping in Windows 7 console In-Reply-To: <1600596635.97.0.661976850635.issue41821@roundup.psfhosted.org> Message-ID: <1600629310.42.0.142373747524.issue41821@roundup.psfhosted.org> john_miller added the comment: It is set to use an OEM raster font. (Should the information about the font and possible unwanted beeping be mentioned on https://docs.python.org/3/using/windows.html ? Perhaps even a short link regarding "Windows issues" under the print()-entry?) Thanks for your help. I was a bit lost on what happens under the hood encoding-wise as sys.stdout.encoding just returns 'utf-8'. I CP850 required to encode those characters via CP850 to the bell character? I'm not clear on how setting Python to use UTF-8 interacts with the regular console. Basically there are two different basic fixes for printing various text without beeping to the console as-is (with the font set to the default setting raster font): 1. Set the font to a TTF-Font in the console settings 2. Filter or replace the offending Unicode characters (\u2022, \u2024, \u2219) in the Unicode string before printing it to "sys.stdout". In the case where the UTF-8 flag is set (Environment variable set PYTHONUTF8=1 or "python.exe -X utf8 script.py" called within the console), it seems that it still beeps. In interactive mode and when entering the command in the console. Both these cases still beep. python.exe -X utf8 -c "print('\u2022')" set /A PYTHONUTF8=1 & python.exe -c "print('\u2022')" & set PYTHONUTF8= Using python.exe from the explorer without opening it from a console Window (that was opened via cmd.exe) also beeps. So I assume that with the UTF-8 flag set the font still has to be set to a TTF-Font so it does not beep? ---- As for redirecting STDOUT in the console, the UTF-8 option seems to be sufficient, simply printing the character utf-8 encoded into the file: python.exe -X utf8 -c "print('\u2023')" >> testfile.txt A quick test for writing bytes to a file this way (see also Issue4571): python.exe -X utf8 -c "import sys; sys.stdout.buffer.raw.write(b'\x20\x20a')" >> testfile.txt ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 15:19:35 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 20 Sep 2020 19:19:35 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600629575.45.0.122563674518.issue41561@roundup.psfhosted.org> Tal Einat added the comment: Same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 17:51:11 2020 From: report at bugs.python.org (=?utf-8?b?SsOhY2h5bSBCYXJ2w61uZWs=?=) Date: Sun, 20 Sep 2020 21:51:11 +0000 Subject: [issue35247] test.test_socket.RDSTest.testPeek hangs indefinitely In-Reply-To: <1542212087.25.0.788709270274.issue35247@psf.upfronthosting.co.za> Message-ID: <1600638671.41.0.508014513323.issue35247@roundup.psfhosted.org> J?chym Barv?nek added the comment: I am experiencing the same issue when trying to build the ArchLinux python package. Not sure how to reproduce, but I can provide specific details of my system if requested. ---------- nosy: +J?chym Barv?nek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 17:53:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 20 Sep 2020 21:53:48 +0000 Subject: [issue40407] Zipfile couldn`t recognized character set rightly. In-Reply-To: <1588000678.57.0.461120883839.issue40407@roundup.psfhosted.org> Message-ID: <1600638828.02.0.951549411824.issue40407@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) -2to3 (2.x to 3.x conversion tool) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 18:04:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 20 Sep 2020 22:04:01 +0000 Subject: [issue24403] Missing fixer for changed round() behavior In-Reply-To: <1433674721.13.0.236886844827.issue24403@psf.upfronthosting.co.za> Message-ID: <1600639441.33.0.357189588231.issue24403@roundup.psfhosted.org> Irit Katriel added the comment: Looks like this issue can be closed as rejected. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 18:05:16 2020 From: report at bugs.python.org (Eryk Sun) Date: Sun, 20 Sep 2020 22:05:16 +0000 Subject: [issue41821] Printing specific Unicode characters causes unwanted beeping in Windows 7 console In-Reply-To: <1600596635.97.0.661976850635.issue41821@roundup.psfhosted.org> Message-ID: <1600639516.63.0.800789316338.issue41821@roundup.psfhosted.org> Eryk Sun added the comment: > It is set to use an OEM raster font. Okay, then the issue can either be closed as third-party or changed to a documentation enhancement. It could be documented that Unicode support requires selecting a TrueType font in the console properties. "Raster Fonts" uses OEM with a lossy best-fit conversion (e.g. "?" -> "a"). > So I assume that with the UTF-8 flag set the font still has to be > set to a TTF-Font so it does not beep? Yes, the conversion to OEM for "Raster Fonts" occurs in the console itself. > I CP850 required to encode those characters via CP850 to the > bell character? Other OEM codepages have a different best-fit mapping. For example, codepage 437 maps U+2022 to ASCII bell, but not U+2024 or U+2219. > I was a bit lost on what happens under the hood encoding-wise as > sys.stdout.encoding just returns 'utf-8'. For a console file, the io module uses io._WindowsConsoleIO for the raw layer instead of io.FileIO. _WindowsConsoleIO internally uses the console's wide-character (UTF-16) API and converts to and from UTF-8. Overriding the standard I/O encoding to UTF-8 isn't needed for _WindowsConsoleIO. It's needed for regular files and pipes when standard I/O is redirected, since those still default to the process active codepage (usually system ANSI). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 18:15:30 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 20 Sep 2020 22:15:30 +0000 Subject: [issue41631] _ast module: get_global_ast_state() doesn't work with Mercurial lazy import In-Reply-To: <1598350561.88.0.831200620813.issue41631@roundup.psfhosted.org> Message-ID: <1600640130.24.0.0122658982726.issue41631@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21375 pull_request: https://github.com/python/cpython/pull/22331 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 18:37:07 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 20 Sep 2020 22:37:07 +0000 Subject: [issue34199] Add support for delete logger in log module. In-Reply-To: <1532347771.53.0.56676864532.issue34199@psf.upfronthosting.co.za> Message-ID: <1600641427.7.0.334717910381.issue34199@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) -2to3 (2.x to 3.x conversion tool) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 18:38:46 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 20 Sep 2020 22:38:46 +0000 Subject: [issue33085] *** Error in `python': double free or corruption (out): 0x00007ff5254d50d0 *** In-Reply-To: <1521183590.06.0.467229070634.issue33085@psf.upfronthosting.co.za> Message-ID: <1600641526.07.0.218814288508.issue33085@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: -2to3 (2.x to 3.x conversion tool) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 12:47:57 2020 From: report at bugs.python.org (Anudeep Balla) Date: Sun, 20 Sep 2020 16:47:57 +0000 Subject: [issue41820] ipaddress Library gives me incorrect results In-Reply-To: <1600606818.79.0.63306089449.issue41820@roundup.psfhosted.org> Message-ID: Anudeep Balla added the comment: Greetings, Any Ip address containing 2 zeros or more are considered to be an invalid IP address. '172.16.254.00' *is not* equivalent to '172.16.254.0' I guess this small logic is causing the error I hope it makes it clear from the below images. Regards, Raj. [image: Screen Shot 2020-09-20 at 11.42.39 AM.png] [image: Screen Shot 2020-09-20 at 11.42.31 AM.png] [image: Screen Shot 2020-09-20 at 11.42.18 AM.png] [image: Screen Shot 2020-09-20 at 11.42.09 AM.png] On Sun, 20 Sep 2020 at 08:00, Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Simplified: > >>> import ipaddress > >>> print(ipaddress.ip_address('172.16.254.00').version) > 4 > > So your concern is that you think '172.16.254.00' (or equivalently, > '172.16.254.0') shouldn't be treated as a valid IPv4 address. Is that > correct? > > Can you tell us why you think it's not a valid IPv4 address? I think > everything is working correctly here. > > ---------- > nosy: +eric.smith > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: https://bugs.python.org/file49465/Screen Shot 2020-09-20 at 11.42.31 AM.png Added file: https://bugs.python.org/file49466/Screen Shot 2020-09-20 at 11.42.39 AM.png Added file: https://bugs.python.org/file49467/Screen Shot 2020-09-20 at 11.42.18 AM.png Added file: https://bugs.python.org/file49468/Screen Shot 2020-09-20 at 11.42.09 AM.png _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-09-20 at 11.42.31 AM.png Type: image/png Size: 16768 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-09-20 at 11.42.39 AM.png Type: image/png Size: 13060 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-09-20 at 11.42.18 AM.png Type: image/png Size: 16695 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2020-09-20 at 11.42.09 AM.png Type: image/png Size: 13126 bytes Desc: not available URL: From report at bugs.python.org Sun Sep 20 20:38:26 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Sep 2020 00:38:26 +0000 Subject: [issue41822] Document the mean of values for sys.float_info.rounds Message-ID: <1600648706.73.0.507862170012.issue41822@roundup.psfhosted.org> New submission from Raymond Hettinger : The current docs unnecessarily refer readers to the C99 standard. "integer constant representing the rounding mode used for arithmetic operations. This reflects the value of the system FLT_ROUNDS macro at interpreter startup time. See section 5.2.4.2.2 of the C99 standard for an explanation of the possible values and their meanings." The docs should quote the standard, "The rounding mode for floating-point addition is characterized by the implementation defined value of FLT_ROUNDS: -1 indeterminable, 0 toward zero, 1 to nearest, 2 toward positive infinity, 3 toward negative infinity. All other values for FLT_ROUNDS characterize implementation-defined rounding." behavior. ---------- assignee: docs at python components: Documentation keywords: newcomer friendly messages: 377236 nosy: docs at python, rhettinger priority: normal severity: normal status: open title: Document the mean of values for sys.float_info.rounds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 20:46:43 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Sep 2020 00:46:43 +0000 Subject: [issue41822] Document the mean of values for sys.float_info.rounds In-Reply-To: <1600648706.73.0.507862170012.issue41822@roundup.psfhosted.org> Message-ID: <1600649203.05.0.369290842445.issue41822@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +mark.dickinson, serhiy.storchaka, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 20:54:43 2020 From: report at bugs.python.org (paul j3) Date: Mon, 21 Sep 2020 00:54:43 +0000 Subject: [issue41684] argparse: unexpected subparser behaviour on parse_args with namespace option In-Reply-To: <1598949211.7.0.649344000832.issue41684@roundup.psfhosted.org> Message-ID: <1600649683.57.0.780436090616.issue41684@roundup.psfhosted.org> Change by paul j3 : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 21:01:54 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Sep 2020 01:01:54 +0000 Subject: [issue41823] Add more fields to sys.float_info Message-ID: <1600650114.4.0.96172232586.issue41823@roundup.psfhosted.org> New submission from Raymond Hettinger : Consider adding new non-sequence fields to sys.float_info: doubling_rounding and ieee_754. The code in test_math defines a useful constant: # detect evidence of double-rounding: fsum is not always correctly # rounded on machines that suffer from double rounding. x, y = 1e16, 2.9999 # use temporary values to defeat peephole optimizer HAVE_DOUBLE_ROUNDING = (x + y == 1e16 + 4) There is another useful value in a float.__getformat__ which is hard to find and only documented for internal use: >>> float.__getformat__('double') 'IEEE, little-endian Making this information available would make it easier for users to do what we do in test_math: @requires_IEEE_754 @unittest.skipIf(HAVE_DOUBLE_ROUNDING, "fsum is not exact on machines with double rounding") def testFsum(self): ... ---------- components: Extension Modules messages: 377237 nosy: mark.dickinson, rhettinger, tim.peters priority: normal severity: normal status: open title: Add more fields to sys.float_info versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 22:01:46 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 21 Sep 2020 02:01:46 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600653706.97.0.59290435548.issue41819@roundup.psfhosted.org> Change by Samuel Marks : ---------- keywords: +patch pull_requests: +21376 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 22:02:26 2020 From: report at bugs.python.org (Samuel Marks) Date: Mon, 21 Sep 2020 02:02:26 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600653746.73.0.189793087972.issue41819@roundup.psfhosted.org> Samuel Marks added the comment: Okay I'll redo it on master, here is my config, on macOS 10.15.6: ``` $ export PKG_CONFIG_PATH="/usr/local/opt/openssl at 1.1/lib/pkgconfig" $ export CPPFLAGS="-I/usr/local/opt/openssl at 1.1/include" $ export LDFLAGS="-L/usr/local/opt/openssl at 1.1/lib" $ export CPPFLAGS="-I/usr/local/opt/zlib/include $CPPFLAGS" $ export LDFLAGS="-L/usr/local/opt/zlib/lib $LDFLAGS" $ gcc --version && clang --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.2) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin Apple clang version 12.0.0 (clang-1200.0.32.2) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin $ ./configure --enable-optimizations --prefix /opt/python3-master $ ./configure --enable-optimizations --prefix /opt/python3-master checking for git... found checking build system type... x86_64-apple-darwin19.6.0 checking host system type... x86_64-apple-darwin19.6.0 checking for python3.10... no checking for python3... python3 checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... "darwin" Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 [? omitted for brevity] $ make ``` With these warnings being addressed by this bug report and PR: ``` gcc -c -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-instr-generate -I./Include/internal -I. -I./Include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl at 1.1/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl at 1.1/include -DPy_BUILD_CORE \ -DPLATLIBDIR='"lib"' \ -o Python/initconfig.o ./Python/initconfig.c ./Python/initconfig.c:2677:38: warning: format specifies type 'wint_t' (aka 'int') but the argument has type 'unsigned int' [-Wformat] PySys_WriteStderr("%lc", ch); ~~~ ^~ %c 1 warning generated. ``` Looks like someone else has already picked up the other bug. So opened a new PR for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 20 22:44:47 2020 From: report at bugs.python.org (Bug Reporter) Date: Mon, 21 Sep 2020 02:44:47 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600656287.57.0.975366251307.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: I added client_context.set_ciphers("@SECLEVEL=1:HIGH"), then added server_context.set_ciphers("@SECLEVEL=1:HIGH"). The test failed in both cases. I did not have problem with python 3.7.x. in Ubuntu 18.04. I have just tried compiling 3.7.5 in Ubuntu 20.04 and test_ssl failed. I also remember downloading openssl source code, compiling it, and using --with-openssl=DIR option with python 3.8.x in Ubuntu 20.04. I tried different versions of openssl (I did not edit any config files, just compiled) and test_ssl failed with all of them. Does it mean that Ubuntu's config files were still used even in this case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 00:01:01 2020 From: report at bugs.python.org (paul j3) Date: Mon, 21 Sep 2020 04:01:01 +0000 Subject: [issue41769] Positional arguments with boolean actions behave differently In-Reply-To: <1599878288.06.0.921718987462.issue41769@roundup.psfhosted.org> Message-ID: <1600660861.56.0.534382278023.issue41769@roundup.psfhosted.org> paul j3 added the comment: 'store_true/false' are subclasses of 'store_const'. All have a 'nargs=0' value. It's that value which explains their behavior. ('append_const' would also fall in this category) In [2]: parser = argparse.ArgumentParser() In [3]: parser.add_argument('foo', action='store_const', default='xxx', const='yyy') Out[3]: _StoreConstAction(option_strings=[], dest='foo', nargs=0, const='yyy', default='xxx', type=None, choices=None, help=None, metavar=None) In [4]: _.required Out[4]: True In [5]: parser.print_help() usage: ipython3 [-h] positional arguments: foo optional arguments: -h, --help show this help message and exit In [6]: parser.parse_args([]) Out[6]: Namespace(foo='yyy') In [7]: parser.parse_args(['zzz']) usage: ipython3 [-h] ipython3: error: unrecognized arguments: zzz --- Like '*' and '?' this argument is 'satisfied' with nothing, an empty list of values. For those nargs, 'get_values' takes a the special step of assigning the default. For 'store_const' it's the 'const' that's placed in the namespace. 'store_true' does store True, and 'store_false' does store False. Providing a string produces an error because there isn't any Action to consume it. With nargs=0, this Action can't use it. Usage is also correct since we can't provide any string to meet this Action's needs. Technically then the Action behaves correctly - both in usage and what it does. That said, it normally isn't useful, since it will always assign the 'const/True/False' to the namespace. Even without an in depth knowledge of how parsing is done, this should be logically evident (if not obvious). I don't recall any previous issues like this, though I wouldn't be surprised if there were. I don't recall anything on Stackoverflow either. I think adding an error would be overkill. It doesn't come up often, and some user might have their own obscure reason for using it. A note to the docs might be in order, but until a user has encountered this behavior as you have, such a note might be more confusing than useful. As a general rule, parameter checking in add_argument() is rather loose (and multilayered). While 'action' is used to select the Action subclass, most of the rest are passed on to that Action. The Action __init__ check a few key parameters (for example 'store_const' will complain if we don't provide a 'const'), but accept or ignore the rest. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 00:48:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Sep 2020 04:48:03 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600663683.89.0.466144219363.issue41513@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset bc6b7fa6d7fb8957eb4ff809366af40dfb12b8cd by Raymond Hettinger in branch 'master': bpo-41513: Add accuracy tests for math.hypot() (GH-22327) https://github.com/python/cpython/commit/bc6b7fa6d7fb8957eb4ff809366af40dfb12b8cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 01:30:57 2020 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 21 Sep 2020 05:30:57 +0000 Subject: [issue39871] math.copysign raises SystemError with non-float x and custom y In-Reply-To: <1583463541.57.0.123228500554.issue39871@roundup.psfhosted.org> Message-ID: <1600666257.29.0.663575537506.issue39871@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +21378 pull_request: https://github.com/python/cpython/pull/22333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 02:15:59 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Sep 2020 06:15:59 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600668959.49.0.194748108477.issue41819@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 02:31:40 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Sep 2020 06:31:40 +0000 Subject: [issue24403] Missing fixer for changed round() behavior In-Reply-To: <1433674721.13.0.236886844827.issue24403@psf.upfronthosting.co.za> Message-ID: <1600669900.92.0.218345760836.issue24403@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 04:35:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Sep 2020 08:35:33 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600677333.18.0.3048942316.issue41819@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c322948892438a387d752ec18d1eb512699a4d67 by Samuel Marks in branch 'master': bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332) https://github.com/python/cpython/commit/c322948892438a387d752ec18d1eb512699a4d67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 04:35:47 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 08:35:47 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600677347.51.0.524850859116.issue41819@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21379 pull_request: https://github.com/python/cpython/pull/22334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 04:35:56 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 08:35:56 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600677356.23.0.041400523261.issue41819@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21380 pull_request: https://github.com/python/cpython/pull/22335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 04:43:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Sep 2020 08:43:13 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600677793.98.0.834886569712.issue41819@roundup.psfhosted.org> STINNER Victor added the comment: > ./Python/initconfig.c:2677:38: warning: format specifies type 'wint_t' (...) Is there the only warning that you want to fix? Can we close the issue? Or are there other remaining warnings? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 04:51:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Sep 2020 08:51:58 +0000 Subject: [issue1823] Possible to set invalid Content-Transfer-Encoding on email.mime.multipart.MIMEMultipart In-Reply-To: <1200309434.22.0.561367082724.issue1823@psf.upfronthosting.co.za> Message-ID: <1600678318.69.0.572285848258.issue1823@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 04:56:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Sep 2020 08:56:27 +0000 Subject: [issue35247] test.test_socket.RDSTest.testPeek hangs indefinitely In-Reply-To: <1542212087.25.0.788709270274.issue35247@psf.upfronthosting.co.za> Message-ID: <1600678587.5.0.251505109616.issue35247@roundup.psfhosted.org> STINNER Victor added the comment: I don't know what is RDS. How can I enable it on my Fedora? 10:54:43 vstinner at apu$ ./python -m test test_socket -m RDSTest -v testPeek (test.test_socket.RDSTest) ... skipped 'RDS sockets required for this test.' testSelect (test.test_socket.RDSTest) ... skipped 'RDS sockets required for this test.' testSendAndRecv (test.test_socket.RDSTest) ... skipped 'RDS sockets required for this test.' testSendAndRecvMsg (test.test_socket.RDSTest) ... skipped 'RDS sockets required for this test.' testSendAndRecvMulti (test.test_socket.RDSTest) ... skipped 'RDS sockets required for this test.' $ ./python Python 3.8.6rc1+ (heads/3.8:e3d0e9bab9, Sep 10 2020, 16:05:50) [GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket; socket.socket(socket.PF_RDS, socket.SOCK_SEQPACKET, 0) (...) OSError: [Errno 97] Address family not supported by protocol ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 04:58:55 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 08:58:55 +0000 Subject: [issue41819] Fix some compiler warnings In-Reply-To: <1600582202.7.0.502087072911.issue41819@roundup.psfhosted.org> Message-ID: <1600678735.32.0.636370362524.issue41819@roundup.psfhosted.org> miss-islington added the comment: New changeset 7aa534c9567201d896408bc7d5a718b529868540 by Miss Islington (bot) in branch '3.9': bpo-41819: Fix compiler warning in init_dump_ascii_wstr() (GH-22332) https://github.com/python/cpython/commit/7aa534c9567201d896408bc7d5a718b529868540 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 06:19:21 2020 From: report at bugs.python.org (Bas van Beek) Date: Mon, 21 Sep 2020 10:19:21 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600683561.65.0.790179024947.issue41810@roundup.psfhosted.org> Change by Bas van Beek : ---------- keywords: +patch pull_requests: +21381 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22336 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 06:29:44 2020 From: report at bugs.python.org (Eryk Sun) Date: Mon, 21 Sep 2020 10:29:44 +0000 Subject: [issue41821] Printing specific Unicode characters causes unwanted beeping in Windows 7 console In-Reply-To: <1600596635.97.0.661976850635.issue41821@roundup.psfhosted.org> Message-ID: <1600684184.82.0.955061558042.issue41821@roundup.psfhosted.org> Eryk Sun added the comment: I've decided to close this issue since extending the "Using Python on Windows" section of the docs to recommend using a TrueType font in the console would only be generally useful for people using Python 3.8 with Windows 7. Python 3.9+ requires Windows 8.1+, which defaults to using a TrueType font in console windows. In Windows 10, the console doesn't even support OEM "Raster Fonts", unless the option is selected to use the legacy console. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 06:35:29 2020 From: report at bugs.python.org (Bas van Beek) Date: Mon, 21 Sep 2020 10:35:29 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600684529.25.0.0277145642105.issue41810@roundup.psfhosted.org> Bas van Beek added the comment: If we're going ahead with this: PR https://github.com/python/cpython/pull/22336 contains a concrete implementation of the proposed changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 06:50:10 2020 From: report at bugs.python.org (Mark Shannon) Date: Mon, 21 Sep 2020 10:50:10 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600685410.16.0.2869436519.issue41756@roundup.psfhosted.org> Mark Shannon added the comment: Yury, Why was the PR merged with a new API function `PyGen_Send`? I explicitly said that any new API function should *not* start with `PyGen`, nor should any function rely on generators and async "coroutines" sharing the same memory layout. If you disagree with me, please say why, don't just merge the PR. The name `PyGen` is misleading as it can handle coroutines as well as generators. There is no performance advantage to only handling these two types. Worse, it requires that a `PyCoroObject` can always be cast to a `PyGenObject`, preventing better layout of either object in the future. Would you revert the PR, please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 07:10:11 2020 From: report at bugs.python.org (Mark Shannon) Date: Mon, 21 Sep 2020 11:10:11 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600686611.91.0.165233709246.issue41810@roundup.psfhosted.org> Mark Shannon added the comment: I can't resist the pun on typing. `type(...)` is the least typing :) More seriously, >From a general consistency point of view, if this is to be added, shouldn't `types.NoneType` and `types.NotImplementedType` be added as well? ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 07:22:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 21 Sep 2020 11:22:33 +0000 Subject: [issue41758] turtledemo.colormixer crashes with a stack overflow In-Reply-To: <1599812953.89.0.679415765486.issue41758@roundup.psfhosted.org> Message-ID: <1600687353.92.0.230612939848.issue41758@roundup.psfhosted.org> Terry J. Reedy added the comment: Without a reproducible error, we cannot do anything. ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 07:46:57 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Sep 2020 11:46:57 +0000 Subject: [issue40084] HTTPStatus has incomplete dir() listing In-Reply-To: <1585293405.13.0.478935860244.issue40084@roundup.psfhosted.org> Message-ID: <1600688817.43.0.429961726444.issue40084@roundup.psfhosted.org> Change by Ethan Furman : ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 08:25:39 2020 From: report at bugs.python.org (Christian Heimes) Date: Mon, 21 Sep 2020 12:25:39 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600691139.76.0.861905916812.issue41561@roundup.psfhosted.org> Christian Heimes added the comment: Did you set an rpath, reconfigure ldconfig, or LD_LIBRARY_PATH env var? If not then you compiled Python with an alternative OpenSSL installation but did not instruct the ld to load the alternative shared libraries. --with-openssl only modifies header and linker search, not dynamic loader options. The command ldd $(find build -name '_ssl*.so') will should you what shared OpenSSL libraries the dynamic linker will load. I wrote a script to download and compile OpenSSL and then run Python's test suite with exactly that OpenSSL build: ./configure make ./python Tools/ssl/multissltests.py --openssl=1.1.1g ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 08:40:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Sep 2020 12:40:45 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1600692045.74.0.739514631263.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1b328ea9a7d15de4a8c9d0eb8aee94f6c75c1b46 by Mohamed Koubaa in branch 'master': bpo-1635741: Convert an _lsprof method to argument clinic (GH-22240) https://github.com/python/cpython/commit/1b328ea9a7d15de4a8c9d0eb8aee94f6c75c1b46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 09:04:59 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Sep 2020 13:04:59 +0000 Subject: [issue41816] need StrEnum in enum.py In-Reply-To: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> Message-ID: <1600693499.67.0.77240333268.issue41816@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21382 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22337 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 09:11:10 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Sep 2020 13:11:10 +0000 Subject: [issue40084] HTTPStatus has incomplete dir() listing In-Reply-To: <1585293405.13.0.478935860244.issue40084@roundup.psfhosted.org> Message-ID: <1600693870.05.0.639379280073.issue40084@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 68526fe258da8c01196fd7cf48e8e5f1280bf8fd by Angelin BOOZ in branch 'master': bpo-40084: Enum - dir() includes member attributes (GH-19219) https://github.com/python/cpython/commit/68526fe258da8c01196fd7cf48e8e5f1280bf8fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 09:12:00 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 13:12:00 +0000 Subject: [issue40084] HTTPStatus has incomplete dir() listing In-Reply-To: <1585293405.13.0.478935860244.issue40084@roundup.psfhosted.org> Message-ID: <1600693920.21.0.809594692758.issue40084@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21384 pull_request: https://github.com/python/cpython/pull/22339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 09:11:50 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 13:11:50 +0000 Subject: [issue40084] HTTPStatus has incomplete dir() listing In-Reply-To: <1585293405.13.0.478935860244.issue40084@roundup.psfhosted.org> Message-ID: <1600693910.84.0.365822406782.issue40084@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21383 pull_request: https://github.com/python/cpython/pull/22338 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 10:19:26 2020 From: report at bugs.python.org (Nikolay Bryskin) Date: Mon, 21 Sep 2020 14:19:26 +0000 Subject: [issue40213] contextlib.aclosing() In-Reply-To: <1586225612.65.0.881233882976.issue40213@roundup.psfhosted.org> Message-ID: <1600697966.64.0.07807206566.issue40213@roundup.psfhosted.org> Change by Nikolay Bryskin : ---------- nosy: +nikicat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 10:27:41 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Sep 2020 14:27:41 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600698461.62.0.803284151462.issue41810@roundup.psfhosted.org> Guido van Rossum added the comment: I?m okay with adding those (even though NoneType might not work in mypy, given the special-casing for None, per PEP 484). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 10:29:45 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 21 Sep 2020 14:29:45 +0000 Subject: [issue41823] Add more fields to sys.float_info In-Reply-To: <1600650114.4.0.96172232586.issue41823@roundup.psfhosted.org> Message-ID: <1600698585.18.0.397442395044.issue41823@roundup.psfhosted.org> Dong-hee Na added the comment: @rhettinger I like the idea to add more informative information, However, since the type is the structsequence the change can cause the ValueError: too many values to unpack when the variable is used as a tuple. But the if such use case is not often used, it will be okay ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 10:31:58 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 21 Sep 2020 14:31:58 +0000 Subject: [issue40213] contextlib.aclosing() In-Reply-To: <1586225612.65.0.881233882976.issue40213@roundup.psfhosted.org> Message-ID: <1600698718.06.0.747185143191.issue40213@roundup.psfhosted.org> Dong-hee Na added the comment: see https://bugs.python.org/issue41229 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 10:45:29 2020 From: report at bugs.python.org (Rafael Guterres Jeffman) Date: Mon, 21 Sep 2020 14:45:29 +0000 Subject: [issue41769] Positional arguments with boolean actions behave differently In-Reply-To: <1599878288.06.0.921718987462.issue41769@roundup.psfhosted.org> Message-ID: <1600699529.07.0.605845330553.issue41769@roundup.psfhosted.org> Rafael Guterres Jeffman added the comment: I don't think many users will try to use a boolean positional argument. I only excited this behavior because I was writing an abstraction over argparse to define the command line interface based on a configuration file, and I was trying to add some type checking. I think documenting the behavior is enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 12:17:16 2020 From: report at bugs.python.org (Bas van Beek) Date: Mon, 21 Sep 2020 16:17:16 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600705036.56.0.0203175656372.issue41810@roundup.psfhosted.org> Bas van Beek added the comment: Apparently pyright has some interest in `NoneType` (https://github.com/python/typeshed/pull/4519), so it seems there are already some actual use cases. In any case, I'm ok with adding `NoneType` and `NotImplementedType` to the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 12:26:25 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 21 Sep 2020 16:26:25 +0000 Subject: [issue41807] Warnings when installing Linter on VS code on Linux and Windows. In-Reply-To: <1600389616.58.0.106724247852.issue41807@roundup.psfhosted.org> Message-ID: <1600705585.27.0.338549356725.issue41807@roundup.psfhosted.org> Steve Dower added the comment: This warning is coming from pip, and it's because it has detected that your system configuration doesn't match what many Python developers assume. Specifically, that you've configured PATH to include both Python and any package scripts you happen to install. We don't recommend adding these to PATH on Windows for your default install, so it's safe to ignore these warnings (provided you use a tool like VS Code or "python -m ..." to launch the scripts). However, if you need these for a particular environment, when you create a virtual environment and activate it, your current session settings will be updated to put them on PATH and you should not see this error. If you need further help, please visit the pip repository at https://github.com/PyPA/pip ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 12:28:40 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 21 Sep 2020 16:28:40 +0000 Subject: [issue41800] Python installation fails when run under system account if there is already an existing installation on the system already In-Reply-To: <1600328953.43.0.732217021063.issue41800@roundup.psfhosted.org> Message-ID: <1600705720.62.0.012693877701.issue41800@roundup.psfhosted.org> Steve Dower added the comment: Python's installer doesn't change that often ;) Without some information about your scenario, I can't make a recommendation. However, I will say that if you are including any of your own Python code with your application, and especially any compiled modules, you probably don't want to give users the ability to independently remove or modify your Python install. Much better to include the runtime you have tested with and only update your users to a newer version once you have tested with that one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 12:30:18 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 21 Sep 2020 16:30:18 +0000 Subject: [issue30974] Update os.samefile docstring to match documentation In-Reply-To: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> Message-ID: <1600705818.67.0.0552956449506.issue30974@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 12:35:27 2020 From: report at bugs.python.org (Dominic Davis-Foster) Date: Mon, 21 Sep 2020 16:35:27 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that is was added in 3.7 Message-ID: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> New submission from Dominic Davis-Foster : typing.ForwardRef was first documented in GH-14216 but there's no mention that the class was only added in Python 3.7. In Python 3.6 there's no typing.ForwardRef; there is a typing._ForwardRef which seems to be the same thing from before it was made public. What I don't know is whether the change of name was made in 3.7 or in a point release. ---------- components: Library (Lib) messages: 377262 nosy: dom1310df priority: normal severity: normal status: open title: Docs for typing.ForwardRef don't state that is was added in 3.7 versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 12:41:50 2020 From: report at bugs.python.org (Georg Brandl) Date: Mon, 21 Sep 2020 16:41:50 +0000 Subject: [issue41825] os.waitid() documentation needs TLC Message-ID: <1600706510.78.0.601178112511.issue41825@roundup.psfhosted.org> New submission from Georg Brandl : There are a few points where `os.waitid()` docs need improvement. Current text: Wait for the completion of one or more child processes. idtype can be P_PID, P_PGID or P_ALL. id specifies the pid to wait on. options is constructed from the ORing of one or more of WEXITED, WSTOPPED or WCONTINUED and additionally may be ORed with WNOHANG or WNOWAIT. The return value is an object representing the data contained in the siginfo_t structure, namely: si_pid, si_uid, si_signo, si_status, si_code or None if WNOHANG is specified and there are no children in a waitable state. Problems are: * The given use of the *pid* argument is only for the case of `idtype=P_PID`. For `P_ALL` it is ignored, and for `P_PGID` it specifies that the child's PGID must be *pid*. * "One or more child processes" is misleading -- the function waits for until exactly one child process to exit (or aborts with WNOHANG). Sure, there can be multiple candidate processes, but this should be formulated differently. * The explanation of *options* is quite cumbersome, it seems to be copied directly from the manpage (where it is laid out much more clearly and with explanation of the different options). Additionally the flags P_*, W* and CLD_* are just stated as-is, and need explanation in the docs. You should not need to consult the manpage to be able to use the function at all. ---------- assignee: docs at python components: Documentation keywords: easy messages: 377263 nosy: docs at python, georg.brandl priority: normal severity: normal stage: needs patch status: open title: os.waitid() documentation needs TLC type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 13:04:52 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Sep 2020 17:04:52 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600707892.29.0.92057516999.issue41810@roundup.psfhosted.org> Guido van Rossum added the comment: > In any case, I'm ok with adding `NoneType` and `NotImplementedType` to the PR. Please do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 13:06:29 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 17:06:29 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1600707989.65.0.649469244903.issue41824@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python title: Docs for typing.ForwardRef don't state that is was added in 3.7 -> Docs for typing.ForwardRef don't state that it was added in 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 13:56:12 2020 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 21 Sep 2020 17:56:12 +0000 Subject: [issue41826] test_peg_generator compilation warnings Message-ID: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> New submission from Skip Montanaro : I don't see anything like this while building Python proper, but when test_peg_generator is run, it spews a few compiler warnings. Platform is Ubuntu 20.04. Seems low-ish priority, but I saw no mention of it in a quick bpo search, so thought I would toss it out there. ------------------------------------------------- % ./python ./Tools/scripts/run_tests.py test_peg_generator /home/skip/src/python/cpython/python -u -W default -bb -E -m test -r -w -j 0 -u all,-largefile,-audio,-gui test_peg_generator Using random seed 1793668 0:00:00 load avg: 0.09 Run tests in parallel using 10 child processes 0:00:30 load avg: 0.45 running: test_peg_generator (30.0 sec) 0:00:54 load avg: 0.64 [1/1] test_peg_generator passed (54.8 sec) In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmp3fq3wryo/parse.c:2: /tmp/tmp3fq3wryo/parse.c: In function ?start_rule?: /tmp/tmp3fq3wryo/parse.c:59:29: warning: passing argument 1 of ?_Py_Module? from incompatible pointer type [-Wincompatible-pointer-types] 59 | _res = Module ( a , NULL , p -> arena ); | ^ | | | asdl_seq * {aka struct *} /home/skip/src/python/cpython/Include/Python-ast.h:541:39: note: in definition of macro ?Module? 541 | #define Module(a0, a1, a2) _Py_Module(a0, a1, a2) | ^~ /home/skip/src/python/cpython/Include/Python-ast.h:542:35: note: expected ?asdl_stmt_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 542 | mod_ty _Py_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores, | ~~~~~~~~~~~~~~~~^~~~ In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmpybnujtsb/parse.c:2: /tmp/tmpybnujtsb/parse.c: In function ?start_rule?: /tmp/tmpybnujtsb/parse.c:61:29: warning: passing argument 1 of ?_Py_Module? from incompatible pointer type [-Wincompatible-pointer-types] 61 | _res = Module ( a , NULL , p -> arena ); | ^ | | | asdl_seq * {aka struct *} /home/skip/src/python/cpython/Include/Python-ast.h:541:39: note: in definition of macro ?Module? 541 | #define Module(a0, a1, a2) _Py_Module(a0, a1, a2) | ^~ /home/skip/src/python/cpython/Include/Python-ast.h:542:35: note: expected ?asdl_stmt_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 542 | mod_ty _Py_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores, | ~~~~~~~~~~~~~~~~^~~~ In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmpgbehpd3_/parse.c:2: /tmp/tmpgbehpd3_/parse.c: In function ?start_rule?: /tmp/tmpgbehpd3_/parse.c:77:29: warning: passing argument 1 of ?_Py_Module? from incompatible pointer type [-Wincompatible-pointer-types] 77 | _res = Module ( a , NULL , p -> arena ); | ^ | | | asdl_seq * {aka struct *} /home/skip/src/python/cpython/Include/Python-ast.h:541:39: note: in definition of macro ?Module? 541 | #define Module(a0, a1, a2) _Py_Module(a0, a1, a2) | ^~ /home/skip/src/python/cpython/Include/Python-ast.h:542:35: note: expected ?asdl_stmt_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 542 | mod_ty _Py_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores, | ~~~~~~~~~~~~~~~~^~~~ /tmp/tmpgbehpd3_/parse.c: In function ?import_from_rule?: /tmp/tmpgbehpd3_/parse.c:148:58: warning: passing argument 2 of ?_Py_ImportFrom? from incompatible pointer type [-Wincompatible-pointer-types] 148 | _res = _Py_ImportFrom ( c -> v . Name . id , d , 0 , EXTRA ); | ^ | | | asdl_seq * {aka struct *} In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmpgbehpd3_/parse.c:2: /home/skip/src/python/cpython/Include/Python-ast.h:625:60: note: expected ?asdl_alias_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 625 | stmt_ty _Py_ImportFrom(identifier module, asdl_alias_seq * names, int level, | ~~~~~~~~~~~~~~~~~^~~~~ /tmp/tmpgbehpd3_/parse.c:190:44: warning: passing argument 2 of ?_Py_ImportFrom? from incompatible pointer type [-Wincompatible-pointer-types] 190 | _res = _Py_ImportFrom ( NULL , c , 1 , EXTRA ); | ^ | | | asdl_seq * {aka struct *} In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmpgbehpd3_/parse.c:2: /home/skip/src/python/cpython/Include/Python-ast.h:625:60: note: expected ?asdl_alias_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 625 | stmt_ty _Py_ImportFrom(identifier module, asdl_alias_seq * names, int level, | ~~~~~~~~~~~~~~~~~^~~~~ In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmplmi91q5h/parse.c:2: /tmp/tmplmi91q5h/parse.c: In function ?start_rule?: /tmp/tmplmi91q5h/parse.c:69:29: warning: passing argument 1 of ?_Py_Module? from incompatible pointer type [-Wincompatible-pointer-types] 69 | _res = Module ( a , NULL , p -> arena ); | ^ | | | asdl_seq * {aka struct *} /home/skip/src/python/cpython/Include/Python-ast.h:541:39: note: in definition of macro ?Module? 541 | #define Module(a0, a1, a2) _Py_Module(a0, a1, a2) | ^~ /home/skip/src/python/cpython/Include/Python-ast.h:542:35: note: expected ?asdl_stmt_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 542 | mod_ty _Py_Module(asdl_stmt_seq * body, asdl_type_ignore_seq * type_ignores, | ~~~~~~~~~~~~~~~~^~~~ /tmp/tmplmi91q5h/parse.c: In function ?listcomp_rule?: /tmp/tmplmi91q5h/parse.c:199:39: warning: passing argument 2 of ?_Py_ListComp? from incompatible pointer type [-Wincompatible-pointer-types] 199 | _res = _Py_ListComp ( b , c , EXTRA ); | ^ | | | asdl_seq * {aka struct *} In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmplmi91q5h/parse.c:2: /home/skip/src/python/cpython/Include/Python-ast.h:676:60: note: expected ?asdl_comprehension_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 676 | expr_ty _Py_ListComp(expr_ty elt, asdl_comprehension_seq * generators, int | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ /tmp/tmplmi91q5h/parse.c: In function ?_tmp_2_rule?: /tmp/tmplmi91q5h/parse.c:385:110: warning: passing argument 3 of ?_Py_comprehension? from incompatible pointer type [-Wincompatible-pointer-types] 385 | _res = _Py_comprehension ( _Py_Name ( ( ( expr_ty ) a ) -> v . Name . id , Store , EXTRA ) , b , c , ( y == NULL ) ? 0 : 1 , p -> arena ); | ^ | | | asdl_seq * {aka struct *} In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmplmi91q5h/parse.c:2: /home/skip/src/python/cpython/Include/Python-ast.h:748:38: note: expected ?asdl_expr_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 747 | comprehension_ty _Py_comprehension(expr_ty target, expr_ty iter, asdl_expr_seq | ~~~~~~~~~~~~~ 748 | * ifs, int is_async, PyArena *arena); | ~~^~~ /tmp/tmpmg0f1xoj/parse.c: In function ?with_stmt_rule?: /tmp/tmpmg0f1xoj/parse.c:270:31: warning: passing argument 1 of ?_Py_With? from incompatible pointer type [-Wincompatible-pointer-types] 270 | _res = _Py_With ( b , _PyPegen_singleton_seq ( p , c ) , NULL , EXTRA ); | ^ | | | asdl_seq * {aka struct *} In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmpmg0f1xoj/parse.c:2: /home/skip/src/python/cpython/Include/Python-ast.h:603:38: note: expected ?asdl_withitem_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 603 | stmt_ty _Py_With(asdl_withitem_seq * items, asdl_stmt_seq * body, string | ~~~~~~~~~~~~~~~~~~~~^~~~~ /tmp/tmpmg0f1xoj/parse.c:270:35: warning: passing argument 2 of ?_Py_With? from incompatible pointer type [-Wincompatible-pointer-types] 270 | _res = _Py_With ( b , _PyPegen_singleton_seq ( p , c ) , NULL , EXTRA ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | asdl_seq * {aka struct *} In file included from /home/skip/src/python/cpython/Parser/pegen.h:7, from /tmp/tmpmg0f1xoj/parse.c:2: /home/skip/src/python/cpython/Include/Python-ast.h:603:61: note: expected ?asdl_stmt_seq *? {aka ?struct *?} but argument is of type ?asdl_seq *? {aka ?struct *?} 603 | stmt_ty _Py_With(asdl_withitem_seq * items, asdl_stmt_seq * body, string | ~~~~~~~~~~~~~~~~^~~~ == Tests result: SUCCESS == 1 test OK. Total duration: 55.0 sec Tests result: SUCCESS ---------- components: Tests messages: 377265 nosy: skip.montanaro priority: normal severity: normal status: open title: test_peg_generator compilation warnings versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 14:05:58 2020 From: report at bugs.python.org (desbma) Date: Mon, 21 Sep 2020 18:05:58 +0000 Subject: [issue5811] io.BufferedReader.peek(): Documentation differs from Implementation In-Reply-To: <1240380953.7.0.732520909261.issue5811@psf.upfronthosting.co.za> Message-ID: <1600711558.46.0.578411541246.issue5811@roundup.psfhosted.org> Change by desbma : ---------- nosy: +desbma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 14:35:03 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 21 Sep 2020 18:35:03 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> Message-ID: <1600713303.65.0.522033555459.issue41826@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 14:36:08 2020 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 21 Sep 2020 18:36:08 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600713368.26.0.646855902289.issue41756@roundup.psfhosted.org> Yury Selivanov added the comment: > If you disagree with me, please say why, don't just merge the PR. Apologies, Mark. I didn't intend to merge something bypassing your opinion; just missed your comment between reviewing multiple PRs in a few unrelated repos. I'm sorry. On the actual naming subject, you proposed: > `PySendResult PyIter_Send(PyObject *obj, PyObject *arg, PyObject **result);` The problem with using this name is that ideally we should also support non-native coroutine and generator implementations (i.e. resolve the "send" attribute and call it using Python calling convention). Ideally we should have two C APIs: one low-level supporting only native objects and a high level one, supporting all kinds of them. Can we perhaps add both `PyGen_Send()` and `PyCoro_Send()` for now that would only accept generators and coroutines respectively? After that we can discuss adding a more generic `PyIter_Send`? > Would you revert the PR, please. Since this is in 3.10/master that nobody uses right now except us (Python core devs), can we just issue a follow up PR to fix whatever is there to fix? I'd like to avoid the churn of reverting, and again, I apologize for pushing this a bit hastily. Let me know if you actually want a revert and I'll do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 14:37:26 2020 From: report at bugs.python.org (Bas van Beek) Date: Mon, 21 Sep 2020 18:37:26 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600713446.74.0.55934657277.issue41810@roundup.psfhosted.org> Bas van Beek added the comment: `NoneType` and `NotImplementedType` have been added to the PR as of the latest set of pushes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 14:49:48 2020 From: report at bugs.python.org (jeet shah) Date: Mon, 21 Sep 2020 18:49:48 +0000 Subject: [issue41827] 2D array issue Message-ID: <1600714188.09.0.0697938264435.issue41827@roundup.psfhosted.org> New submission from jeet shah : See difference in output by changing array definition. ---------- files: matrix summation-Copy1.ipynb messages: 377268 nosy: jeetshahj12375 priority: normal severity: normal status: open title: 2D array issue type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file49469/matrix summation-Copy1.ipynb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 14:58:02 2020 From: report at bugs.python.org (Brett Cannon) Date: Mon, 21 Sep 2020 18:58:02 +0000 Subject: [issue35328] Set a environment variable for venv prompt In-Reply-To: <1543335149.71.0.788709270274.issue35328@psf.upfronthosting.co.za> Message-ID: <1600714682.58.0.470410504977.issue35328@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: fixed -> status: closed -> open versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:03:23 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 21 Sep 2020 19:03:23 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600715003.94.0.85307744569.issue41810@roundup.psfhosted.org> Eric V. Smith added the comment: Does anyone know why types.EllipsisType was removed to begin with? I just want to make sure we're not repeating some mistake of the past. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:06:11 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 21 Sep 2020 19:06:11 +0000 Subject: [issue41827] 2D array issue In-Reply-To: <1600714188.09.0.0697938264435.issue41827@roundup.psfhosted.org> Message-ID: <1600715171.93.0.816092971098.issue41827@roundup.psfhosted.org> Eric V. Smith added the comment: Please provide the output you see and the output you expect. And it would be better if you could just post the code into the comment window. I, for one, cannot run your .ipynb file. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:06:56 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 21 Sep 2020 19:06:56 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> Message-ID: <1600715216.59.0.0182711956873.issue41826@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is because the types of the grammars in Lib/test/test_peg_generator/test_c_parser.py needs to be updated to use the new sequences ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:11:29 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 21 Sep 2020 19:11:29 +0000 Subject: [issue41820] ipaddress allows "00" in ipv4 address octets In-Reply-To: <1600584397.02.0.984052429754.issue41820@roundup.psfhosted.org> Message-ID: <1600715489.12.0.227023882445.issue41820@roundup.psfhosted.org> Eric V. Smith added the comment: I'm going to close this, for two reasons: - RFC 790 uses 000 in examples, do I think ipaddress is doing the correct thing already. - We'd be unlikely to change this in any event, for fear of breaking existing, working code. @anudeepballa07: if you find an RFC or other authoritative source that says 00 or 000 are not to be used, feel free to reopen this issue and we can discuss next steps. I'm also changing the title to make it easier to search for this issue in the future. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed title: ipaddress Library gives me incorrect results -> ipaddress allows "00" in ipv4 address octets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:14:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 21 Sep 2020 19:14:06 +0000 Subject: [issue41820] ipaddress allows "00" in ipv4 address octets In-Reply-To: <1600584397.02.0.984052429754.issue41820@roundup.psfhosted.org> Message-ID: <1600715646.88.0.90083430272.issue41820@roundup.psfhosted.org> Eric V. Smith added the comment: The first point should have been "RFC 790 uses 000 in examples, so I think ipaddress is doing the correct thing already." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:24:48 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 19:24:48 +0000 Subject: [issue40935] Links to Python3 docs for some libs return 404 In-Reply-To: <1591756890.13.0.690147132201.issue40935@roundup.psfhosted.org> Message-ID: <1600716288.03.0.434462434765.issue40935@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:27:29 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 19:27:29 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600716449.66.0.51983792627.issue40181@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> terry.reedy components: +IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:30:15 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Sep 2020 19:30:15 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600716615.04.0.481817839718.issue41810@roundup.psfhosted.org> Guido van Rossum added the comment: Bas can you do some research to answer Eric's question? In theory it should be possible to use git bisect to find it. I see it in 2.7 but not in 3.4. That's a fairly large interval, alas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:32:21 2020 From: report at bugs.python.org (Bas van Beek) Date: Mon, 21 Sep 2020 19:32:21 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600716741.43.0.19778808396.issue41810@roundup.psfhosted.org> Bas van Beek added the comment: According to the relevant commit (https://github.com/python/cpython/commit/c9543e42330e5f339d6419eba6a8c5a61a39aeca): "Removed all types from the 'types' module that are easily accessible through builtins." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:36:38 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 19:36:38 +0000 Subject: [issue38068] clean up configure logic for gettimeofday In-Reply-To: <1568033604.94.0.557427388401.issue38068@roundup.psfhosted.org> Message-ID: <1600716998.0.0.985921159293.issue38068@roundup.psfhosted.org> Irit Katriel added the comment: Can this be closed now? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:37:55 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 19:37:55 +0000 Subject: [issue37263] spawn asyncio subprocesses in a thread pool In-Reply-To: <1560412707.67.0.811242566129.issue37263@roundup.psfhosted.org> Message-ID: <1600717075.68.0.208845917275.issue37263@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +asyncio nosy: +yselivanov type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:42:12 2020 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 21 Sep 2020 19:42:12 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600717332.79.0.401124158511.issue41810@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks! Most of the deleted types *are* builtins (e.g. object, int). I assume the reasoning was just that if you wanted the type you could just write type(Ellipsis), type(None) etc. But that's too dynamic for static checkers, so we want *some* stable name for those back. Do any of the other deleted types strike you as possibly needing to come back? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:43:15 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 19:43:15 +0000 Subject: [issue35767] unittest loader doesn't work with partial test functions In-Reply-To: <1547774719.89.0.274196426974.issue35767@roundup.psfhosted.org> Message-ID: <1600717395.36.0.00512107433792.issue35767@roundup.psfhosted.org> Irit Katriel added the comment: Can this be closed now? ---------- components: +Tests nosy: +iritkatriel type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:49:06 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 19:49:06 +0000 Subject: [issue29745] asyncio: Make pause/resume_reading idepotent and no-op for closed transports In-Reply-To: <1488846253.21.0.430989162462.issue29745@psf.upfronthosting.co.za> Message-ID: <1600717746.91.0.0539709150706.issue29745@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +asyncio nosy: +asvetlov, yselivanov type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:48:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 19:48:42 +0000 Subject: [issue29745] asyncio: Make pause/resume_reading idepotent and no-op for closed transports In-Reply-To: <1488846253.21.0.430989162462.issue29745@psf.upfronthosting.co.za> Message-ID: <1600717722.08.0.956804436495.issue29745@roundup.psfhosted.org> Irit Katriel added the comment: Looks like this was done under issue32356, so this issue can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 15:59:23 2020 From: report at bugs.python.org (Bas van Beek) Date: Mon, 21 Sep 2020 19:59:23 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600718363.26.0.127100471322.issue41810@roundup.psfhosted.org> Bas van Beek added the comment: > Do any of the other deleted types strike you as possibly needing to come back? I don't think so, no. The only other one that stands out to me is `DictProxyType`, which has already been reintroduced as `MappingProxyType`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 16:08:33 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 21 Sep 2020 20:08:33 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600718913.56.0.0670084917248.issue41810@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for doing the research, Bas! It sounds like adding back in NoneType, NotImplementedType, and EllipsisType is appropriate, then. +1 The commit should have a comment about the reason: for type checkers which can't use type(Ellipsis), etc. I'll add a comment on the PR about adding a similar note to the blurb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 16:57:25 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Sep 2020 20:57:25 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600721845.08.0.0292349249862.issue41810@roundup.psfhosted.org> Raymond Hettinger added the comment: > Do any of the other deleted types strike you as possibly > needing to come back? Yes. NoneType would be useful. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 17:03:40 2020 From: report at bugs.python.org (jeet shah) Date: Mon, 21 Sep 2020 21:03:40 +0000 Subject: [issue41827] 2D array issue In-Reply-To: <1600714188.09.0.0697938264435.issue41827@roundup.psfhosted.org> Message-ID: <1600722220.57.0.303565400089.issue41827@roundup.psfhosted.org> jeet shah added the comment: after = [[1,2],[3,4]] rows, cols = (len(after), len(after[0])) before = [[0]*cols]*rows # before = [[0 for i in range(cols)] for j in range(rows)] #uncomment this array definition and comment above one... see difference in output. print(before) def calculation(a,b): s = after[0][0] for x in range(a+1): for y in range(b+1): s += before[x][y] before[a][b] = after[a][b] - s def cal2(): for x in range(len(after)): for y in range(len(after[0])): calculation(x,y) before[0][0] = after[0][0] print(before) cal2() #expected output: [[1, 1], [2, 0]] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 17:04:37 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Sep 2020 21:04:37 +0000 Subject: [issue41823] Add more fields to sys.float_info In-Reply-To: <1600650114.4.0.96172232586.issue41823@roundup.psfhosted.org> Message-ID: <1600722277.33.0.770059759774.issue41823@roundup.psfhosted.org> Raymond Hettinger added the comment: [Dong-hee Na] > However, since the type is the structsequence the > change can cause the ValueError: too many values > to unpack when the variable is used as a tuple Structseq also allows named fields that aren't part of the tuple. That is why I suggested, "consider adding new non-sequence fields ..." For example, the Posix stat result struct seq has optional fields ( st_blksize, st_blocks, st_rdev, and st_flags) that are available as attributes only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 17:06:32 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Sep 2020 21:06:32 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600722392.71.0.82778566618.issue40181@roundup.psfhosted.org> Raymond Hettinger added the comment: My students find the note to be very distracting. It is something that is needed no more than once. Afterwards, it becomes something that you have to train yourself to ignore. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 17:39:58 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 21 Sep 2020 21:39:58 +0000 Subject: [issue41827] 2D array issue In-Reply-To: <1600714188.09.0.0697938264435.issue41827@roundup.psfhosted.org> Message-ID: <1600724398.38.0.023217408698.issue41827@roundup.psfhosted.org> Eric V. Smith added the comment: Your example is too complex to work through in my head, but I suspect this is the issue you're seeing: https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x In any event, this is almost certainly not a bug in Python, but rather in your code. You might want to ask this question on the python-list mailing list https://mail.python.org/mailman/listinfo/python-list or on Stack Overflow, which are more appropriate venues than the bug tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 17:42:00 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 21:42:00 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600724520.8.0.414066489259.issue41815@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21385 pull_request: https://github.com/python/cpython/pull/22344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 17:42:09 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 21:42:09 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600724529.84.0.376758862124.issue41815@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21386 pull_request: https://github.com/python/cpython/pull/22345 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 18:00:44 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 22:00:44 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600725644.69.0.667463743896.issue41815@roundup.psfhosted.org> miss-islington added the comment: New changeset ca2d99d091a5b7768e92ee5ce7104aa6d8a3ed86 by Miss Islington (bot) in branch '3.8': bpo-41815: SQLite: segfault if backup called on closed database (GH-22322) https://github.com/python/cpython/commit/ca2d99d091a5b7768e92ee5ce7104aa6d8a3ed86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 18:02:39 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 22:02:39 +0000 Subject: [issue41737] Improper NotADirectoryError when opening a file in a fake directory In-Reply-To: <1599492997.14.0.974001441191.issue41737@roundup.psfhosted.org> Message-ID: <1600725759.48.0.89167589862.issue41737@roundup.psfhosted.org> Irit Katriel added the comment: The documentation for open says "If the file cannot be opened, an OSError is raised." NotADirectoryError and FileNotFoundError are both OSErrors. So the correct way to write Danny's code snippet, according to the documentation, is: try: open('/path/to/file/somename.txt') except OSError: """do something""" ---------- components: +IO nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 18:05:25 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 21 Sep 2020 22:05:25 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600725925.35.0.469063663648.issue41815@roundup.psfhosted.org> miss-islington added the comment: New changeset 4ee30c42441c3e5066d5080a22da53675aeae716 by Miss Islington (bot) in branch '3.9': bpo-41815: SQLite: segfault if backup called on closed database (GH-22322) https://github.com/python/cpython/commit/4ee30c42441c3e5066d5080a22da53675aeae716 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 18:07:57 2020 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 21 Sep 2020 22:07:57 +0000 Subject: [issue41815] SQLite: segfault if backup called on closed database In-Reply-To: <1600531699.45.0.309106066833.issue41815@roundup.psfhosted.org> Message-ID: <1600726077.38.0.546910394751.issue41815@roundup.psfhosted.org> Kyle Stanley added the comment: I've received approval from Lukasz to backport to 3.9 and 3.8, and have now merged the PRs. It could use a post-commit review from a core dev that has some additional experience with SQLite3, but it can be de-escalated from release blocker. ---------- priority: release blocker -> normal stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 18:30:59 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 22:30:59 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1600727459.84.0.815153282685.issue38445@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +IO versions: +Python 3.10, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 19:10:20 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 21 Sep 2020 23:10:20 +0000 Subject: [issue30700] fileinput inplace clobbers file without leaving backup on decode errors In-Reply-To: <1497845687.86.0.210018987991.issue30700@psf.upfronthosting.co.za> Message-ID: <1600729820.07.0.559705019434.issue30700@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +IO _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 19:21:03 2020 From: report at bugs.python.org (Ethan Furman) Date: Mon, 21 Sep 2020 23:21:03 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600730463.73.0.127691138878.issue37062@roundup.psfhosted.org> Ethan Furman added the comment: The only `AutoNumber` in the stdlib is as an example in the docs. Were you thinking of something else? ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 19:25:21 2020 From: report at bugs.python.org (Reuben Thomas) Date: Mon, 21 Sep 2020 23:25:21 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600730721.11.0.7037164305.issue37062@roundup.psfhosted.org> Reuben Thomas added the comment: That's the one I was thinking of: the example in the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 20:14:10 2020 From: report at bugs.python.org (Drew Scholz) Date: Tue, 22 Sep 2020 00:14:10 +0000 Subject: [issue41828] No longer able to override DATA_UPLOAD_MAX_MEMORY_SIZE outside of settings.py Message-ID: <1600733650.36.0.422785737088.issue41828@roundup.psfhosted.org> New submission from Drew Scholz : After upgrading our Django 1.11 project from Python 2.7 to 3.7, our single endpoint decorator to override django conf settings no longer works. requests.py inside the virtual environment /lib/python3.7/site-packages/django/http triggers the RequestDataTooBig exception (~line 271) before the change to DATA_UPLOAD_MAX_MEMORY_SIZE has been increased by our decorator. We are able to make the change global inside settings.py however we are concerned with the security vulnerabilities due to the size we want to allow for the single endpoint. ---------- files: decorators.py messages: 377293 nosy: drew.scholz priority: normal severity: normal status: open title: No longer able to override DATA_UPLOAD_MAX_MEMORY_SIZE outside of settings.py type: security versions: Python 3.7 Added file: https://bugs.python.org/file49470/decorators.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 20:23:25 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 00:23:25 +0000 Subject: [issue41816] need StrEnum in enum.py In-Reply-To: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> Message-ID: <1600734205.33.0.88272975781.issue41816@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 0063ff4e583505e69473caa978e476ea4c559b83 by Ethan Furman in branch 'master': bpo-41816: add `StrEnum` (GH-22337) https://github.com/python/cpython/commit/0063ff4e583505e69473caa978e476ea4c559b83 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 20:43:13 2020 From: report at bugs.python.org (Tony Wu) Date: Tue, 22 Sep 2020 00:43:13 +0000 Subject: [issue41829] sqlite3.Row always read as tuple when supplied to executemany Message-ID: <1600735393.55.0.581457090913.issue41829@roundup.psfhosted.org> New submission from Tony Wu : Supplying a sequence or sqlite3.Row objects to sqlite3.Connection.executemany will cause the Row objects to be interpreted as Sequences instead of Mappings even if the statement to be executed uses named parameter substitution. That is, values in the Rows are accessed using their numerical indices instead of column names. This script demonstrate how this is unexpected behavior. Issue found in Python 3.8.5 and 3.7.6. ---------- components: Extension Modules files: row_substitution.py messages: 377295 nosy: tony.wu priority: normal severity: normal status: open title: sqlite3.Row always read as tuple when supplied to executemany type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49471/row_substitution.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 20:52:26 2020 From: report at bugs.python.org (Tony Wu) Date: Tue, 22 Sep 2020 00:52:26 +0000 Subject: [issue41829] sqlite3.Row always read as tuple when supplied to executemany In-Reply-To: <1600735393.55.0.581457090913.issue41829@roundup.psfhosted.org> Message-ID: <1600735946.48.0.0311097802278.issue41829@roundup.psfhosted.org> Change by Tony Wu : ---------- nosy: +ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 23:24:51 2020 From: report at bugs.python.org (Yan Ren) Date: Tue, 22 Sep 2020 03:24:51 +0000 Subject: [issue38263] [Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE) In-Reply-To: <1569321399.19.0.207011593125.issue38263@roundup.psfhosted.org> Message-ID: <1600745091.28.0.00147697946237.issue38263@roundup.psfhosted.org> Yan Ren added the comment: append Nosy List. ---------- nosy: +pemryan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 23:49:44 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 03:49:44 +0000 Subject: [issue41817] Incorrect types in tkinter.EventType Enum In-Reply-To: <1600544218.82.0.650310547242.issue41817@roundup.psfhosted.org> Message-ID: <1600746584.56.0.875577212584.issue41817@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21387 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22348 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 23:54:01 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 03:54:01 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600746841.08.0.894313917005.issue37062@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21388 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 23:57:35 2020 From: report at bugs.python.org (Bug Reporter) Date: Tue, 22 Sep 2020 03:57:35 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600747055.87.0.14139211947.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: 1) I downloaded openssl-1.1.1g source code, compiled, exported LD_LIBRARY_PATH, did sudo ldconfig - ./python Lib/test/test_ssl.py now passes. If LD_LIBRARY_PATH is unset, it fails. Thank you for advice. 2) Tried the following independently from (1) ./configure make ./python Tools/ssl/multissltests.py --openssl=1.1.1g == Tests result: SUCCESS == All 15 tests OK. Total duration: 1 min 21 sec Tests result: SUCCESS *** INFO Tests finished in 0:05:52.488541 Python: 3.8.5 (default, Sep 21 2020, 23:02:31) [GCC 9.3.0] Executed all SSL tests. OpenSSL / LibreSSL versions: * OpenSSL 1.1.1g ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 21 23:59:07 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 03:59:07 +0000 Subject: [issue41816] need StrEnum in enum.py In-Reply-To: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> Message-ID: <1600747147.5.0.620610205811.issue41816@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 00:30:34 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 22 Sep 2020 04:30:34 +0000 Subject: [issue38068] clean up configure logic for gettimeofday In-Reply-To: <1568033604.94.0.557427388401.issue38068@roundup.psfhosted.org> Message-ID: <1600749034.9.0.0792992594023.issue38068@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 00:49:36 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 04:49:36 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600750176.8.0.471859354725.issue40181@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21389 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/22350 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 01:09:04 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 05:09:04 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600751344.15.0.918546962156.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 6c33385e3a1dce31d7b9037eebfc584075795dba by Serhiy Storchaka in branch 'master': bpo-41756: Refactor gen_send_ex(). (GH-22330) https://github.com/python/cpython/commit/6c33385e3a1dce31d7b9037eebfc584075795dba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 01:31:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 05:31:09 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1600752669.43.0.291816504954.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: I agree that we should add PyIter_Send() (the name is discussable, but PyIter_Send LGTM) which should support iterators and objects with the send() method. It would be much more useful for user, and can replace PyGen_Send() in the interpreter core code. But merging the PR with PyGen_Send() was not a mistake. It was good to split the changes on smaller steps easier to review. Vladimir, do you mind to create a new PR for PyIter_Send()? I seen its implementation in one of intermediate versions of your PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 01:44:03 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 05:44:03 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600753443.17.0.715382280357.issue40181@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 40a0625792e795cd41c4ba20475e3b770b53817a by Terry Jan Reedy in branch 'master': bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350) https://github.com/python/cpython/commit/40a0625792e795cd41c4ba20475e3b770b53817a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 01:44:26 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 05:44:26 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600753466.96.0.928303974315.issue40181@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21391 pull_request: https://github.com/python/cpython/pull/22352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 01:44:19 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 05:44:19 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600753459.71.0.396939787554.issue40181@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +21390 pull_request: https://github.com/python/cpython/pull/22351 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 02:02:53 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 06:02:53 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600754573.26.0.965850829251.issue40181@roundup.psfhosted.org> miss-islington added the comment: New changeset 7bcbb536dde2308558c6a80c011042c6c3efc626 by Miss Islington (bot) in branch '3.8': bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350) https://github.com/python/cpython/commit/7bcbb536dde2308558c6a80c011042c6c3efc626 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 02:05:15 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 06:05:15 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600754715.51.0.738805775007.issue40181@roundup.psfhosted.org> miss-islington added the comment: New changeset 6b731c48786bd30e9f8b86302dfb95a2640979a1 by Miss Islington (bot) in branch '3.9': bpo-40181: Remove '/' reminder in IDLE calltips. (GH-22350) https://github.com/python/cpython/commit/6b731c48786bd30e9f8b86302dfb95a2640979a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 02:20:54 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 06:20:54 +0000 Subject: [issue38445] os.path.exists() takes bool as argument and returns True In-Reply-To: <1570792602.16.0.709405121857.issue38445@roundup.psfhosted.org> Message-ID: <1600755654.29.0.545412265579.issue38445@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is a large change, so I take it. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 02:54:08 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 06:54:08 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600757648.64.0.724726891142.issue40181@roundup.psfhosted.org> Terry J. Reedy added the comment: Agreed. Patch removes the note, including from tests. ---------- stage: patch review -> commit review versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 02:54:24 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 06:54:24 +0000 Subject: [issue40181] IDLE: remove positional-only note from calltips In-Reply-To: <1586032094.19.0.965319984529.issue40181@roundup.psfhosted.org> Message-ID: <1600757664.4.0.815649353448.issue40181@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 03:52:06 2020 From: report at bugs.python.org (sanka sowmya) Date: Tue, 22 Sep 2020 07:52:06 +0000 Subject: [issue41830] "NameError: name 'AttributeError' is not defined" Message-ID: <1600761126.36.0.940081595242.issue41830@roundup.psfhosted.org> New submission from sanka sowmya : I am using 3.6.8 version of python. I am seeing an error as NameError: name 'AttributeError' is not defined URL where logs can be seen:https://bpa.st/DDTQ ---------- messages: 377305 nosy: sasowmy1 priority: normal severity: normal status: open title: "NameError: name 'AttributeError' is not defined" type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 04:02:08 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 08:02:08 +0000 Subject: [issue41831] Restore default __str__ of tkinter.EventType Message-ID: <1600761728.11.0.806408234986.issue41831@roundup.psfhosted.org> New submission from Serhiy Storchaka : The tkinter.EventType enum was introduced in issue27294. It implements __str__ as returning the name for the sole purpose of using in Event.__repr__(). But overriding __str__ in the str subclass may be not good idea, because different code will get different string representation, depending on whether it calls str() explicitly or implicitly (Python code) or read the content of the str object directly using C API (C code). The following code sets EventType.__str__ = str.__str__, so both method will get the same value. Instead Event.__repr__() was changed to use the name of the enum member directly. ---------- components: Tkinter messages: 377306 nosy: ethan.furman, serhiy.storchaka, terry.reedy priority: normal severity: normal status: open title: Restore default __str__ of tkinter.EventType type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 04:04:30 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 08:04:30 +0000 Subject: [issue41831] Restore default __str__ of tkinter.EventType In-Reply-To: <1600761728.11.0.806408234986.issue41831@roundup.psfhosted.org> Message-ID: <1600761870.23.0.908354751905.issue41831@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +21392 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22354 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 04:12:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 08:12:39 +0000 Subject: [issue41831] Restore default __str__ of tkinter.EventType In-Reply-To: <1600761728.11.0.806408234986.issue41831@roundup.psfhosted.org> Message-ID: <1600762359.07.0.104593845389.issue41831@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +21393 pull_request: https://github.com/python/cpython/pull/22355 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 04:27:32 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 08:27:32 +0000 Subject: [issue41830] "NameError: name 'AttributeError' is not defined" In-Reply-To: <1600761126.36.0.940081595242.issue41830@roundup.psfhosted.org> Message-ID: <1600763252.1.0.0404589950929.issue41830@roundup.psfhosted.org> Serhiy Storchaka added the comment: It can happen when some objects with __del__ are kept alive at the interpreter shutdown stage and outlive the builtins module. I have not seen such errors for a long time. Could you reproduce it on newer Python versions? Could you reproduce it with simpler script? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 06:29:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 10:29:32 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL Message-ID: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> New submission from STINNER Victor : When a Python type is defined in a C extension module as a static type, its documentation can be a NULL string (NULL pointer). But PyType_FromSpec() does crash if tp_doc is NULL, since this change: commit 032400b2d83ba1c2e4ee1cd33f51e9a598b2cf6c Author: Georg Brandl Date: Sat Feb 19 21:47:02 2011 +0000 #11249: in PyType_FromSpec, copy tp_doc slot since it usually will point to a static string literal which should not be deallocated together with the type. (...) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index e9c7591b81..b1fe44ebe4 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2347,6 +2347,17 @@ PyObject* PyType_FromSpec(PyType_Spec *spec) goto fail; } *(void**)(res_start + slotoffsets[slot->slot]) = slot->pfunc; + + /* need to make a copy of the docstring slot, which usually + points to a static string literal */ + if (slot->slot == Py_tp_doc) { + ssize_t len = strlen(slot->pfunc)+1; + char *tp_doc = PyObject_MALLOC(len); + if (tp_doc == NULL) + goto fail; + memcpy(tp_doc, slot->pfunc, len); + res->ht_type.tp_doc = tp_doc; + } } return (PyObject*)res; I propose to accept tp_doc=NULL in PyType_FromSpec(), as we do in static types. I noticed this difference while reviewing PR 22220 which convert _lsprof extension static types to heap types. ---------- components: Interpreter Core messages: 377308 nosy: vstinner priority: normal severity: normal status: open title: PyType_FromSpec() should accept tp_doc=NULL versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 06:35:31 2020 From: report at bugs.python.org (Georg Brandl) Date: Tue, 22 Sep 2020 10:35:31 +0000 Subject: [issue41825] os.waitid() documentation needs TLC In-Reply-To: <1600706510.78.0.601178112511.issue41825@roundup.psfhosted.org> Message-ID: <1600770931.97.0.410829583115.issue41825@roundup.psfhosted.org> Change by Georg Brandl : ---------- keywords: +patch pull_requests: +21394 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22356 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 06:41:45 2020 From: report at bugs.python.org (Vidar Fauske) Date: Tue, 22 Sep 2020 10:41:45 +0000 Subject: [issue35144] TemporaryDirectory clean-up fails with unsearchable directories In-Reply-To: <1541148008.66.0.788709270274.issue35144@psf.upfronthosting.co.za> Message-ID: <1600771305.56.0.165538431378.issue35144@roundup.psfhosted.org> Vidar Fauske added the comment: On Python 3.8.5 on Windows using the code from the above patch I recently got a stack overflow: Thread 0x00002054 (most recent call first): File "...\lib\concurrent\futures\thread.py", line 78 in _worker File "...\lib\threading.py", line 870 in run File "...\lib\threading.py", line 932 in _bootstrap_inner File "...\lib\threading.py", line 890 in _bootstrap Thread 0x00000de4 (most recent call first): File "...\lib\concurrent\futures\thread.py", line 78 in _worker File "...\lib\threading.py", line 870 in run File "...\lib\threading.py", line 932 in _bootstrap_inner File "...\lib\threading.py", line 890 in _bootstrap Current thread 0x00004700 (most recent call first): File "...\lib\tempfile.py", line 803 in onerror File "...\lib\shutil.py", line 619 in _rmtree_unsafe File "...\lib\shutil.py", line 737 in rmtree File "...\lib\tempfile.py", line 814 in _rmtree File "...\lib\tempfile.py", line 806 in onerror File "...\lib\shutil.py", line 619 in _rmtree_unsafe File "...\lib\shutil.py", line 737 in rmtree ... repeating ------------------------------------------- In my case, the outer `exc_info` from rmtree is: PermissionError(13, 'The process cannot access the file because it is being used by another process') And the inner exception from `_os.unlink(path)` is: PermissionError(13, 'Access is denied') I would say that expected behavior in this case would be to let the 'file is in use' error raise, instead of killing the process with an SO. ---------- nosy: +vidartf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 06:45:36 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 22 Sep 2020 10:45:36 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1600771536.36.0.910905516758.issue40670@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:14:59 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 22 Sep 2020 11:14:59 +0000 Subject: [issue41828] No longer able to override DATA_UPLOAD_MAX_MEMORY_SIZE outside of settings.py In-Reply-To: <1600733650.36.0.422785737088.issue41828@roundup.psfhosted.org> Message-ID: <1600773299.65.0.339610092666.issue41828@roundup.psfhosted.org> Eric V. Smith added the comment: This seems like a Django specific error, in which case this isn't the correct bug tracker to report the problem. Can you reproduce a problem with just straight Python, without using Django? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:32:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 11:32:43 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) In-Reply-To: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> Message-ID: <1600774363.56.0.357870886848.issue41739@roundup.psfhosted.org> STINNER Victor added the comment: See also https://pythondev.readthedocs.io/unstable_tests.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:32:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 11:32:29 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) In-Reply-To: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> Message-ID: <1600774349.69.0.209352539588.issue41739@roundup.psfhosted.org> STINNER Victor added the comment: Previous issues: * bpo-30131: "test_logging now joins queue threads" * bpo-30830: test_logging uses threading_setup/cleanup, logging.config.listen() calls server_close(), socketserver.ThreadingMixIn.server_close() * bpo-31235: Fix ResourceWarning in test_logging ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:36:05 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 22 Sep 2020 11:36:05 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1600774565.95.0.0966092894781.issue38225@roundup.psfhosted.org> Stefan Behnel added the comment: FYI, https://github.com/cython/cython/pull/3427 has been merged into Cython. In Cython 3.0, compiled coroutines will disguise as non-compiled coroutines, from the PoV of asyncio. Restricting this ticket to Py3.10 since we're rather discussing a new feature now. ---------- versions: +Python 3.10 -Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:47:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 11:47:35 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted Message-ID: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> New submission from STINNER Victor : When debugging race conditions in a multithreaded application with many threads, it's hard to debug when threads have generic names like "Thread-3". I propose to use the target name in threading.Thread constructor if the name parameter is omitted. See for example bpo-41739 with "Dangling thread: ": the "Thread-3" name is not helpful. I suspect that the bug comes from threading.Thread(target=remove_loop, args=(fn, del_count)): with my proposed change, the thread would be called "target=remove_loop", which is more helpful than "Thread". Fall back on _newname() as usual if target.__name__ attribute does not exist. Attached PR implements this idea. ---------- components: Library (Lib) messages: 377314 nosy: vstinner priority: normal severity: normal status: open title: threading.Thread: use target name if the name parameter is omitted versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:55:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 11:55:41 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600775741.6.0.768646398019.issue41833@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +21395 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:56:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 11:56:27 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) In-Reply-To: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> Message-ID: <1600775787.13.0.729950959807.issue41739@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-41833 "threading.Thread: use target name if the name parameter is omitted" to help me to debug this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 07:57:20 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 11:57:20 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1600775840.28.0.271107248816.issue40670@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +21396 pull_request: https://github.com/python/cpython/pull/22358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 08:27:21 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 12:27:21 +0000 Subject: [issue35144] TemporaryDirectory clean-up fails with unsearchable directories In-Reply-To: <1541148008.66.0.788709270274.issue35144@psf.upfronthosting.co.za> Message-ID: <1600777641.51.0.527297015413.issue35144@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Vidar! I wasn't sure about Windows, but was not able to reproduce possible failures. Your report gives a clue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 08:39:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 12:39:27 +0000 Subject: [issue41834] Remove _Py_CheckRecursionLimit variable Message-ID: <1600778367.51.0.464121227135.issue41834@roundup.psfhosted.org> New submission from STINNER Victor : _Py_CheckRecursionLimit variable is no longer needed and can be removed. In Python 3.9, I added a recursion limit per interpreter. In Python 3.8 and older, it was used by _Py_MakeRecCheck() macro to check for recursion error. Previously, the _Py_CheckRecursionLimit variable was kept for backward compatibility with the stable ABI, but in Python 3.8 and older, Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() could not be used with the limited C API since these macros accessed PyThreadState structure member, whereas the structure is opaque in the limited C API. Attached PR removed the variable. --- (3) bpo-40513: Limit made per interpreter. commit 4e30ed3af06ae655f4cb8aad8cba21f341384250 Author: Victor Stinner Date: Tue May 5 16:52:52 2020 +0200 bpo-40513: Per-interpreter recursion_limit (GH-19929) Move recursion_limit member from _PyRuntimeState.ceval to PyInterpreterState.ceval. * Py_SetRecursionLimit() now only sets _Py_CheckRecursionLimit of ceval.c if the current Python thread is part of the main interpreter. * Inline _Py_MakeEndRecCheck() into _Py_LeaveRecursiveCall(). * Convert _Py_RecursionLimitLowerWaterMark() macro into a static inline function. --- (2) bpo-38644: The _Py_CheckRecursionLimit variable was used by Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() macros. I converted these macros into function calls in Python 3.9: commit f4b1e3d7c64985f5d5b00f6cc9a1c146bbbfd613 Author: Victor Stinner Date: Mon Nov 4 19:48:34 2019 +0100 bpo-38644: Add Py_EnterRecursiveCall() to the limited API (GH-17046) Provide Py_EnterRecursiveCall() and Py_LeaveRecursiveCall() as regular functions for the limited API. Previously, there were defined as macros, but these macros didn't work with the limited API which cannot access PyThreadState.recursion_depth field. Remove _Py_CheckRecursionLimit from the stable ABI. Add Include/cpython/ceval.h header file. In pycore_ceval.h, the function is overriden by a macro which points to an inline function which uses: * tstate->recursion_depth * tstate->interp->ceval.recursion_limit * tstate->stackcheck_counter (if USE_STACKCHECK macro is defined) --- (1) bpo-31857: Original change adding the FIXME. commit 1896793520a49a6f97ae360c0b288967e56b005e Author: pdox Date: Wed Oct 25 23:03:01 2017 -0700 bpo-31857: Make the behavior of USE_STACKCHECK deterministic (#4098) This change added the FIXME comment: /* Due to the macros in which it's used, _Py_CheckRecursionLimit is in the stable ABI. It should be removed therefrom when possible. */ ---------- components: C API messages: 377317 nosy: vstinner priority: normal severity: normal status: open title: Remove _Py_CheckRecursionLimit variable versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 08:47:39 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 12:47:39 +0000 Subject: [issue41834] Remove _Py_CheckRecursionLimit variable In-Reply-To: <1600778367.51.0.464121227135.issue41834@roundup.psfhosted.org> Message-ID: <1600778859.05.0.961658102795.issue41834@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +21397 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 08:56:44 2020 From: report at bugs.python.org (Marco Sulla) Date: Tue, 22 Sep 2020 12:56:44 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords Message-ID: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> New submission from Marco Sulla : I've done a PR that speeds up the vectorcall creation of a dict using keyword arguments. The PR in practice creates a insertdict_init(), a specialized version of insertdict. I quote the comment to the function: Same to insertdict but specialized for inserting without resizing and for dict that are populated in a loop and was empty before (see the empty arg). Note that resizing must be done before calling this function. If not possible, use insertdict(). Furthermore, ma_version_tag is left unchanged, you have to change it after calling this function (probably at the end of a loop). This change speeds up the code up to a 30%. Tested with: python -m timeit -n 2000 --setup "from uuid import uuid4 ; o = {str(uuid4()).replace('-', '') : str(uuid4()).replace('-', '') for i in range(10000)}" "dict(**o)" ---------- components: Interpreter Core messages: 377318 nosy: Marco Sulla, inada.naoki priority: normal pull_requests: 21398 severity: normal status: open title: Speed up dict vectorcall creation using keywords versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 09:16:54 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 13:16:54 +0000 Subject: [issue40670] supplying an empty string to timeit causes an IndentationError In-Reply-To: <1589805861.06.0.616610250992.issue40670@roundup.psfhosted.org> Message-ID: <1600780614.28.0.28323162703.issue40670@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 557b9a52edc4445cec293f2cc2c268c4f564adcf by Serhiy Storchaka in branch 'master': bpo-40670: More reliable validation of statements in timeit.Timer. (GH-22358) https://github.com/python/cpython/commit/557b9a52edc4445cec293f2cc2c268c4f564adcf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 09:19:18 2020 From: report at bugs.python.org (pmp-p) Date: Tue, 22 Sep 2020 13:19:18 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1600780757.99.0.365618584055.issue32682@roundup.psfhosted.org> Change by pmp-p : ---------- pull_requests: +21399 pull_request: https://github.com/python/cpython/pull/22361 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 09:31:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 13:31:41 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600781501.22.0.536698791906.issue41833@roundup.psfhosted.org> Serhiy Storchaka added the comment: And what if run different threads with the same target or with different targets with the same name? Would not "Thread-3" be more useful in this case? for i in range(10): Thread(target=print, args=(i,)).start() for i in range(10): def doit(i=i): print(i) Thread(target=doit).start() ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:01:00 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 14:01:00 +0000 Subject: [issue41816] need StrEnum in enum.py In-Reply-To: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> Message-ID: <1600783260.14.0.116836924723.issue41816@roundup.psfhosted.org> Ethan Furman added the comment: >From Serhiy Storchaka: --------------------- The only exception is StrEnum -- overriding __str__ of str subclass may be not safe. Some code will call str() implicitly, other will read the string content of the object directly, and they will be different. ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:04:23 2020 From: report at bugs.python.org (Philippe Ombredanne) Date: Tue, 22 Sep 2020 14:04:23 +0000 Subject: [issue41836] Improve ctypes error reporting with missing DLL path Message-ID: <1600783463.67.0.783578166669.issue41836@roundup.psfhosted.org> New submission from Philippe Ombredanne : When the dependency of a DLL is missing (at least on Windows) the error " OSError: [WinError 126] The specified module could not be found" is raised when calling ctypes.CDLL(dll_path) even when this "dll_path" exists... because the error comes from another DLL. These errors are really hard to diagnose because the path of the missing DLL is not returned in the exception message. Returning it would help fixing these kind of errors quickly. Researching errors such as this one https://github.com/nexB/scancode-toolkit/issues/2236 wastes quite a bit of time and would be made a non issue if we had the path in the error message. ---------- components: ctypes messages: 377322 nosy: pombredanne priority: normal severity: normal status: open title: Improve ctypes error reporting with missing DLL path type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:07:53 2020 From: report at bugs.python.org (Kyle Altendorf) Date: Tue, 22 Sep 2020 14:07:53 +0000 Subject: [issue41836] Improve ctypes error reporting with missing DLL path In-Reply-To: <1600783463.67.0.783578166669.issue41836@roundup.psfhosted.org> Message-ID: <1600783673.58.0.481658778429.issue41836@roundup.psfhosted.org> Change by Kyle Altendorf : ---------- nosy: +altendky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:08:16 2020 From: report at bugs.python.org (Florian Bruhin) Date: Tue, 22 Sep 2020 14:08:16 +0000 Subject: [issue41836] Improve ctypes error reporting with missing DLL path In-Reply-To: <1600783463.67.0.783578166669.issue41836@roundup.psfhosted.org> Message-ID: <1600783696.02.0.192634097308.issue41836@roundup.psfhosted.org> Change by Florian Bruhin : ---------- nosy: +The Compiler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:09:07 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 22 Sep 2020 14:09:07 +0000 Subject: [issue40564] Using zipfile.Path with several files prematurely closes zip In-Reply-To: <1588952821.29.0.991302590341.issue40564@roundup.psfhosted.org> Message-ID: <1600783747.02.0.841488051195.issue40564@roundup.psfhosted.org> Jason R. Coombs added the comment: I've also created this alternative to option 2: - https://github.com/jaraco/zipp/tree/bugfix/bpo-40564-mixin This alternative approach uses a mix-in rather than subclasses, creating a new class on-demand. I was hoping this approach would enable just augmenting the instance rather than affecting `source.__class__`, but when I got to the implementation, I found that `source.__class__` had to be mutated regardless. This approach does have an advantage over option 2 in that it would support other ZipFile subclasses for source. It has the disadvantage in that it creates a new subclass for every instance created. I've thought about it a lot and while I'm not particularly happy with any of the approaches, I'm leaning toward option 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:13:47 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 22 Sep 2020 14:13:47 +0000 Subject: [issue41836] Improve ctypes error reporting with missing DLL path In-Reply-To: <1600783463.67.0.783578166669.issue41836@roundup.psfhosted.org> Message-ID: <1600784027.01.0.655571161449.issue41836@roundup.psfhosted.org> Eric V. Smith added the comment: My understanding is that Windows doesn't tell you which DLL is missing. I think the best we could do is append something to the error message saying "or one its dependencies". ---------- components: +Windows nosy: +eric.smith, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:14:52 2020 From: report at bugs.python.org (Florian Bruhin) Date: Tue, 22 Sep 2020 14:14:52 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600784092.84.0.92126737523.issue25655@roundup.psfhosted.org> Change by Florian Bruhin : ---------- nosy: +The Compiler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:16:25 2020 From: report at bugs.python.org (Philippe Ombredanne) Date: Tue, 22 Sep 2020 14:16:25 +0000 Subject: [issue41836] Improve ctypes error reporting with missing DLL path In-Reply-To: <1600783463.67.0.783578166669.issue41836@roundup.psfhosted.org> Message-ID: <1600784185.81.0.698284448809.issue41836@roundup.psfhosted.org> Philippe Ombredanne added the comment: Eric, Thanks! This is IMHO a dupe of https://bugs.python.org/issue25655 in earnest. So I am closing this in favor of that and will carry over comments there ---------- components: -Windows resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:18:56 2020 From: report at bugs.python.org (Philippe Ombredanne) Date: Tue, 22 Sep 2020 14:18:56 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600784336.97.0.610943418119.issue25655@roundup.psfhosted.org> Philippe Ombredanne added the comment: >From https://bugs.python.org/issue41836 closed as a dupe of this: When the dependency of a DLL is missing (at least on Windows) the error " OSError: [WinError 126] The specified module could not be found" is raised when calling ctypes.CDLL(dll_path) even when this "dll_path" exists... because the error comes from another DLL. These errors are really hard to diagnose because the path of the missing DLL is not returned in the exception message. Returning it would help fixing these kind of errors quickly. Researching errors such as this one https://github.com/nexB/scancode-toolkit/issues/2236 wastes quite a bit of time and would be made a non issue if we had the path in the error message. and this reply from Eric Smith: https://bugs.python.org/msg377324 > Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2020-09-22 14:13 > My understanding is that Windows doesn't tell you which DLL is missing. I think the best we could do is append something to the error message saying "or one its dependencies". ---------- nosy: +pombredanne _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:22:10 2020 From: report at bugs.python.org (Kyle Altendorf) Date: Tue, 22 Sep 2020 14:22:10 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600784530.05.0.526771113117.issue25655@roundup.psfhosted.org> Change by Kyle Altendorf : ---------- nosy: +altendky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:26:56 2020 From: report at bugs.python.org (Philippe Ombredanne) Date: Tue, 22 Sep 2020 14:26:56 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600784816.53.0.763259352141.issue25655@roundup.psfhosted.org> Philippe Ombredanne added the comment: Eric Smith, you wrote: > My understanding is that Windows doesn't tell you which DLL is missing. I think the best we could do is append something to the error message saying "or one its dependencies". If we have such an error message, this means the main DLL exists: the original path passed to ctypes exists and is a valid DLL otherwise the message would be different. So I think that this is always a direct or indirect dependency of that primary DLL that would be missing and we could be explicit in the error message. We could also provide some hints in the error message on how to research the issue may be? ---------- nosy: -altendky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:32:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 14:32:03 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600785123.31.0.664198699481.issue41833@roundup.psfhosted.org> STINNER Victor added the comment: > And what if run different threads with the same target or with different targets with the same name? If multiple Thread objects using the same target (or different targets with the same name), they all get the same name using my PR 22357. > Would not "Thread-3" be more useful in this case? Well, that's an open question. In my experience, "Thread" name is pretty useless. What if I modify my PR to add "-{counter}" (ex: "func-3" for target.__name__="func") to the default name? Reuse _counter(). Pseudo-code: self._name = str(name) try: base_name = target.__name__ except AttributeError: base_name = "Thread" if not self._name: self._name = "{base_name)-{_counter()}" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:39:10 2020 From: report at bugs.python.org (Vidar Fauske) Date: Tue, 22 Sep 2020 14:39:10 +0000 Subject: [issue35144] TemporaryDirectory clean-up fails with unsearchable directories In-Reply-To: <1541148008.66.0.788709270274.issue35144@psf.upfronthosting.co.za> Message-ID: <1600785550.22.0.431693639906.issue35144@roundup.psfhosted.org> Vidar Fauske added the comment: A somewhat easy repro: Create the temporary directory, add a subdir (not sure if subdir truly necessary at this point), use `os.chdir()` to set the cwd to that subdir. Clean up the temp dir. The cwd should prevent the deletion because it will be "in use". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:40:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 14:40:49 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600785649.99.0.680031956679.issue41833@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-15500 "Python should support exporting thread names to the OS". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:46:33 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 14:46:33 +0000 Subject: [issue41816] need StrEnum in enum.py In-Reply-To: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> Message-ID: <1600785993.77.0.0880060626954.issue41816@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +21400 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:48:19 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 14:48:19 +0000 Subject: [issue36666] threading.Thread should have way to catch an exception thrown within In-Reply-To: <1555637775.9.0.13238688405.issue36666@roundup.psfhosted.org> Message-ID: <1600786099.76.0.00538613244721.issue36666@roundup.psfhosted.org> STINNER Victor added the comment: I consider that this issue as a duplicate of bpo-1230540. Python 3.8 has a new threading.excepthook hook which can be used in various ways to decide how to handle uncatched thread exceptions. https://docs.python.org/dev/library/threading.html#threading.excepthook ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add threading.excepthook() to handle uncaught exceptions raised by Thread.run() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:49:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 14:49:46 +0000 Subject: [issue15500] Python should support exporting thread names to the OS In-Reply-To: <1343650770.87.0.181202709436.issue15500@psf.upfronthosting.co.za> Message-ID: <1600786186.55.0.878436418599.issue15500@roundup.psfhosted.org> STINNER Victor added the comment: bpo-18006 "Set thread name in linux kernel" was marked as a duplicate of this issue: """ In linux (Since 2.6.9) we can use syscall prctl(PR_SET_NAME, "Some thread name") to set thread name to the kernel. (...) """ ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:49:51 2020 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Sep 2020 14:49:51 +0000 Subject: [issue15500] Python should support exporting thread names to the OS In-Reply-To: <1343650770.87.0.181202709436.issue15500@psf.upfronthosting.co.za> Message-ID: <1600786191.48.0.594978977332.issue15500@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:51:27 2020 From: report at bugs.python.org (hai shi) Date: Tue, 22 Sep 2020 14:51:27 +0000 Subject: [issue39337] codecs.lookup() ignores non-ASCII characters, whereas encodings.normalize_encoding() copies them In-Reply-To: <1579038882.16.0.589810918272.issue39337@roundup.psfhosted.org> Message-ID: <1600786287.21.0.35889437115.issue39337@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +21401 pull_request: https://github.com/python/cpython/pull/22360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:54:44 2020 From: report at bugs.python.org (Ammar Askar) Date: Tue, 22 Sep 2020 14:54:44 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600786484.55.0.90645658676.issue41833@roundup.psfhosted.org> Ammar Askar added the comment: Having the target in the thread name definitely seems like a good idea and would help ease debugging, not just for our tests but when printing thread objects in general. I would agree with the suggestion of placing the counter in there for when multiple threads get spawned with the same target or maybe even using names like: Thread-1 (doit) Thread-2 Thread-3 (print) might be better just for people who are familiar with them. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 10:55:19 2020 From: report at bugs.python.org (hai shi) Date: Tue, 22 Sep 2020 14:55:19 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1600786519.45.0.37121577359.issue41832@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:01:29 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 15:01:29 +0000 Subject: [issue41817] Incorrect types in tkinter.EventType Enum In-Reply-To: <1600544218.82.0.650310547242.issue41817@roundup.psfhosted.org> Message-ID: <1600786889.55.0.933871276969.issue41817@roundup.psfhosted.org> Ethan Furman added the comment: New changeset ea0711a9f9f207d6d4ca037d90de6ec60db131b0 by Ethan Furman in branch 'master': bpo-41817: use new StrEnum to ensure all members are strings (GH-22348) https://github.com/python/cpython/commit/ea0711a9f9f207d6d4ca037d90de6ec60db131b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:06:03 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 22 Sep 2020 15:06:03 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600787163.41.0.753215217084.issue25655@roundup.psfhosted.org> Eryk Sun added the comment: > " OSError: [WinError 126] The specified module could not be found" is > raised when calling ctypes.CDLL(dll_path) even when this "dll_path" > exists... because the error comes from another DLL. That's the old error. bpo-36085 changed it to FileNotFoundError, with the message "Could not find module '%.500S'. Try using the full path with constructor syntax." bpo-39393 modified the message to "Could not find module '%.500S' (or one of its dependencies). Try using the full path with constructor syntax." IMO, the most direct way to resolve the problem is by enabling "loader snaps" for python.exe via gflags and attaching a native debugger to the process. The loader outputs debug strings that show the computed DLL search path (from LdrpComputeLazyDllPath), each attempt to resolve the dependent DLL to a directory in the search path (via LdrpResolveDllName), and the final result from loader's work queue (from LdrpProcessWork), which includes the dependent DLL that caused loading to fail and the parent module (DLL or EXE) that depends on it. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:16:05 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 15:16:05 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600787765.24.0.266398538944.issue35764@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21402 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:17:31 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 15:17:31 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600787851.17.0.0351490967211.issue35764@roundup.psfhosted.org> Terry J. Reedy added the comment: xref addition and 'extension' deletion are done already. Added /* sentence and generally edited entry. A few details have changed. ---------- stage: patch review -> commit review type: enhancement -> behavior versions: +Python 3.10, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:26:56 2020 From: report at bugs.python.org (Drew Scholz) Date: Tue, 22 Sep 2020 15:26:56 +0000 Subject: [issue41828] No longer able to override DATA_UPLOAD_MAX_MEMORY_SIZE outside of settings.py In-Reply-To: <1600733650.36.0.422785737088.issue41828@roundup.psfhosted.org> Message-ID: <1600788416.02.0.181002534424.issue41828@roundup.psfhosted.org> Drew Scholz added the comment: I think you are right. I'll move this to the Django bug tracker. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:28:21 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 22 Sep 2020 15:28:21 +0000 Subject: [issue41828] No longer able to override DATA_UPLOAD_MAX_MEMORY_SIZE outside of settings.py In-Reply-To: <1600733650.36.0.422785737088.issue41828@roundup.psfhosted.org> Message-ID: <1600788501.77.0.589190887695.issue41828@roundup.psfhosted.org> Eric V. Smith added the comment: No problem. Good luck! ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:53:11 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Sep 2020 15:53:11 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600789991.34.0.0273753031555.issue41602@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset a68a2ad19c891faa891904b3da537911cc77df21 by Thomas Grainger in branch 'master': bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (#21956) https://github.com/python/cpython/commit/a68a2ad19c891faa891904b3da537911cc77df21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:53:35 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Sep 2020 15:53:35 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600790015.77.0.699574078204.issue41602@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:55:37 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Sep 2020 15:55:37 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600790137.5.0.447300495794.issue41810@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 0d0e9fe2ffc1683758a1985ef6dedeef5ecafdbc by Bas van Beek in branch 'master': bpo-41810: Reintroduce `types.EllipsisType`, `.NoneType` & `.NotImplementedType` (GH-22336) https://github.com/python/cpython/commit/0d0e9fe2ffc1683758a1985ef6dedeef5ecafdbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 11:55:57 2020 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Sep 2020 15:55:57 +0000 Subject: [issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing In-Reply-To: <1600457340.51.0.170346163147.issue41810@roundup.psfhosted.org> Message-ID: <1600790157.07.0.483163209207.issue41810@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 13:20:06 2020 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 22 Sep 2020 17:20:06 +0000 Subject: [issue41823] Add more fields to sys.float_info In-Reply-To: <1600650114.4.0.96172232586.issue41823@roundup.psfhosted.org> Message-ID: <1600795206.29.0.98537469247.issue41823@roundup.psfhosted.org> Mark Dickinson added the comment: Double rounding is a property of how operations on floats are carried out, rather than being a property of the float format itself; I'm not sure that it belongs in float_info. It's also potentially ill-defined. Right now, as far as I *know*, it seems to be the case that our builds of CPython on x86 or x64 either consistently use x87+extended precision for all floating-point operations, or they consistently use SSE2 for all floating-point operations, but there's no reason that a build couldn't use SSE2 in some cases and x87+extended precision in others. (There are also subtle differences between x87+53-bit precision setting and IEEE 754-following SSE2.) We also don't have any _reliable_ way to tell whether floats use IEEE 754, though we do have some ad-hoc ways that seem to work in practice (at least for now). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 13:22:20 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 17:22:20 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600795340.82.0.750981947717.issue35764@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +21403 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/22364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 13:22:32 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 17:22:32 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600795352.94.0.594243577777.issue35764@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21404 pull_request: https://github.com/python/cpython/pull/22365 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 13:22:15 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 17:22:15 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600795335.82.0.887546374147.issue35764@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 947adcaa13080790167757664912c3a6c2d4c201 by Terry Jan Reedy in branch 'master': bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363) https://github.com/python/cpython/commit/947adcaa13080790167757664912c3a6c2d4c201 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 13:28:15 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 17:28:15 +0000 Subject: [issue41817] Incorrect types in tkinter.EventType Enum In-Reply-To: <1600544218.82.0.650310547242.issue41817@roundup.psfhosted.org> Message-ID: <1600795695.68.0.069527130279.issue41817@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21405 pull_request: https://github.com/python/cpython/pull/22366 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 13:28:23 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 22 Sep 2020 17:28:23 +0000 Subject: [issue41817] Incorrect types in tkinter.EventType Enum In-Reply-To: <1600544218.82.0.650310547242.issue41817@roundup.psfhosted.org> Message-ID: <1600795703.09.0.744476533262.issue41817@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21406 pull_request: https://github.com/python/cpython/pull/22367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 14:09:54 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 22 Sep 2020 18:09:54 +0000 Subject: [issue41827] 2D array issue In-Reply-To: <1600714188.09.0.0697938264435.issue41827@roundup.psfhosted.org> Message-ID: <1600798194.21.0.556914685376.issue41827@roundup.psfhosted.org> Change by Eric V. Smith : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 14:26:48 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Sep 2020 18:26:48 +0000 Subject: [issue41827] 2D array issue In-Reply-To: <1600714188.09.0.0697938264435.issue41827@roundup.psfhosted.org> Message-ID: <1600799208.06.0.372478591538.issue41827@roundup.psfhosted.org> Serhiy Storchaka added the comment: See https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list. ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 14:35:45 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 18:35:45 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600799745.77.0.86040660293.issue35764@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset f27a1577d32f88c959e1ef6d0b12f25b2a54cdca by Miss Islington (bot) in branch '3.9': bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363) https://github.com/python/cpython/commit/f27a1577d32f88c959e1ef6d0b12f25b2a54cdca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 14:36:05 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 18:36:05 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600799765.89.0.313968747399.issue35764@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 2466a7ae6bb1e4049c3d045a30a0503dda7654c5 by Miss Islington (bot) in branch '3.8': bpo-35764: Rewrite the IDLE Calltips doc section (GH-22363) https://github.com/python/cpython/commit/2466a7ae6bb1e4049c3d045a30a0503dda7654c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 14:36:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Sep 2020 18:36:28 +0000 Subject: [issue35764] IDLE: revise calltip doc In-Reply-To: <1547756324.8.0.250551276486.issue35764@roundup.psfhosted.org> Message-ID: <1600799788.83.0.728916281581.issue35764@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 15:22:24 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 22 Sep 2020 19:22:24 +0000 Subject: [issue41827] 2D array issue In-Reply-To: <1600714188.09.0.0697938264435.issue41827@roundup.psfhosted.org> Message-ID: <1600802544.87.0.227174897278.issue41827@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks, Serhiy. That's a better section than I found. I'm going to close this. @jeetshahj12375: If you can show that this is a bug in python, please re-open this issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 16:00:25 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 20:00:25 +0000 Subject: [issue41816] need StrEnum in enum.py In-Reply-To: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> Message-ID: <1600804825.73.0.672660111586.issue41816@roundup.psfhosted.org> Ethan Furman added the comment: New changeset d986d1657e1e7b50807d0633cb31d96a2d866d42 by Ethan Furman in branch 'master': bpo-41816: `StrEnum.__str__` is `str.__str__` (GH-22362) https://github.com/python/cpython/commit/d986d1657e1e7b50807d0633cb31d96a2d866d42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 16:01:30 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 20:01:30 +0000 Subject: [issue41816] need StrEnum in enum.py In-Reply-To: <1600543258.21.0.858019496053.issue41816@roundup.psfhosted.org> Message-ID: <1600804890.88.0.0230907584888.issue41816@roundup.psfhosted.org> Ethan Furman added the comment: Thank you for your help, Serhiy! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 16:02:54 2020 From: report at bugs.python.org (Ethan Furman) Date: Tue, 22 Sep 2020 20:02:54 +0000 Subject: [issue41817] Incorrect types in tkinter.EventType Enum In-Reply-To: <1600544218.82.0.650310547242.issue41817@roundup.psfhosted.org> Message-ID: <1600804974.01.0.0608545007457.issue41817@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 16:55:19 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 22 Sep 2020 20:55:19 +0000 Subject: [issue41420] Academic Free License v. 2.1 link is not found and is obsolete In-Reply-To: <1595948762.34.0.747967566864.issue41420@roundup.psfhosted.org> Message-ID: <1600808119.59.0.467541649471.issue41420@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: Fixed https://www.python.org/psf/contrib/ to point to https://spdx.org/licenses/AFL-2.1.html instead. The contrib-form page (https://www.python.org/psf/contrib/contrib-form/) already had this change, but the PDF you can download from there still lists the old link. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 16:58:27 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 22 Sep 2020 20:58:27 +0000 Subject: [issue41420] Academic Free License v. 2.1 link is not found and is obsolete In-Reply-To: <1595948762.34.0.747967566864.issue41420@roundup.psfhosted.org> Message-ID: <1600808307.69.0.590915173453.issue41420@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: The Adobe form itself also still lists the broken URL. Only Ewa or Betsy can fix this, I suppose. I'll write them an email. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 18:46:11 2020 From: report at bugs.python.org (Steve Dower) Date: Tue, 22 Sep 2020 22:46:11 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600814771.02.0.36688381712.issue25655@roundup.psfhosted.org> Steve Dower added the comment: > IMO, the most direct way to resolve the problem is by enabling "loader snaps" for python.exe via gflags and attaching a native debugger to the process ... This is indeed the best way to go about solving it, so you can see why we don't put it in an error message or take responsibility for documenting the process. It's not for the faint-hearted :) Also, the recommended releases of WinDBG (from the Microsoft Store) no longer include gflags, though I believe once you're in the debugger it will just break at the point where the DLL can't be loaded and it's "simple" to get its expected name. I wouldn't refuse a docs PR to add a short section pointing to this page and explaining its relevance: https://docs.microsoft.com/cpp/build/reference/dependents I *would* stop short of writing a whole tutorial on how to do it. That's a great topic for someone's blog, and will likely get better SEO and social attention from not being in the docs. ---------- versions: +Python 3.10 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 20:55:51 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Sep 2020 00:55:51 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600822551.4.0.189048743399.issue41513@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +21407 pull_request: https://github.com/python/cpython/pull/22368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 20:59:08 2020 From: report at bugs.python.org (Ned Deily) Date: Wed, 23 Sep 2020 00:59:08 +0000 Subject: [issue41837] Upgrade installers to OpenSSL 1.1.1h Message-ID: <1600822748.89.0.850484234677.issue41837@roundup.psfhosted.org> New submission from Ned Deily : "22-Sep-2020 OpenSSL 1.1.1h is now available, including bug fixes" Christian, any changes need in _ssl or any other reasons we should not upgrade? Changes between 1.1.1g and 1.1.1h [22 Sep 2020] *) Certificates with explicit curve parameters are now disallowed in verification chains if the X509_V_FLAG_X509_STRICT flag is used. [Tomas Mraz] *) The 'MinProtocol' and 'MaxProtocol' configuration commands now silently ignore TLS protocol version bounds when configuring DTLS-based contexts, and conversely, silently ignore DTLS protocol version bounds when configuring TLS-based contexts. The commands can be repeated to set bounds of both types. The same applies with the corresponding "min_protocol" and "max_protocol" command-line switches, in case some application uses both TLS and DTLS. SSL_CTX instances that are created for a fixed protocol version (e.g. TLSv1_server_method()) also silently ignore version bounds. Previously attempts to apply bounds to these protocol versions would result in an error. Now only the "version-flexible" SSL_CTX instances are subject to limits in configuration files in command-line options. [Viktor Dukhovni] *) Handshake now fails if Extended Master Secret extension is dropped on renegotiation. [Tomas Mraz] ---------- components: Build, Windows, macOS messages: 377352 nosy: christian.heimes, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: high severity: normal status: open title: Upgrade installers to OpenSSL 1.1.1h versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 21:40:17 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Sep 2020 01:40:17 +0000 Subject: [issue41823] Add more fields to sys.float_info In-Reply-To: <1600650114.4.0.96172232586.issue41823@roundup.psfhosted.org> Message-ID: <1600825217.73.0.676403543868.issue41823@roundup.psfhosted.org> Raymond Hettinger added the comment: Given that reliable checks aren't possible, it would still be nice (to have flags suchas non_ieee754_detected and double_rounding_detected. If the flag is False it provides no firm guarantees, but it if it is true, it is meaningful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 23:01:31 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Sep 2020 03:01:31 +0000 Subject: [issue41513] High accuracy math.hypot() In-Reply-To: <1597022054.77.0.549983904563.issue41513@roundup.psfhosted.org> Message-ID: <1600830091.71.0.842493148675.issue41513@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 438e9fc66f664eff0526a16a6d900349bfd1f9d2 by Raymond Hettinger in branch 'master': bpo-41513: Improve order of adding fractional values. Improve variable names. (GH-22368) https://github.com/python/cpython/commit/438e9fc66f664eff0526a16a6d900349bfd1f9d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 23:19:57 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 23 Sep 2020 03:19:57 +0000 Subject: [issue40564] Using zipfile.Path with several files prematurely closes zip In-Reply-To: <1588952821.29.0.991302590341.issue40564@roundup.psfhosted.org> Message-ID: <1600831197.09.0.845555121939.issue40564@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +21408 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 23:56:30 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 23 Sep 2020 03:56:30 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600833390.34.0.441960009077.issue37062@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21409 pull_request: https://github.com/python/cpython/pull/22369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 23:56:47 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 23 Sep 2020 03:56:47 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600833407.24.0.876649446813.issue37062@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21410 pull_request: https://github.com/python/cpython/pull/22370 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 23:57:56 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 23 Sep 2020 03:57:56 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600833476.35.0.139802306496.issue37062@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 5acc1b5f0b62eef3258e4bc31eba3b9c659108c9 by Miss Islington (bot) in branch '3.8': bpo-37062: Enum: add extended AutoNumber example (GH-22349) (GH-22369) https://github.com/python/cpython/commit/5acc1b5f0b62eef3258e4bc31eba3b9c659108c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 23:58:39 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 23 Sep 2020 03:58:39 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600833519.02.0.0289613135494.issue37062@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 64362c2e435eddc5e84cea313d92bc0b96d227f7 by Miss Islington (bot) in branch '3.9': bpo-37062: Enum: add extended AutoNumber example (GH-22349) (GH-22370) https://github.com/python/cpython/commit/64362c2e435eddc5e84cea313d92bc0b96d227f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 22 23:59:37 2020 From: report at bugs.python.org (Ethan Furman) Date: Wed, 23 Sep 2020 03:59:37 +0000 Subject: [issue37062] `AutoNumber` class in enum documentation: support *args in constructor In-Reply-To: <1558936980.63.0.0585299344314.issue37062@roundup.psfhosted.org> Message-ID: <1600833577.52.0.0554578936071.issue37062@roundup.psfhosted.org> Ethan Furman added the comment: Thank you, Reuben! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 00:03:01 2020 From: report at bugs.python.org (Jason Fried) Date: Wed, 23 Sep 2020 04:03:01 +0000 Subject: [issue35767] unittest loader doesn't work with partial test functions In-Reply-To: <1547774719.89.0.274196426974.issue35767@roundup.psfhosted.org> Message-ID: <1600833781.6.0.587194517496.issue35767@roundup.psfhosted.org> Change by Jason Fried : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 00:04:02 2020 From: report at bugs.python.org (Jason Fried) Date: Wed, 23 Sep 2020 04:04:02 +0000 Subject: [issue35767] unittest loader doesn't work with partial test functions In-Reply-To: <1547774719.89.0.274196426974.issue35767@roundup.psfhosted.org> Message-ID: <1600833842.14.0.15081009427.issue35767@roundup.psfhosted.org> Change by Jason Fried : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 00:29:36 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 23 Sep 2020 04:29:36 +0000 Subject: [issue35144] TemporaryDirectory clean-up fails with unsearchable directories In-Reply-To: <1541148008.66.0.788709270274.issue35144@psf.upfronthosting.co.za> Message-ID: <1600835376.04.0.285275597974.issue35144@roundup.psfhosted.org> Eryk Sun added the comment: It seems to me that if `path == name`, then resetperms(path) and possibly a recursive call are only needed on the first call. In subsequent calls, if `path == name`, then we know that resetperms(path) was already called, so it shouldn't handle PermissionError. If resetperms was ineffective (e.g. in Windows, a sharing violation or custom discretionary/mandatory permissions), or if something else changed the permissions in the mean time, just give up instead of risking a RecursionError or stack overflow. For example: @classmethod def _rmtree(cls, name, first_call=True): resetperms_funcs = (_os.unlink, _os.rmdir, _os.scandir, _os.open) def resetperms(path): try: _os.chflags(path, 0) except AttributeError: pass _os.chmod(path, 0o700) def onerror(func, path, exc_info): if (issubclass(exc_info[0], PermissionError) and func in resetperms_funcs and (first_call or path != name)): try: if path != name: resetperms(_os.path.dirname(path)) resetperms(path) try: _os.unlink(path) # PermissionError is raised on FreeBSD for directories except (IsADirectoryError, PermissionError): cls._rmtree(path, first_call=False) except FileNotFoundError: pass elif issubclass(exc_info[0], FileNotFoundError): pass else: raise _shutil.rmtree(name, onerror=onerror) ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 01:19:26 2020 From: report at bugs.python.org (Inada Naoki) Date: Wed, 23 Sep 2020 05:19:26 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1600838366.49.0.188223542137.issue41835@roundup.psfhosted.org> Inada Naoki added the comment: I have a Linux desktop machine for benchmarking & profiling in my office. But the machine is offline and I am working from home several weeks. So please wait several weeks until I confirm your branch. > This change speeds up the code up to a 30%. Tested with: > > python -m timeit -n 2000 --setup "from uuid import uuid4 ; o = > {str(uuid4()).replace('-', '') : str(uuid4()).replace('-', '') for i > in range(10000)}" "dict(**o)" `dict(**o)` is not common use case. Could you provide some other benchmarks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 03:37:42 2020 From: report at bugs.python.org (Philippe Ombredanne) Date: Wed, 23 Sep 2020 07:37:42 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600846662.69.0.874397438169.issue25655@roundup.psfhosted.org> Philippe Ombredanne added the comment: > I wouldn't refuse a docs PR to add a short section pointing to > this page and explaining its relevance: > https://docs.microsoft.com/cpp/build/reference/dependents Steve, would you see this as a note in https://docs.python.org/3/library/ctypes.html?highlight=ctypes#loading-shared-libraries What about something like this? class ctypes.CDLL ..... Note: On Windows a call to CDLL(name) may fail even if the DLL name exists when a dependent DLL of this DLL is found. This will lead to an OSErrror error with the message "[WinError 126] The specified module could not be found". This error message does not contains the name of the missing DLL because the Windows API does not return this information making this error hard to diagnose. To resolve this error and determine which DLL is missing, you need to find the list of dependent DLLs using Windows debugging and tracing tools. See https://docs.microsoft.com/cpp/build/reference/dependents for some explanations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 04:40:58 2020 From: report at bugs.python.org (Philippe Ombredanne) Date: Wed, 23 Sep 2020 08:40:58 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600850458.95.0.413371009718.issue25655@roundup.psfhosted.org> Change by Philippe Ombredanne : ---------- keywords: +patch pull_requests: +21411 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 05:41:05 2020 From: report at bugs.python.org (Mohit Kumar) Date: Wed, 23 Sep 2020 09:41:05 +0000 Subject: [issue41838] Value error is showing in docset python (class) Message-ID: <1600854065.72.0.967885714399.issue41838@roundup.psfhosted.org> New submission from Mohit Kumar : https://github.com/python/bugs.python.org/issues/55 ---------- assignee: docs at python components: Documentation messages: 377362 nosy: docs at python, mkay6122 priority: normal severity: normal status: open title: Value error is showing in docset python (class) type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 05:44:51 2020 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 23 Sep 2020 09:44:51 +0000 Subject: [issue41839] Fix error checking in sched_get_priority_ functions Message-ID: <1600854291.47.0.647428852002.issue41839@roundup.psfhosted.org> New submission from Jakub Kulik : Python presumes that any negative number returned from sched_get_priority_min or sched_get_priority_max indicates that error has occurred. However, neither Linux manual pages nor POSIX.1-2001 specification forbids negative values to be returned; only -1 has a special meaning for error. On Solaris, sched_get_priority_min can, in some instances, return -60, and while this is a legitimate scheduling priority value, Python throws an OSError. Checking for -1 rather than all negative values fixes this issue. ---------- components: Library (Lib) messages: 377363 nosy: kulikjak priority: normal severity: normal status: open title: Fix error checking in sched_get_priority_ functions type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 05:46:39 2020 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 23 Sep 2020 09:46:39 +0000 Subject: [issue41839] Fix error checking in sched_get_priority_ functions In-Reply-To: <1600854291.47.0.647428852002.issue41839@roundup.psfhosted.org> Message-ID: <1600854399.72.0.16037363501.issue41839@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +21413 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 06:04:20 2020 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 23 Sep 2020 10:04:20 +0000 Subject: [issue41839] Fix error checking in sched_get_priority_ functions In-Reply-To: <1600854291.47.0.647428852002.issue41839@roundup.psfhosted.org> Message-ID: <1600855460.14.0.343826245335.issue41839@roundup.psfhosted.org> Change by Jakub Kulik : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 06:33:49 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 10:33:49 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1600857229.05.0.907987908237.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 83de110dce94a9196dccc01d526628615714e362 by Mohamed Koubaa in branch 'master': bpo-1635741: Port _lsprof extension to multi-phase init (PEP 489) (GH-22220) https://github.com/python/cpython/commit/83de110dce94a9196dccc01d526628615714e362 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 06:38:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 10:38:20 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1600857500.01.0.665020608347.issue1635741@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ddc0dd001a4224274ba6f83568b45a1dd88c6fc6 by Mohamed Koubaa in branch 'master': bpo-1635741, unicodedata: add ucd_type parameter to UCD_Check() macro (GH-22328) https://github.com/python/cpython/commit/ddc0dd001a4224274ba6f83568b45a1dd88c6fc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 06:52:37 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 10:52:37 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1600858357.81.0.568074574224.issue40170@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21414 pull_request: https://github.com/python/cpython/pull/22375 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 06:53:34 2020 From: report at bugs.python.org (john_miller) Date: Wed, 23 Sep 2020 10:53:34 +0000 Subject: [issue41821] Printing specific Unicode characters causes unwanted beeping in Windows 7 console In-Reply-To: <1600596635.97.0.661976850635.issue41821@roundup.psfhosted.org> Message-ID: <1600858414.05.0.914373335261.issue41821@roundup.psfhosted.org> john_miller added the comment: >In Windows 10, the console doesn't even support OEM "Raster Fonts", unless the option is selected to use the legacy console. So the setting could still be changed if a user decides to modify the setting in order to run some legacy-software. A single sentence about the beeping and the recommendation to use a True Type Font instead of the OEM raster font in the console section of "Using Windows" might not hurt. Seeing as there are lots of legacy features in the console that still work, setting a raster font might probably even be a compatibility option in future Windows versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 06:55:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 10:55:08 +0000 Subject: [issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1600858508.98.0.178353027472.issue40521@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21415 pull_request: https://github.com/python/cpython/pull/22376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 06:59:03 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 10:59:03 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1600858743.97.0.385644346811.issue40941@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21416 pull_request: https://github.com/python/cpython/pull/22377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 07:00:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 11:00:36 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1600858836.83.0.869914732474.issue40941@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21417 pull_request: https://github.com/python/cpython/pull/22378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:05:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:05:01 +0000 Subject: [issue41834] Remove _Py_CheckRecursionLimit variable In-Reply-To: <1600778367.51.0.464121227135.issue41834@roundup.psfhosted.org> Message-ID: <1600862701.51.0.438616961573.issue41834@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 19c3ac92bf73f1902cff846988552fd7bb8a8621 by Victor Stinner in branch 'master': bpo-41834: Remove _Py_CheckRecursionLimit variable (GH-22359) https://github.com/python/cpython/commit/19c3ac92bf73f1902cff846988552fd7bb8a8621 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:05:36 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:05:36 +0000 Subject: [issue40521] [subinterpreters] Make free lists and unicode caches per-interpreter In-Reply-To: <1588693682.5.0.219755904926.issue40521@roundup.psfhosted.org> Message-ID: <1600862736.35.0.676029729288.issue40521@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7f413a5d95e6d7ddddd6e2c9844c33594d6288f4 by Victor Stinner in branch 'master': bpo-40521: Fix PyUnicode_InternInPlace() (GH-22376) https://github.com/python/cpython/commit/7f413a5d95e6d7ddddd6e2c9844c33594d6288f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:06:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:06:59 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1600862819.13.0.844250530975.issue40941@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 71f2ff4ccf4ff8bdb56cc30d115ca2ddc602b12f by Victor Stinner in branch 'master': bpo-40941: Fix fold_tuple_on_constants() compiler warnings (GH-22378) https://github.com/python/cpython/commit/71f2ff4ccf4ff8bdb56cc30d115ca2ddc602b12f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:07:20 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:07:20 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1600862840.28.0.328953509015.issue40941@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b7d8d8dbfe83040087a63662e0b908f4b5ac24b0 by Victor Stinner in branch 'master': bpo-40941: Fix stackdepth compiler warnings (GH-22377) https://github.com/python/cpython/commit/b7d8d8dbfe83040087a63662e0b908f4b5ac24b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:08:01 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:08:01 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1600862881.78.0.965217906894.issue40941@roundup.psfhosted.org> STINNER Victor added the comment: The main change is merged, and I fixed compiler warnings. It seems like there is no remaining thing to do, so I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:08:41 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:08:41 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1600862921.7.0.314181544909.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 97d15ae1d8411b49b1fcdc0c67c51849dccce9c9 by Victor Stinner in branch 'master': bpo-40170: Use inline _PyType_HasFeature() function (GH-22375) https://github.com/python/cpython/commit/97d15ae1d8411b49b1fcdc0c67c51849dccce9c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:22:05 2020 From: report at bugs.python.org (CendioOssman) Date: Wed, 23 Sep 2020 12:22:05 +0000 Subject: [issue41840] [regression] symtable.Symbol.is_local() is no longer True for bound global symbols Message-ID: <1600863724.98.0.825702411391.issue41840@roundup.psfhosted.org> New submission from CendioOssman : So Issue40196 (and PR 19391) broke things for us here as Symbol.is_local() no longer works properly for symbols on the global/module scope. Previously it would return True for all global symbols that were bound. Now it only returns True when the symbol is not used in any other scope. This means we cannot tell the difference between globals that are from the module itself, and globals that come in via imports. This also seems to contradict this part of the language reference: "(The variables of the module code block are local and global.)" https://docs.python.org/3/reference/executionmodel.html I don't see any clean workaround as there is no Symbol.is_bound() that could be used instead. (inb4 https://xkcd.com/1172/) ---------- components: Library (Lib) messages: 377373 nosy: CendioOssman priority: normal severity: normal status: open title: [regression] symtable.Symbol.is_local() is no longer True for bound global symbols versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:29:07 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 23 Sep 2020 12:29:07 +0000 Subject: [issue37779] configparser: add documentation about several read() behaviour In-Reply-To: <1565122960.66.0.217084239893.issue37779@roundup.psfhosted.org> Message-ID: <1600864147.18.0.0593831214606.issue37779@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 48b0b1b121f26f811265f9eb06f195a3df38ef4b by sblondon in branch 'master': bpo-37779 : Add information about the overriding behavior of ConfigParser.read (GH-15177) https://github.com/python/cpython/commit/48b0b1b121f26f811265f9eb06f195a3df38ef4b ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:31:32 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 12:31:32 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports Message-ID: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> New submission from Terry J. Reedy : Master became 3.10 as of 3.9.0 beta 1: Monday, 2020-05-18. However, backported IDLE issues continued going under What's New 3.9 on both master and 3.9 until 3.9.0rc1, Tuesday, 2020-08-11. Subsequent merges go under What's New 3.10.0 on master What's New 3.9.1 on 3.9 In other words, News is handled as if master were still branched off as of .0rc1. This is different from the changelog attached to What's New in 3.x. Release peps -- needed for proposed and actual release dates. 3.8 PEP 569 https://www.python.org/dev/peps/pep-0569/ 3.9 PEP 596 https://www.python.org/dev/peps/pep-0596/ 3.10 PEP 619 https://www.python.org/dev/peps/pep-0619/ ---------- assignee: terry.reedy components: IDLE messages: 377375 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: idlelib/NEWS.txt for 3.10.0 and backports versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:40:42 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 12:40:42 +0000 Subject: [issue37309] idlelib/NEWS.txt for 3.9.0 and backports In-Reply-To: <1560723721.58.0.865881864361.issue37309@roundup.psfhosted.org> Message-ID: <1600864842.58.0.898799019038.issue37309@roundup.psfhosted.org> Terry J. Reedy added the comment: Continue with #41841 for 3.10. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> idlelib/NEWS.txt for 3.10.0 and backports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:47:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 12:47:28 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1600865248.08.0.842655874694.issue41841@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21418 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:56:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:56:58 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function Message-ID: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> New submission from STINNER Victor : Writing an unit test on the Python codecs machinery is facing a practical problem: there is no C nor Python API to unregister a codec search function. It's even documented in a note of the codecs.register() function: "Note: Search function registration is not currently reversible, which may cause problems in some cases, such as unit testing or module reloading." https://docs.python.org/dev/library/codecs.html#codecs.register test_codecs contains a long comment about that: # There's no way to unregister a codec search function, so we just # ensure we render this one fairly harmless after the test # case finishes by using the test case repr as the codec name # The codecs module normalizes codec names, although this doesn't # appear to be formally documented... # We also make sure we use a truly unique id for the custom codec # to avoid issues with the codec cache when running these tests # multiple times (e.g. when hunting for refleaks) See bpo-22166 which fixed memory leaks in test_codecs. In 2011, a Python user requested the function https://mail.python.org/pipermail/python-dev/2011-September/113588.html Marc-Andre Lemburg explained: "There is no API to unregister a codec search function, since deregistration would break the codec cache used by the registry to speedup codec lookup." One simple solution would be to clear the cache (PyInterpreterState.codec_search_cache) when codecs.unregister() removes a search function. I expect that calling unregister() is an uncommon operation, so the performance is not a blocker issue. ---------- components: Library (Lib), Unicode messages: 377377 nosy: ezio.melotti, vstinner priority: normal severity: normal status: open title: Add codecs.unregister() to unregister a codec search function versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:57:47 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:57:47 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1600865867.61.0.821322278795.issue41842@roundup.psfhosted.org> STINNER Victor added the comment: > Writing an unit test on the Python codecs machinery is facing a practical problem: there is no C nor Python API to unregister a codec search function. For example, see PR 19069 of bpo-39337. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 08:58:12 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 12:58:12 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1600865892.5.0.62566213991.issue41842@roundup.psfhosted.org> STINNER Victor added the comment: Hai Shi wrote PR 22360 to implement codecs.unregister(). ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Wed Sep 23 09:03:54 2020 From: mal at egenix.com (M.-A. Lemburg) Date: Wed, 23 Sep 2020 15:03:54 +0200 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> References: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <01f40a2b-ebc1-c80a-cb8b-a9d32a3917e4@egenix.com> On 23.09.2020 14:56, STINNER Victor wrote: > Marc-Andre Lemburg explained: > > "There is no API to unregister a codec search function, since deregistration > would break the codec cache used by the registry to speedup codec > lookup." > > One simple solution would be to clear the cache (PyInterpreterState.codec_search_cache) when codecs.unregister() removes a search function. I expect that calling unregister() is an uncommon operation, so the performance is not a blocker issue. +1 BTW: While you're at it, having a way to access the search function list from Python would be nice as well, since this would then open up the possibility to reorder search functions. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 23 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ From report at bugs.python.org Wed Sep 23 09:04:00 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 23 Sep 2020 13:04:00 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <01f40a2b-ebc1-c80a-cb8b-a9d32a3917e4@egenix.com> Marc-Andre Lemburg added the comment: On 23.09.2020 14:56, STINNER Victor wrote: > Marc-Andre Lemburg explained: > > "There is no API to unregister a codec search function, since deregistration > would break the codec cache used by the registry to speedup codec > lookup." > > One simple solution would be to clear the cache (PyInterpreterState.codec_search_cache) when codecs.unregister() removes a search function. I expect that calling unregister() is an uncommon operation, so the performance is not a blocker issue. +1 BTW: While you're at it, having a way to access the search function list from Python would be nice as well, since this would then open up the possibility to reorder search functions. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 23 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From mal at egenix.com Wed Sep 23 09:05:58 2020 From: mal at egenix.com (M.-A. Lemburg) Date: Wed, 23 Sep 2020 15:05:58 +0200 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <01f40a2b-ebc1-c80a-cb8b-a9d32a3917e4@egenix.com> References: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> <01f40a2b-ebc1-c80a-cb8b-a9d32a3917e4@egenix.com> Message-ID: Just found an internal API which already takes care of unregistering a search function: _PyCodec_Forget(). All that needs to be done is to expose this as codecs.unregister() and add the clearing of the lookup cache. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 23 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ From report at bugs.python.org Wed Sep 23 09:06:25 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 23 Sep 2020 13:06:25 +0000 Subject: [issue41832] PyType_FromSpec() should accept tp_doc=NULL In-Reply-To: <1600770571.99.0.249807543427.issue41832@roundup.psfhosted.org> Message-ID: <1600866385.38.0.799101173561.issue41832@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 09:06:03 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 23 Sep 2020 13:06:03 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <01f40a2b-ebc1-c80a-cb8b-a9d32a3917e4@egenix.com> Message-ID: Marc-Andre Lemburg added the comment: Just found an internal API which already takes care of unregistering a search function: _PyCodec_Forget(). All that needs to be done is to expose this as codecs.unregister() and add the clearing of the lookup cache. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 23 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 09:09:09 2020 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 23 Sep 2020 13:09:09 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600715216.59.0.0182711956873.issue41826@roundup.psfhosted.org> Message-ID: Skip Montanaro added the comment: > This is because the types of the grammars in Lib/test/test_peg_generator/test_c_parser.py needs to be updated to use the new sequences I'm sorry, that doesn't mean much to me. Is it simply a matter of applying suitable casts to the various parameters in the C code fragments in those? For example: *** /tmp/ediffGoXpTW 2020-09-23 08:06:38.671061988 -0500 --- /home/skip/src/python/cpython/Lib/test/test_peg_generator/test_c_parser.py 2020-09-21 15:54:43.106258797 -0500 *************** *** 325,331 **** compound_stmt[stmt_ty]: with_stmt with_stmt[stmt_ty]: ( a='with' '(' b=','.with_item+ ')' ':' c=block { ! _Py_With(b, _PyPegen_singleton_seq(p, c), NULL, EXTRA) } ) with_item[withitem_ty]: ( e=NAME o=['as' t=NAME { t }] { _Py_withitem(e, _PyPegen_set_expr_context(p, o, Store), p->arena) } --- 325,331 ---- compound_stmt[stmt_ty]: with_stmt with_stmt[stmt_ty]: ( a='with' '(' b=','.with_item+ ')' ':' c=block { ! _Py_With((asdl_withitem_seq *)b, *(asdl_stmt_seq *)*_PyPegen_singleton_seq(p, c), NULL, EXTRA) } ) with_item[withitem_ty]: ( e=NAME o=['as' t=NAME { t }] { _Py_withitem(e, _PyPegen_set_expr_context(p, o, Store), p->arena) } If so, that's pretty mechanical. Even a dummy like me could produce a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 09:24:12 2020 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 23 Sep 2020 13:24:12 +0000 Subject: [issue41843] Reenable sendfile in shutil.copyfile() on Solaris Message-ID: <1600867452.06.0.35884925988.issue41843@roundup.psfhosted.org> New submission from Jakub Kulik : The use of sendfile() in shutil.copyfile() on Solaris was previously disabled in #36610 due to slightly different behavior. This difference was recently accounted for in #41687, and I observed no other unexpected problems/differences with sendfile. Can we get this reenabled? I can prepare PR, however, I am not sure whether #36610 should be reverted (hence enabling sendfile in copyfile on every system where it is available) or whether I should just add Solaris to _USE_CP_SENDFILE condition. ---------- components: Library (Lib) messages: 377383 nosy: giampaolo.rodola, kulikjak priority: normal severity: normal status: open title: Reenable sendfile in shutil.copyfile() on Solaris type: performance versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 09:28:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 13:28:28 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1600867708.91.0.628691139074.issue41841@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +21419 pull_request: https://github.com/python/cpython/pull/22380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 09:29:58 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 23 Sep 2020 13:29:58 +0000 Subject: [issue40564] Using zipfile.Path with several files prematurely closes zip In-Reply-To: <1588952821.29.0.991302590341.issue40564@roundup.psfhosted.org> Message-ID: <1600867798.34.0.683767470554.issue40564@roundup.psfhosted.org> Jason R. Coombs added the comment: I've released zipp 3.2.0 that includes a fix for this issue (option 2). Please test it out. Because this change affects the user's expectation about the effect of what's passed in, I'm hesitant to backport it to 3.8 and 3.9. It's too late to go into 3.9.0, so the earliest it can appear is in 3.9.1. Please advise - does the undesirable behavior warrant a bugfix backport, or is it sufficient to direct users impacted by this issue prior to Python 3.10 to use the `zipp` backport? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 09:41:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 13:41:04 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1600868464.66.0.603850689828.issue41841@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +21420 pull_request: https://github.com/python/cpython/pull/22381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 09:44:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 13:44:35 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1600868675.22.0.928819691782.issue41841@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 7af072c3b60dd3aac2835122bc37454f0973351e by Terry Jan Reedy in branch 'master': bpo-41841: Prepare IDLE News for 3.10 (GH-22379) https://github.com/python/cpython/commit/7af072c3b60dd3aac2835122bc37454f0973351e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:07:26 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:07:26 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1600870046.38.0.50172122825.issue41841@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset d7a4e5d330df49774019e25313e0c1c4e9bf505d by Terry Jan Reedy in branch '3.9': [3.9] bpo-41841: Prepare IDLE News for 3.9 (GH-22380) https://github.com/python/cpython/commit/d7a4e5d330df49774019e25313e0c1c4e9bf505d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:23:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:23:59 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 Message-ID: <1600871039.14.0.615866740871.issue41844@roundup.psfhosted.org> New submission from Terry J. Reedy : Following #33821, master issue for IDLE entries in Doc/whatsnew/3.8.rst. This doc has a section 'Improved Modules' with a subsection 'idlelib and IDLE'. The initial unlabeled subsubsection includes important enhancements to IDLE since 3.7.0. Because of IDLE's special backport policy (PEP 434), this initial part concludes with "The changes above have been backported to 3.7 maintenance releases." Future subsubsections 'New in 3.8.z:', z >= 1, will follow for backports to 3.8.z. This issue will close after the last 3.8 maintenance release. This file will always exists in the master branch. Changes are applied to master and backported as needed at the time. Entries will be the same in the What's New x.y for all x.y branches that get the enhancement. However, each file needs different backports. Hence separate PRs are needed for auto backport to work. It seems convenient to have separate issues for each. ---------- assignee: terry.reedy components: IDLE messages: 377387 nosy: terry.reedy priority: normal severity: normal status: open title: IDLE subsection of What's New 3.9 type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:31:39 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:31:39 +0000 Subject: [issue33821] IDLE subsection of What's New 3.7 In-Reply-To: <1528651926.75.0.592728768989.issue33821@psf.upfronthosting.co.za> Message-ID: <1600871499.36.0.907453931004.issue33821@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> IDLE subsection of What's New 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:31:49 2020 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 23 Sep 2020 14:31:49 +0000 Subject: [issue41845] Promote PyObject_GenericGetDict to the stable API Message-ID: <1600871509.15.0.3993940648.issue41845@roundup.psfhosted.org> New submission from Alex Gaynor : Currently PyObject_GenericSetDict is part of the stable API, but PyObject_GenericGetDict is not. I noticed this while working on https://github.com/PyO3/pyo3/pull/1207 Because of the symmetry here, it seems appropriate to promote Get. ---------- components: C API messages: 377388 nosy: alex, benjamin.peterson priority: normal severity: normal status: open title: Promote PyObject_GenericGetDict to the stable API versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:31:57 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:31:57 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 In-Reply-To: <1600871039.14.0.615866740871.issue41844@roundup.psfhosted.org> Message-ID: <1600871517.81.0.0817092566943.issue41844@roundup.psfhosted.org> Terry J. Reedy added the comment: Following #33822, master issue for IDLE entries in Doc/whatsnew/3.9.rst. This doc has a section 'Improved Modules' with a subsection 'idlelib and IDLE'. The initial unlabeled subsubsection includes important enhancements to IDLE since 3.8.0. Because of IDLE's special backport policy (PEP 434), this initial part concludes with "The changes above have been backported to 3.8 maintenance releases." Future subsubsections 'New in 3.9.z:', z >= 1, will follow for backports to 3.9.z. These can precede the backport message as long as it is true. This issue will close after the last 3.9 maintenance release. This file will always exists in the master branch. Changes are applied to master and backported as needed at the time. Entries will be the same in the What's New x.y for all x.y branches that get the enhancement. However, each file needs different backports. Hence separate PRs are needed for auto backport to work. It seems convenient to have separate issues for each. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:32:04 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:32:04 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 In-Reply-To: <1600871517.81.0.0817092566943.issue41844@roundup.psfhosted.org> Message-ID: <1600871524.83.0.641732046788.issue41844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg377387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:32:22 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:32:22 +0000 Subject: [issue41846] IDLE subsection of What's New 3.10 Message-ID: <1600871542.4.0.618379951214.issue41846@roundup.psfhosted.org> New submission from Terry J. Reedy : Following #41844, master issue for IDLE entries in Doc/whatsnew/3.10.rst. This doc has a section 'Improved Modules' with a subsection 'idlelib and IDLE'. The initial unlabeled subsubsection includes important enhancements to IDLE since 3.9.0. Because of IDLE's special backport policy (PEP 434), this initial part concludes with "The changes above have been backported to 3.9 maintenance releases." Future subsubsections 'New in 3.10.z:', z >= 1, will follow for backports to 3.10.z. These can precede the backport message as long as it is true. This issue will close after the last 3.10 maintenance release. This file will always exists in the master branch. Changes are applied to master and backported as needed at the time. Entries will be the same in the What's New x.y for all x.y branches that get the enhancement. However, each file needs different backports. Hence separate PRs are needed for auto backport to work. It seems convenient to have separate issues for each. ---------- assignee: terry.reedy components: IDLE messages: 377390 nosy: terry.reedy priority: normal severity: normal status: open title: IDLE subsection of What's New 3.10 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:32:39 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:32:39 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 In-Reply-To: <1600871517.81.0.0817092566943.issue41844@roundup.psfhosted.org> Message-ID: <1600871559.83.0.717087503425.issue41844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- superseder: -> IDLE subsection of What's New 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:35:05 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:35:05 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1600871705.02.0.647148575727.issue41841@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 0a2e11aecfb300615ab813f5d2d77a799f6e852c by Terry Jan Reedy in branch '3.8': [3.8] bpo-41841: Prepare IDLE News for 3.8.7 (GH-22381) https://github.com/python/cpython/commit/0a2e11aecfb300615ab813f5d2d77a799f6e852c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:40:47 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:40:47 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600872047.88.0.349268203161.issue33822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +21421 pull_request: https://github.com/python/cpython/pull/22382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:42:29 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:42:29 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 In-Reply-To: <1600871517.81.0.0817092566943.issue41844@roundup.psfhosted.org> Message-ID: <1600872149.16.0.656380281329.issue41844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21422 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:42:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:42:41 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600872161.31.0.80601382016.issue33822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -21421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:44:59 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 14:44:59 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600872299.69.0.827871917319.issue33822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +21423 pull_request: https://github.com/python/cpython/pull/22383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:49:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 14:49:54 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1600872594.55.0.261984022225.issue41842@roundup.psfhosted.org> STINNER Victor added the comment: > Just found an internal API which already takes care of > unregistering a search function: _PyCodec_Forget(). > > All that needs to be done is to expose this as codecs.unregister() > and add the clearing of the lookup cache. Yeah, I saw this function, but it's related to the cache, not to the list of search functions. > BTW: While you're at it, having a way to access the search function > list from Python would be nice as well, since this would then open > up the possibility to reorder search functions. I didn't hear anyone (ok, apart you) who requested to order search functions. I dislike the idea of exposing it, since it introduces the risk that someone "unregisters" a search function simply by removing it from the list, without invalidating the cache. I prefer to hide the internals to ensure that the cache remains consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 10:54:45 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 23 Sep 2020 14:54:45 +0000 Subject: [issue41838] Value error is showing in docset python (class) In-Reply-To: <1600854065.72.0.967885714399.issue41838@roundup.psfhosted.org> Message-ID: <1600872885.3.0.025295493703.issue41838@roundup.psfhosted.org> Eric V. Smith added the comment: It would be helpful if you can: - simplify the example - attach the simplified code to this issue - show how the code runs with no errors, and how you invoke it - show how you invoke the code when it does have errors Please do no attach images: they are not friendly to users using accessibility software, and they're impossible to copy/paste/search. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:05:20 2020 From: report at bugs.python.org (hai shi) Date: Wed, 23 Sep 2020 15:05:20 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1600873520.3.0.976714199313.issue41842@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch nosy: +shihai1991 nosy_count: 3.0 -> 4.0 pull_requests: +21424 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:17:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 15:17:35 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 In-Reply-To: <1600871517.81.0.0817092566943.issue41844@roundup.psfhosted.org> Message-ID: <1600874255.3.0.654342888704.issue41844@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 22b7616f26694ac707fd53ece500febfad665426 by Terry Jan Reedy in branch 'master': bpo-41844: Add IDLE section to What's New 3.9 (GN-22382) https://github.com/python/cpython/commit/22b7616f26694ac707fd53ece500febfad665426 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:17:49 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 23 Sep 2020 15:17:49 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 In-Reply-To: <1600871517.81.0.0817092566943.issue41844@roundup.psfhosted.org> Message-ID: <1600874269.26.0.732165665841.issue41844@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +21426 pull_request: https://github.com/python/cpython/pull/22384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:17:28 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 15:17:28 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600874248.64.0.707687180733.issue33822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +21425 pull_request: https://github.com/python/cpython/pull/22382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:19:12 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 15:19:12 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600874352.44.0.222025274031.issue33822@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 9c4eac7f02ddcf32fc1cdaf7c08c37fe9718c1fb by Terry Jan Reedy in branch 'master': bpo-33822: Update IDLE section of What's New 3.8 (GH-22383) https://github.com/python/cpython/commit/9c4eac7f02ddcf32fc1cdaf7c08c37fe9718c1fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:19:28 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 23 Sep 2020 15:19:28 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600874367.99.0.163311349626.issue33822@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21428 pull_request: https://github.com/python/cpython/pull/22386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:19:20 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 23 Sep 2020 15:19:20 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600874360.17.0.609548764564.issue33822@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21427 pull_request: https://github.com/python/cpython/pull/22385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:20:50 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 15:20:50 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600874450.73.0.649415141122.issue33822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:28:16 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 23 Sep 2020 15:28:16 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600874896.53.0.940200935612.issue33822@roundup.psfhosted.org> miss-islington added the comment: New changeset e678ca960b44ec3ddf2ac01fdb333018646ed8dd by Miss Islington (bot) in branch '3.8': bpo-33822: Update IDLE section of What's New 3.8 (GH-22383) https://github.com/python/cpython/commit/e678ca960b44ec3ddf2ac01fdb333018646ed8dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:36:59 2020 From: report at bugs.python.org (Marco Sulla) Date: Wed, 23 Sep 2020 15:36:59 +0000 Subject: [issue41835] Speed up dict vectorcall creation using keywords In-Reply-To: <1600779404.53.0.758044601526.issue41835@roundup.psfhosted.org> Message-ID: <1600875419.8.0.334679823305.issue41835@roundup.psfhosted.org> Marco Sulla added the comment: > `dict(**o)` is not common use case. Could you provide some other benchmarks? You can do python -m timeit -n 2000000 "dict(key1=1, key2=2, key3=3, key4=4, key5=5, key6=6, key7=7, key8=8, key9=9, key10=10)" or with pyperf. In this case, since the dict is little, I observed a speedup of 25%. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:37:59 2020 From: report at bugs.python.org (miss-islington) Date: Wed, 23 Sep 2020 15:37:59 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600875479.98.0.124365618595.issue33822@roundup.psfhosted.org> miss-islington added the comment: New changeset e33fe6c3d793688d46edf7c2e31a88fc2e719d65 by Miss Islington (bot) in branch '3.9': bpo-33822: Update IDLE section of What's New 3.8 (GH-22383) https://github.com/python/cpython/commit/e33fe6c3d793688d46edf7c2e31a88fc2e719d65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:45:28 2020 From: report at bugs.python.org (Mark Shannon) Date: Wed, 23 Sep 2020 15:45:28 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1600875928.11.0.897324502258.issue40941@roundup.psfhosted.org> Mark Shannon added the comment: Thanks Victor. Sorry I didn't get round to this sooner ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:46:23 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 23 Sep 2020 15:46:23 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1600846662.69.0.874397438169.issue25655@roundup.psfhosted.org> Message-ID: <1c9f2cf7-f08b-4cdf-95c7-d4bda02d490c@python.org> Steve Dower added the comment: > would you see this as a note in https://docs.python.org/3/library/ctypes.html?highlight=ctypes#loading-shared-libraries Haven't looked at the PR, but it probably needs to be somewhere in the import docs as well, to do with native extension modules. That's where most people run into this. And in general the solution is either going to involve moving/renaming files or calling os.add_dll_directory, so a link to the latter may also be useful. I think we've got a Sphinx tag for platform-specific information? If we do, it should use that. (Unless I'm just thinking of the "API availability" tag rather than a "Note" style box.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:49:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 15:49:54 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1600876194.51.0.276132981305.issue41654@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21429 pull_request: https://github.com/python/cpython/pull/22387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:51:58 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 15:51:58 +0000 Subject: [issue41844] IDLE subsection of What's New 3.9 In-Reply-To: <1600871517.81.0.0817092566943.issue41844@roundup.psfhosted.org> Message-ID: <1600876318.7.0.438411296091.issue41844@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 57e7d5c19e934f450f5a3539eff48162a78af994 by Miss Islington (bot) in branch '3.9': bpo-41844: Add IDLE section to What's New 3.9 (GN-22382) https://github.com/python/cpython/commit/57e7d5c19e934f450f5a3539eff48162a78af994 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:52:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 15:52:29 +0000 Subject: [issue41428] PEP 604 -- Allow writing union types as X | Y In-Reply-To: <1595975550.94.0.895278514403.issue41428@roundup.psfhosted.org> Message-ID: <1600876349.88.0.859415814683.issue41428@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch nosy: +vstinner nosy_count: 3.0 -> 4.0 pull_requests: +21430 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22388 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:53:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 15:53:08 +0000 Subject: [issue40941] Merge generator.gi_running and frame executing flag into single frame state In-Reply-To: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> Message-ID: <1600876388.64.0.966776506923.issue40941@roundup.psfhosted.org> STINNER Victor added the comment: No problem. These warnings are only visible on 64-bit Windows. I spotted them waiting looking at some Windows errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:52:57 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 23 Sep 2020 15:52:57 +0000 Subject: [issue41840] [regression] symtable.Symbol.is_local() is no longer True for bound global symbols In-Reply-To: <1600863724.98.0.825702411391.issue41840@roundup.psfhosted.org> Message-ID: <1600876377.36.0.897310634914.issue41840@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 11:54:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Sep 2020 15:54:41 +0000 Subject: [issue33822] IDLE subsection of What's New 3.8 In-Reply-To: <1528651946.69.0.592728768989.issue33822@psf.upfronthosting.co.za> Message-ID: <1600876481.23.0.634604414193.issue33822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -21425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:05:17 2020 From: report at bugs.python.org (Bug Reporter) Date: Wed, 23 Sep 2020 16:05:17 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600877117.02.0.13951470239.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: Is it worth comparing openssl vanilla code and configs with Ubuntu's version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:23:37 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Sep 2020 16:23:37 +0000 Subject: [issue41845] Promote PyObject_GenericGetDict to the stable API In-Reply-To: <1600871509.15.0.3993940648.issue41845@roundup.psfhosted.org> Message-ID: <1600878217.32.0.0233669225104.issue41845@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was moved out from the limited API in issue13903 (7d95e4072169911b228c9e42367afb5f17fd3db0). I think it was error. ---------- nosy: +Mark.Shannon, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:25:34 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 16:25:34 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600878334.23.0.375940603613.issue41833@roundup.psfhosted.org> STINNER Victor added the comment: I rewrote my PR to generate names like "Thread-3 (func)", rather than just "func". So if two target functions have the same name, or if two threads use the same target, it remains possible to distinguish the two threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:40:03 2020 From: report at bugs.python.org (Mark Shannon) Date: Wed, 23 Sep 2020 16:40:03 +0000 Subject: [issue41845] Promote PyObject_GenericGetDict to the stable API In-Reply-To: <1600871509.15.0.3993940648.issue41845@roundup.psfhosted.org> Message-ID: <1600879203.31.0.00215283273478.issue41845@roundup.psfhosted.org> Mark Shannon added the comment: It wasn't removed in 7d95e4072169911b228c9e42367afb5f17fd3db0, just moved from object.h to dictobject.h It was still part of the API at that point, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:43:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Sep 2020 16:43:00 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600879380.79.0.390731502184.issue41833@roundup.psfhosted.org> Serhiy Storchaka added the comment: Ideally, I would prefer separate counters for different names, and omitting a number for the first thread with unique name: doit doit-2 Thread-1 Thread-2 print print-2 doit-3 But it is not feasible. It would require supporting a cache which can grow with every new thread and non-trivial code to avoid race conditions. So I am fine with Ammar's idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:51:36 2020 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 23 Sep 2020 16:51:36 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600872594.55.0.261984022225.issue41842@roundup.psfhosted.org> Message-ID: Marc-Andre Lemburg added the comment: On 23.09.2020 16:49, STINNER Victor wrote: > > STINNER Victor added the comment: > >> Just found an internal API which already takes care of >> unregistering a search function: _PyCodec_Forget(). >> >> All that needs to be done is to expose this as codecs.unregister() >> and add the clearing of the lookup cache. > > Yeah, I saw this function, but it's related to the cache, not to the list of search functions. Ah, right. I just looked at the first occurance of codec_search_path :-) >> BTW: While you're at it, having a way to access the search function >> list from Python would be nice as well, since this would then open >> up the possibility to reorder search functions. > > I didn't hear anyone (ok, apart you) who requested to order search functions. This has come up in the past from people who wanted to override builtin codecs with their own versions. > I dislike the idea of exposing it, since it introduces the risk that someone "unregisters" a search function simply by removing it from the list, without invalidating the cache. > > I prefer to hide the internals to ensure that the cache remains consistent. Sure, a function would merely return a tuple with the entries, not the list itself, e.g. in pseudo code: def get_search_path(): return tuple(interp->codec_search_path) For replacing the vanilla setup, this is not needed, since only one search function gets registered (the builtin one), so rather low priority, I guess. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 23 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:55:42 2020 From: report at bugs.python.org (Lars Schellhas) Date: Wed, 23 Sep 2020 16:55:42 +0000 Subject: [issue25278] Unexpected socket exception on SFTP 'STOR' command In-Reply-To: <1443619244.64.0.188831758146.issue25278@psf.upfronthosting.co.za> Message-ID: <1600880142.21.0.805107211451.issue25278@roundup.psfhosted.org> Lars Schellhas added the comment: I am pretty sure that it is connected to issue 19500. And somehow that issue still isn't resolved although there are already solutions provided. ---------- nosy: +larsschellhas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:56:32 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Sep 2020 16:56:32 +0000 Subject: [issue41845] Promote PyObject_GenericGetDict to the stable API In-Reply-To: <1600871509.15.0.3993940648.issue41845@roundup.psfhosted.org> Message-ID: <1600880192.81.0.545313297149.issue41845@roundup.psfhosted.org> Serhiy Storchaka added the comment: It was moved into the "#ifndef Py_LIMITED_API" block and therefore was effectively excluded from the limited API. We should fix this error in all maintained versions. ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:57:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 16:57:45 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600880265.71.0.0261855876452.issue41833@roundup.psfhosted.org> STINNER Victor added the comment: > Ideally, I would prefer separate counters for different names IMO if you want to go at the level of details, I suggest you to generate yourself thread names: threads = [threading.Thread(name=f"MyThread-{i}") for i in range(1, 6)] Maintaining a list of thread names sounds overkill to me. It would be quite complicated and would increase the memory footprint, for little benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 12:58:06 2020 From: report at bugs.python.org (Lars Schellhas) Date: Wed, 23 Sep 2020 16:58:06 +0000 Subject: [issue19500] ftplib: Add client-side SSL session resumption In-Reply-To: <1383624130.64.0.185541289049.issue19500@psf.upfronthosting.co.za> Message-ID: <1600880286.08.0.516995836681.issue19500@roundup.psfhosted.org> Lars Schellhas added the comment: Excuse me, but why is this issue still open and unfixed? There are already proposed fixes and this issue has been around for nearly 7 years now. Filezilla has forwarded the responsibility to us for this issue (https://trac.filezilla-project.org/ticket/10700), so please, let's just fix it. ---------- nosy: +larsschellhas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 13:26:51 2020 From: report at bugs.python.org (Stephen Ash) Date: Wed, 23 Sep 2020 17:26:51 +0000 Subject: [issue19500] ftplib: Add client-side SSL session resumption In-Reply-To: <1383624130.64.0.185541289049.issue19500@psf.upfronthosting.co.za> Message-ID: <1600882010.99.0.984375118038.issue19500@roundup.psfhosted.org> Change by Stephen Ash : ---------- nosy: -Stephen Ash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 14:23:35 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Sep 2020 18:23:35 +0000 Subject: [issue19500] ftplib: Add client-side SSL session resumption In-Reply-To: <1383624130.64.0.185541289049.issue19500@psf.upfronthosting.co.za> Message-ID: <1600885415.58.0.0054699157935.issue19500@roundup.psfhosted.org> Christian Heimes added the comment: I have provided necessary infrastructure for TLS 1.2 session resumption in the ssl module a couple of releases ago. But nobody has taken ownership of this ftplib issue and provided a full fix with regression tests and documentation update. If you like to see ftplib enhanced to support session resumption, please provide a PR with regression tests. Demanding a fix won't accelerate work on the issue. ---------- stage: patch review -> needs patch versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 14:23:50 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 23 Sep 2020 18:23:50 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) In-Reply-To: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> Message-ID: <1600885430.6.0.522186706947.issue40608@roundup.psfhosted.org> Irit Katriel added the comment: Have you had a chance to look into this? It took some debugging to get to the bottom of this problem in our system (nothing in the "what's new in python 3.8" doc gave any hint). The solution I went for was to replace the old macros with the new ones. If it's not easy or desirable to fix the old macros, should they not be removed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 14:27:05 2020 From: report at bugs.python.org (Christian Heimes) Date: Wed, 23 Sep 2020 18:27:05 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1600885625.62.0.923972141817.issue41561@roundup.psfhosted.org> Christian Heimes added the comment: Yes, that would be useful. I suspect tls1.2-min-seclevel2.patch from the patch set https://launchpad.net/ubuntu/+source/openssl/1.1.1f-1ubuntu2 might be the cause of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 14:27:48 2020 From: report at bugs.python.org (Philippe Ombredanne) Date: Wed, 23 Sep 2020 18:27:48 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1447835823.22.0.872666546521.issue25655@psf.upfronthosting.co.za> Message-ID: <1600885668.09.0.906712550998.issue25655@roundup.psfhosted.org> Philippe Ombredanne added the comment: So the other locations to add docs would be petinetially - https://docs.python.org/3/library/os.html?#os.add_dll_directory - https://docs.python.org/3/extending/windows.html - https://docs.python.org/3/faq/windows.html#is-a-pyd-file-the-same-as-a-dll - https://docs.python.org/3/using/windows.html#finding-modules Which ones would be the best? Also AFAIK there is no Windows Sphinx tag beyond .. availability:: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 14:43:53 2020 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 23 Sep 2020 18:43:53 +0000 Subject: [issue30155] Add ability to get tzinfo from a datetime instance in C API In-Reply-To: <1493047646.24.0.156322797242.issue30155@psf.upfronthosting.co.za> Message-ID: <1600886633.59.0.487064076313.issue30155@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5 by Zackery Spytz in branch 'master': bpo-30155: Add macros to get tzinfo from datetime instances (GH-21633) https://github.com/python/cpython/commit/2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 15:33:03 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 23 Sep 2020 19:33:03 +0000 Subject: [issue25655] Python errors related to failures loading DLL's lack information In-Reply-To: <1600885668.09.0.906712550998.issue25655@roundup.psfhosted.org> Message-ID: <3c4865e1-2b60-7ff9-b365-b81410ae5766@python.org> Steve Dower added the comment: Thanks for doing the search :) > - https://docs.python.org/3/faq/windows.html#is-a-pyd-file-the-same-as-a-dll Probably not here. > - https://docs.python.org/3/using/windows.html#finding-modules Perhaps it is best to put a new section here like what you posted above (but more generic for ctypes and imports), and then link to it from the other places? > - https://docs.python.org/3/library/os.html?#os.add_dll_directory e.g. "This function may be used to work around errors" > - https://docs.python.org/3/extending/windows.html e.g. "If your extension module relies on any DLLs other than those included with Windows or CPython, you will need to include them or else users may receive 'module not found' errors. See for more details." (Some of that text may already be there, been a while since I read that one.) > Also AFAIK there is no Windows Sphinx tag beyond .. availability:: Yeah, I think I was thinking of a different project. But if it's all in Windows-specific sections anyway, and pointing towards the Windows doc page, then it won't matter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 15:34:39 2020 From: report at bugs.python.org (Lars Schellhas) Date: Wed, 23 Sep 2020 19:34:39 +0000 Subject: [issue19500] ftplib: Add client-side SSL session resumption In-Reply-To: <1383624130.64.0.185541289049.issue19500@psf.upfronthosting.co.za> Message-ID: <1600889679.33.0.553256470595.issue19500@roundup.psfhosted.org> Lars Schellhas added the comment: @Christian Heimes, you are absolutely right. I'm sorry if I came off rude. Actually, I just had a rough day at work with the end of it being the realisation that this missing fix would solve my day-filling issue from today. Furthermore, I've actually returned here, just to read through the whole thread again, hoping to find a way to contribute to it's resolution. However, this is my first time contributing to Python, but I'm eager to learn and dive into the necessary resources. Could you give me a hint about where to start? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 16:28:01 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 23 Sep 2020 20:28:01 +0000 Subject: [issue29940] Add follow_wrapped=True option to help() In-Reply-To: <1490802065.05.0.49346265762.issue29940@psf.upfronthosting.co.za> Message-ID: <1600892881.73.0.301840656901.issue29940@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- pull_requests: +21431 pull_request: https://github.com/python/cpython/pull/22390 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 16:42:31 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 23 Sep 2020 20:42:31 +0000 Subject: [issue38776] rlock_count<0 In-Reply-To: <1573552807.68.0.797994213494.issue38776@roundup.psfhosted.org> Message-ID: <1600893751.31.0.637721903578.issue38776@roundup.psfhosted.org> Irit Katriel added the comment: rlock_count is an unsigned long, so it can't be negative. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 17:21:29 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 21:21:29 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600896089.4.0.955346930109.issue41833@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 98c16c991d6e70a48f4280a7cd464d807bdd9f2b by Victor Stinner in branch 'master': bpo-41833: threading.Thread now uses the target name (GH-22357) https://github.com/python/cpython/commit/98c16c991d6e70a48f4280a7cd464d807bdd9f2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 17:23:21 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 21:23:21 +0000 Subject: [issue41833] threading.Thread: use target name if the name parameter is omitted In-Reply-To: <1600775255.57.0.261270212449.issue41833@roundup.psfhosted.org> Message-ID: <1600896201.69.0.179818539161.issue41833@roundup.psfhosted.org> STINNER Victor added the comment: I merged my change with "Thread-1 (func)" format: add the target name, but keep "Thread-3" to distinguish two different threads with the same target name. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 17:24:58 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 21:24:58 +0000 Subject: [issue38776] rlock_count<0 In-Reply-To: <1573552807.68.0.797994213494.issue38776@roundup.psfhosted.org> Message-ID: <1600896298.09.0.841666786717.issue38776@roundup.psfhosted.org> STINNER Victor added the comment: > rlock_count is an unsigned long, so it can't be negative. Right, so I don't see the point of replacing "== 0" with "<= 0". I close the issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 17:25:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 21:25:45 +0000 Subject: [issue41654] Segfault when raising MemoryError In-Reply-To: <1598609759.16.0.336877665683.issue41654@roundup.psfhosted.org> Message-ID: <1600896345.67.0.295907712052.issue41654@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bbeb223e9a5e9f9374df384efa386b4068a65c0e by Victor Stinner in branch 'master': bpo-41654: Fix compiler warning in MemoryError_dealloc() (GH-22387) https://github.com/python/cpython/commit/bbeb223e9a5e9f9374df384efa386b4068a65c0e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 17:25:57 2020 From: report at bugs.python.org (STINNER Victor) Date: Wed, 23 Sep 2020 21:25:57 +0000 Subject: [issue41428] PEP 604 -- Allow writing union types as X | Y In-Reply-To: <1595975550.94.0.895278514403.issue41428@roundup.psfhosted.org> Message-ID: <1600896357.74.0.636113431543.issue41428@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d67de0a30d76c6a28056bae22fd7d13f2e111b77 by Victor Stinner in branch 'master': bpo-41428: Fix compiler warnings in unionobject.c (GH-22388) https://github.com/python/cpython/commit/d67de0a30d76c6a28056bae22fd7d13f2e111b77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 17:36:56 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 23 Sep 2020 21:36:56 +0000 Subject: [issue40042] Enum Flag: psuedo-members have None for name attribute In-Reply-To: <1589810738.21.0.092571074978.issue40042@roundup.psfhosted.org> Message-ID: <1600897016.34.0.30891032903.issue40042@roundup.psfhosted.org> Irit Katriel added the comment: I believe this is what Rahul means: import enum class Color(enum.Flag): RED = enum.auto() BLUE = enum.auto() GREEN = enum.auto() white = Color.RED | Color.BLUE | Color.GREEN assert white.name is None # Note, however that: assert str(Color.RED | Color.BLUE | Color.GREEN) == "Color.GREEN|BLUE|RED" ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 17:41:04 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 23 Sep 2020 21:41:04 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) In-Reply-To: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> Message-ID: <1600897264.24.0.00177180462821.issue40608@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hi Irit, Could you kindly check if PR 12607 solves this issue in any way? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 18:20:01 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 23 Sep 2020 22:20:01 +0000 Subject: [issue41840] [regression] symtable.Symbol.is_local() is no longer True for bound global symbols In-Reply-To: <1600863724.98.0.825702411391.issue41840@roundup.psfhosted.org> Message-ID: <1600899601.83.0.751381333783.issue41840@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +21432 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22391 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 18:21:45 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 23 Sep 2020 22:21:45 +0000 Subject: [issue41840] [regression] symtable.Symbol.is_local() is no longer True for bound global symbols In-Reply-To: <1600863724.98.0.825702411391.issue41840@roundup.psfhosted.org> Message-ID: <1600899705.55.0.184961806932.issue41840@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hi Cendio Ossman and thanks for the report. Indeed, there are a bunch of problems here taking into account the language reference "The variables of the module code block are local and global". PR 22391 fixes those and also the repr-generation for module-level that was also broken ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 18:33:21 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 23 Sep 2020 22:33:21 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> Message-ID: <1600900401.35.0.661440512587.issue41826@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > I'm sorry, that doesn't mean much to me. Is it simply a matter of applying suitable casts to the various parameters in the C code fragments in those? Yep, and in the capture variables and in the rule types. Check https://github.com/python/cpython/pull/22223 for more info (changes in Grammar/python.gram file). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 18:45:27 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 23 Sep 2020 22:45:27 +0000 Subject: [issue41847] Update "install launcher for all users" installer option Message-ID: <1600901127.12.0.836630425545.issue41847@roundup.psfhosted.org> New submission from Steve Dower : The "Install launcher for all users" option on the front page of the installer should be updated to read "Install py.exe launcher for all users" to reduce confusion. However, we should also consider disabling this by default, so that the normal settings do not require admin privileges to install. The reason we started with it enabled by default is because we had to stomp on the 3.4 and earlier py.exe, since there was no other way to make sure it wasn't an issue. That problem still remains, which likely means that if we detect an all-users launcher from a previous version we need to keep the option enabled, but at least for clean installs of 3.10 we can avoid the need for admin completely. ---------- components: Windows messages: 377430 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Update "install launcher for all users" installer option type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 18:46:36 2020 From: report at bugs.python.org (Steve Dower) Date: Wed, 23 Sep 2020 22:46:36 +0000 Subject: [issue41847] Update "install launcher for all users" installer option In-Reply-To: <1600901127.12.0.836630425545.issue41847@roundup.psfhosted.org> Message-ID: <1600901196.96.0.524122574788.issue41847@roundup.psfhosted.org> Steve Dower added the comment: Follow up thought: we could switch out the front page checkbox for "Upgrade existing py.exe launcher (recommended)" when we detect an existing per-machine install, and hide it entirely if we don't detect it. So at least non-admin users have an easy way to bypass the admin requirement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 18:46:28 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 23 Sep 2020 22:46:28 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) In-Reply-To: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> Message-ID: <1600901188.19.0.445330472371.issue40608@roundup.psfhosted.org> Irit Katriel added the comment: I've confirmed that my test still segfaults on master, but if I take the Py_TRASHCAN_SAFE_BEGIN(op) from PR 12607 then it doesn't segfault. ---------- versions: +Python 3.10, Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 19:11:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 23 Sep 2020 23:11:01 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600902661.73.0.388034208867.issue39934@roundup.psfhosted.org> Irit Katriel added the comment: The error is coming from here: https://github.com/python/cpython/blob/cb9879b948a19c9434316f8ab6aba9c4601a8173/Objects/frameobject.c#L958 and CO_MAXBLOCKS is defined in Include/cpython/code.h #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ This is not about recursion or about exception, it's about static nesting level. There is an example here showing an input that gives the same error with >20 nested while blocks: https://github.com/python/cpython/blob/c8f29ad986f8274fc5fbf889bdd2a211878856b9/Lib/test/test_syntax.py#L545 ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 19:12:15 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 23 Sep 2020 23:12:15 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600902735.47.0.554673786307.issue39934@roundup.psfhosted.org> Irit Katriel added the comment: In summary, I think this is not-a-bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 19:33:02 2020 From: report at bugs.python.org (Sergei Lebedev) Date: Wed, 23 Sep 2020 23:33:02 +0000 Subject: [issue41848] PEG parser doesn't allow lambda in for_if_clause Message-ID: <1600903982.27.0.474581886877.issue41848@roundup.psfhosted.org> New submission from Sergei Lebedev : Reproducer: [x for x in [] if lambda: x] This parses fine in 3.8, but doesn't parse in 3.9 because the grammar expects a disjunction after if in for_if_clause [*]. While this change has zero practical significance, I think it might be useful to maintain a list of such changes for tooling authors (who might need to support multiple Python versions). [*]: https://github.com/python/cpython/blob/68526fe258da8c01196fd7cf48e8e5f1280bf8fd/Grammar/python.gram#L523 ---------- components: Interpreter Core messages: 377435 nosy: lys.nikolaou, slebedev priority: normal severity: normal status: open title: PEG parser doesn't allow lambda in for_if_clause type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 20:33:10 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 24 Sep 2020 00:33:10 +0000 Subject: [issue41849] Support reading long lines with io._WindowsConsoleIO Message-ID: <1600907590.14.0.954461587522.issue41849@roundup.psfhosted.org> New submission from Eryk Sun : io._WindowsConsoleIO reads from the console via ReadConsoleW in line-input mode, which limits the line length to the maximum of 256 and the size of the client buffer, including the trailing CRLF (or just CR if processed-input mode is disabled). Text that's typed or pasted beyond the length limit is ignored. The call returns when a carriage return ("\r") is read or the user types the enter key anywhere on the line. Currently the buffer that _WindowsConsoleIO passes to ReadConsoleW is capped at 512 wide characters, based on the C runtime's BUFSIZ (512) macro. This is too small. Legacy mode (i.e. PYTHONLEGACYWINDOWSSTDIO) uses io.FileIO with an 8 KiB buffer, which is 8K characters when the console input codepage is a legacy single-byte encoding. _WindowsConsoleIO should support at least this much. I'd prefer that it allowed up to 32K characters, which is the upper limit for a process command line or for a long filepath. By way of comparison, input(), which calls _PyOS_WindowsConsoleReadline if stdin is a console file, is currently capped at 16K characters. To be able to read up to 32K characters also requires increasing the BufferedReader default buffer size and TextIOWrapper chunk size to 96 KiB (BMP codes in the range 0x0800-0xFFFF encode as a 3-byte UTF-8 sequence) in order to ensure that f.readline() and f.buffer.readline() request the maximum size. This would require changing _io__WindowsConsoleIO___init___impl to set `self->blksize = 96 * 1024` when `console_type == 'r'`, as well as changing _io_open_impl to manually set the _CHUNK_SIZE of the TextIOWrapper to 96 KiB for console input (type 'r'). Maybe TextIOWrapper should just query the raw _blksize as the initial chunk size. That would remove the need to manually set _CHUNK_SIZE. ---------- components: IO, Unicode, Windows messages: 377436 nosy: eryksun, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal stage: needs patch status: open title: Support reading long lines with io._WindowsConsoleIO type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 23 23:12:12 2020 From: report at bugs.python.org (Kyle Altendorf) Date: Thu, 24 Sep 2020 03:12:12 +0000 Subject: [issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment In-Reply-To: <1575658185.88.0.621824601443.issue38989@roundup.psfhosted.org> Message-ID: <1600917132.21.0.425784955266.issue38989@roundup.psfhosted.org> Change by Kyle Altendorf : ---------- nosy: +altendky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 00:55:47 2020 From: report at bugs.python.org (Ethan Furman) Date: Thu, 24 Sep 2020 04:55:47 +0000 Subject: [issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name In-Reply-To: <1585165738.23.0.618463548627.issue40066@roundup.psfhosted.org> Message-ID: <1600923347.92.0.109281078412.issue40066@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +21433 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22392 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 02:45:16 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Sep 2020 06:45:16 +0000 Subject: [issue41849] Support reading long lines with io._WindowsConsoleIO In-Reply-To: <1600907590.14.0.954461587522.issue41849@roundup.psfhosted.org> Message-ID: <1600929916.37.0.249511362036.issue41849@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 02:46:26 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Sep 2020 06:46:26 +0000 Subject: [issue41848] PEG parser doesn't allow lambda in for_if_clause In-Reply-To: <1600903982.27.0.474581886877.issue41848@roundup.psfhosted.org> Message-ID: <1600929986.53.0.959394224362.issue41848@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +benjamin.peterson, gvanrossum, pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 02:51:50 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Thu, 24 Sep 2020 06:51:50 +0000 Subject: [issue41848] PEG parser doesn't allow lambda in for_if_clause In-Reply-To: <1600903982.27.0.474581886877.issue41848@roundup.psfhosted.org> Message-ID: <1600930310.89.0.841630997478.issue41848@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch nosy: +BTaskaya nosy_count: 6.0 -> 7.0 pull_requests: +21434 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22394 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 02:59:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Sep 2020 06:59:53 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600930793.16.0.563087189676.issue39934@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is a bug. Compiler explicitly checks if the number of nested "try" blocks does not exceed the limit of CO_MAXBLOCKS, but it does not count implicit "try" blocks inserted when your assign an exception in the "except" clause. try: ... except Exception as e: ... is actually translated to try: ... except Exception: try: e = ... ... finally: e = None del e So we have double number of nested "try" blocks. ---------- nosy: +Mark.Shannon, serhiy.storchaka type: behavior -> crash versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 03:12:11 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 24 Sep 2020 07:12:11 +0000 Subject: [issue40608] PY3.8 GC segfault (Py_TRASHCAN_SAFE_BEGIN/END are not backwards compatible) In-Reply-To: <1589306849.27.0.146369076662.issue40608@roundup.psfhosted.org> Message-ID: <1600931531.01.0.603783919261.issue40608@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think that we should try to land PR 12607 first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 03:34:09 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Sep 2020 07:34:09 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600932849.8.0.240446544489.issue39934@roundup.psfhosted.org> Serhiy Storchaka added the comment: Humm, my supposition was not absolutely correct. The cause is that the compiler and the interpreter use the stack of size CO_MAXBLOCKS for different things. The interpreter pushes a thing for the "except" clause, while the compiler does not do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 04:02:56 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 24 Sep 2020 08:02:56 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600934576.37.0.90263941265.issue39934@roundup.psfhosted.org> Irit Katriel added the comment: Unlike the 22 nested while, if 1: if 2: ... if 22: pass doesn't error. Is that correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 04:14:09 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 24 Sep 2020 08:14:09 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600935249.6.0.482672863606.issue39934@roundup.psfhosted.org> Irit Katriel added the comment: Another oddity: This gives the error: for x in '1': for x in '2': for x in '3': for x in '4': for x in '5': for x in '6': for x in '8': for x in '9': for x in '10': for x in '11': for x in '12': for x in '13': for x in '14': for x in '15': for x in '16': for x in '17': for x in '18': for x in '19': for x in '20': for x in '21': for x in '22': pass but this doesn't: for x in '1': for x in '2': for x in '3': for x in '4': for x in '5': for x in '6': for x in '8': for x in '9': for x in '10': for x in '11': for x in '12': for x in '13': for x in '14': for x in '15': for x in '16': for x in '17': for x in '18': for x in '19': for x in '20': for x in '21': pass else: for x in '22': pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 04:23:10 2020 From: report at bugs.python.org (Gregoire Chalony) Date: Thu, 24 Sep 2020 08:23:10 +0000 Subject: [issue41850] inspect.py: access block stack Message-ID: <1600935790.44.0.688452336961.issue41850@roundup.psfhosted.org> New submission from Gregoire Chalony : The inspect module doesn't currently expose any way to access the block stack at runtime. Would that be possible? Aked on StackOverflow here: https://stackoverflow.com/questions/63187845/cpython-access-loop-depth-level-block-stack. ---------- messages: 377442 nosy: gchalony priority: normal severity: normal status: open title: inspect.py: access block stack type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 05:50:27 2020 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Sep 2020 09:50:27 +0000 Subject: [issue41849] Support reading long lines with io._WindowsConsoleIO In-Reply-To: <1600907590.14.0.954461587522.issue41849@roundup.psfhosted.org> Message-ID: <1600941027.27.0.102001671843.issue41849@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 06:09:55 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 24 Sep 2020 10:09:55 +0000 Subject: [issue28694] tkinter interface to fontchooser In-Reply-To: <1479174800.7.0.200377827869.issue28694@psf.upfronthosting.co.za> Message-ID: <1600942195.9.0.00881290169539.issue28694@roundup.psfhosted.org> E. Paine added the comment: I have started looking at Mark's wrapper (though I have not been able to ?spend as much time on it as I would like). It's mostly small changes ?that I have made (in no particular order): - TkFontchooserFontChanged event calls 'command' (to be behave like an 'apply' button - this only occurs on platforms that set font due to user ?actions, otherwise we don't know what font has been selected) - a cget method (which getitem now forwards to) - 'show' takes 'configure' kwargs - allow instantiation without kwargs before root creation* - 'ismodal' decorated as property - 'compatible' module attribute set at import (`tkinter.TkVersion >= 8.6`) - winfo_toplevel used to ensure parent is a window (see comment at bottom) - TkFontchooserVisibility has a visibilitycommand kwarg** * In most use cases, the user will only want a single instance of the Chooser class through the entire application run and then just change change the parent as required. The idea here is that we can instantiate the class at import and then lazy-load the parent so the user can call something like `tkinter.fontchooser.chooser.show()`. This is the reason ?I decided to decorate 'ismodal' as a property, rather than having it as ?a variable set on class load. ** I would prefer to keep the user from binding virtual events to the parent themselves and instead intend to provide a kwarg for a command to be called when this event is generated (I think binding to the parent is needlessly complicated, especially when we call winfo_toplevel before ?passing to Tk anyway, so I thought it was either this or we provide the ?user with a 'bind' method for the class). Between this proposal and ?TkFontchooserFontChanged calling 'command', this would eliminate all need for the user to bind the events themselves (hence, they should not ?be included in the docs). I haven't yet properly tested it (just focusing on changing the ?user-facing api), however I think what Mark has got so far is very close ?to what we should submit as a patch (my ideas are attached as a diff of ?Mark's file). The above are just QOL changes to *hopefully* make it ?easier for the user, rather than another rewrite of the wrapper. > Documentation would be key Definitely! I think this is quite possibly the hardest part of the patch (after deciding what is the 'cleanest' api for the user) because we need ?to ensure the docs are detailed and precise while being accessible to ?those who don't know Tk (and hence won't be digging through the Tk man - ?in which case, as helpful as the "Notable differences from underlying Tk ?API" is internally, it should not be part of the docs). > I assume the official wrapper needs checks to ensure fontchooser is > available (i.e. 8.6 or greater). If not, should the wrapper just error out? Personally, I would just leave the wrapper without any checks for version validity. All the official installers use 8.6 and there are very ?few distros that don't provide 8.6 as their default Tk package (most ?notably CentOS 6 & 7). We should provide a module-level attribute that ?checks the Tk version for the user (this is the 'compatible' attribute ?included in the diff) but I don't think we should do anything beyond ?this (it is hence up to the user to ensure they are on a compatible ?system). Applications like IDLE, which try to be compatible with older ?versions of Tk, should provide their own fallback interface rather than ?building such an interface into tkinter. I am not the biggest fan of the current implementation of ismodal as ?this is based purely on Mark's testing of just 3 windowing systems ?(Windows, X11 & MacOS - my point is about the limited number not that I ?doubt Mark's testing!). While I think the BSDs also use X11, we are ?effectively declaring that there are no other windowing systems (on an ?OS CPython supports) where fontchooser is modal (which I very reluctant ?to do). At the same time, though, I don't have a clue how else it would ?be implemented in a user-friendly way (I can think of a couple of ways ?but all of them involve showing the fontchooser temporarily). My suggestion is, therefore, to raise a NotImplementedError if the ?current windowing system is not one of 'win32', 'x11' or 'aqua' ?(because, of these, we know that only win32 is modal - the docs would ?have to note this limited availability). Addressing a couple of Mark's points in an email he sent me: > the -parent option doesn?t need to be a toplevel In my limited testing (on X11), I found that the virtual events were not ?called unless this was true (or at least it appeared so...). > there?s some argument to be made that because the bind lets you ?> trigger multiple callbacks it may promote looser coupling While I see the point, I think the same could be said of Tk having ?-command rather than a virtual binding. I also think we should pick one ?of either kwargs or virtual events and then stick to that to avoid an ?inconsistent api (in my diff, I chose the former of the two). ---------- keywords: +patch Added file: https://bugs.python.org/file49472/mark.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 06:47:07 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 24 Sep 2020 10:47:07 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600944427.45.0.664433769101.issue39934@roundup.psfhosted.org> Mark Shannon added the comment: iritkatriel What error do you see and on what version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 07:13:12 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 24 Sep 2020 11:13:12 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600945992.63.0.594323493369.issue39934@roundup.psfhosted.org> Irit Katriel added the comment: On windows 10, master: > python.bat --version Running Release|Win32 interpreter... Python 3.10.0a0 >python.bat x.py Running Release|Win32 interpreter... SyntaxError: too many statically nested blocks That's when x.py has the nested for loops without else. The error goes away if I add the else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 07:22:21 2020 From: report at bugs.python.org (Mark Shannon) Date: Thu, 24 Sep 2020 11:22:21 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1600946541.04.0.592610459304.issue39934@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +21435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22395 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 07:27:19 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 24 Sep 2020 11:27:19 +0000 Subject: [issue41851] tkinter: add font neg and equal methods Message-ID: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> New submission from E. Paine : I think it would be helpful to add these methods to the tkinter font class. Starting with the equal method, I have found it very useful to be able to compare tkinter fonts based on their value rather than just name. I used this, for example, in #28694 to ensure the -font attribute had been changed correctly (though there I compared each of the attributes explicitly rather than using `.actual()` as I have in this patch). The neg method, I think, would be very useful to allow easy conversion between points and pixels. For example: points = Font(size=16) pixels = -points ---------- components: Tkinter messages: 377446 nosy: epaine, gpolo, serhiy.storchaka priority: normal severity: normal status: open title: tkinter: add font neg and equal methods type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 07:27:38 2020 From: report at bugs.python.org (E. Paine) Date: Thu, 24 Sep 2020 11:27:38 +0000 Subject: [issue41851] tkinter: add font neg and equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1600946858.98.0.380305775797.issue41851@roundup.psfhosted.org> Change by E. Paine : ---------- keywords: +patch pull_requests: +21436 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 07:36:35 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 24 Sep 2020 11:36:35 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600947395.59.0.697590532856.issue41602@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 07:43:34 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 24 Sep 2020 11:43:34 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600947814.05.0.149961869292.issue41602@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- nosy: +lukasz.langa nosy_count: 5.0 -> 6.0 pull_requests: +21437 pull_request: https://github.com/python/cpython/pull/22397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 10:34:43 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 24 Sep 2020 14:34:43 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600958083.35.0.729499477039.issue41602@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset ca8d46dd422e5aa10f444796d93faec5a8cbc1e0 by ?ukasz Langa in branch '3.9': [3.9] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (GH-21956) (#22397) https://github.com/python/cpython/commit/ca8d46dd422e5aa10f444796d93faec5a8cbc1e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 10:36:47 2020 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 24 Sep 2020 14:36:47 +0000 Subject: [issue41739] test_logging: threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) In-Reply-To: <1599493566.06.0.792070733484.issue41739@roundup.psfhosted.org> Message-ID: <1600958207.53.0.36074036866.issue41739@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 10:40:18 2020 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 24 Sep 2020 14:40:18 +0000 Subject: [issue41838] Value error is showing in docset python (class) In-Reply-To: <1600854065.72.0.967885714399.issue41838@roundup.psfhosted.org> Message-ID: <1600958418.27.0.148845381877.issue41838@roundup.psfhosted.org> Change by Eric V. Smith : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 11:11:17 2020 From: report at bugs.python.org (Thomas Grainger) Date: Thu, 24 Sep 2020 15:11:17 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600960277.64.0.929356953731.issue41602@roundup.psfhosted.org> Change by Thomas Grainger : ---------- pull_requests: +21438 pull_request: https://github.com/python/cpython/pull/22398 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 11:59:55 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 15:59:55 +0000 Subject: [issue41849] Support reading long lines with io._WindowsConsoleIO In-Reply-To: <1600907590.14.0.954461587522.issue41849@roundup.psfhosted.org> Message-ID: <1600963195.11.0.146182567719.issue41849@roundup.psfhosted.org> Steve Dower added the comment: I'm in favour of this change in principle, but would want to look at the PR closely. The biggest risk here is that we have to emulate GNU readline for compatibility, which severely limits the data that can be passed through, and also forces multiple encoding/decoding passes. It would be nice to be able to bypass this in cases where nobody is using it, though since so many host applications use hooks there'll likely only be a benefit to people at the plain console... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 12:01:53 2020 From: report at bugs.python.org (Forrest Shields) Date: Thu, 24 Sep 2020 16:01:53 +0000 Subject: [issue24757] Installing Py on Windows: Need to restart or logout for path to be added In-Reply-To: <1438278915.55.0.513516650833.issue24757@psf.upfronthosting.co.za> Message-ID: <1600963313.82.0.0115189653783.issue24757@roundup.psfhosted.org> Forrest Shields added the comment: As of 3.8.5 the current shell's PATH is outdated after a commandline system-wide installation. This makes it very difficult to do a scripted install of Python followed by the `python` or `pip` commands, as they will not be found. In addition to modifying the PATH in the system scope, the PATH should also be modified for the current process (shell). Here is the WORKAROUND I created and am currently using: 1. Perform the commandline system-wide installation from an Administrative PowerShell prompt. 2. After the installation (but before using `python` or `pip`) rebuild the PATH environment variable for the current process from the concatenation of the PATH environment variables from the System and User scopes (this is how Windows builds the PATH) by using this code: ``` [Environment]::SetEnvironmentVariable('PATH', [Environment]::GetEnvironmentVariable('PATH', 'Machine') + ';' + [Environment]::GetEnvironmentVariable('PATH', 'User'), 'Process') ``` ---------- components: +Installation nosy: +forrestshields2 versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 12:44:20 2020 From: report at bugs.python.org (Ben Kurtovic) Date: Thu, 24 Sep 2020 16:44:20 +0000 Subject: [issue41852] Inconsistent errors for JSON-encoding NaNs with allow_nan=False Message-ID: <1600965860.06.0.567784845074.issue41852@roundup.psfhosted.org> New submission from Ben Kurtovic : json.dump vs. json.dumps have inconsistent error messages when encoding NaN with allow_nan=False: >>> json.dumps(float('nan'), allow_nan=False) ValueError: Out of range float values are not JSON compliant >>> json.dump(float('nan'), sys.stdout, allow_nan=False) ValueError: Out of range float values are not JSON compliant: nan json.dump's error includes the value (which is useful); json.dumps's does not. json.dumps uses this C implementation: https://github.com/python/cpython/blob/d67de0a30d76c6a28056bae22fd7d13f2e111b77/Modules/_json.c#L1340 json.dump uses this Python implementation: https://github.com/python/cpython/blob/d67de0a30d76c6a28056bae22fd7d13f2e111b77/Lib/json/encoder.py#L223 (Separately, is it expected that only one uses the C implementation? This seems it could have unexpected performance implications - without testing, I would've expected json.dump to take the "faster" path since it doesn't need to hold the entire encoded string in memory.) ---------- components: Extension Modules, Library (Lib) messages: 377450 nosy: earwig priority: normal severity: normal status: open title: Inconsistent errors for JSON-encoding NaNs with allow_nan=False type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 12:44:22 2020 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 24 Sep 2020 16:44:22 +0000 Subject: [issue41602] Python doesn't exit with proper resultcode on SIGINT in runpy (pymain_run_module) In-Reply-To: <1597953517.67.0.398105173164.issue41602@roundup.psfhosted.org> Message-ID: <1600965862.47.0.970488644504.issue41602@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset ae462297c08515f2c0dacf77b04816504142ba3e by Thomas Grainger in branch '3.8': [3.8] bpo-41602: raise SIGINT exit code on KeyboardInterrupt from pymain_run_module (GH-21956) (#22398) https://github.com/python/cpython/commit/ae462297c08515f2c0dacf77b04816504142ba3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 12:45:07 2020 From: report at bugs.python.org (Forrest Shields) Date: Thu, 24 Sep 2020 16:45:07 +0000 Subject: [issue41853] Windows docs for command line install don't mention /log option Message-ID: <1600965907.53.0.783405131873.issue41853@roundup.psfhosted.org> New submission from Forrest Shields : Section "3.1.3. Installing Without UI" of the Windows documentation at https://docs.python.org/3/using/windows.html#installing-without-ui does not mention the existence of the `/log` option. However, this option is detailed when the Windows installer is executed with a `/?` argument. (see attached image). The documentation (for all versions that contained the logging option) should be updated. The help dialog also defines the `/simple` option. This appears to overlap with a "name=value" option called SimpleInstall. If both options are still active, then the docs should also mention `/simple`. If this option is deprecated in favor of the "name=value" version, then the help dialog needs to be updated. Finally, I think the docs would be much more readable if the slash options were in a table similar to the "name=value" options. ---------- assignee: docs at python components: Documentation, Windows files: Python-3.8.5-for-WIndows--Setup-Help.png messages: 377452 nosy: docs at python, forrestshields2, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows docs for command line install don't mention /log option type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49473/Python-3.8.5-for-WIndows--Setup-Help.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 13:05:07 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Sep 2020 17:05:07 +0000 Subject: [issue41852] Inconsistent errors for JSON-encoding NaNs with allow_nan=False In-Reply-To: <1600965860.06.0.567784845074.issue41852@roundup.psfhosted.org> Message-ID: <1600967107.63.0.983590711638.issue41852@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 14:03:48 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 18:03:48 +0000 Subject: [issue24757] Installing Py on Windows: Need to restart or logout for path to be added In-Reply-To: <1438278915.55.0.513516650833.issue24757@psf.upfronthosting.co.za> Message-ID: <1600970628.6.0.662785222132.issue24757@roundup.psfhosted.org> Steve Dower added the comment: Sorry, but we don't have any way to update the current terminal process. We already update the current shell, so if you start a new terminal/Powershell/cmd/etc. instance it should have the updated variable. The workaround you posted is fine. Directly adding the new install to the current PATH is also okay. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 14:10:19 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 18:10:19 +0000 Subject: [issue41853] Windows docs for command line install don't mention /log option In-Reply-To: <1600965907.53.0.783405131873.issue41853@roundup.psfhosted.org> Message-ID: <1600971019.11.0.67193037073.issue41853@roundup.psfhosted.org> Steve Dower added the comment: Sounds good to me. Pull requests welcome :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 14:37:33 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Sep 2020 18:37:33 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600972653.4.0.28749637888.issue41775@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21439 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22399 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 15:30:31 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Sep 2020 19:30:31 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600975831.32.0.75564093474.issue41775@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 05cc881cbcf5d73a312568c78c7149eae3195072 by Terry Jan Reedy in branch 'master': bpo-41775: Make 'IDLE Shell' the shell title (#22399) https://github.com/python/cpython/commit/05cc881cbcf5d73a312568c78c7149eae3195072 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 15:30:50 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 24 Sep 2020 19:30:50 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600975850.59.0.355606293541.issue41775@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +21440 pull_request: https://github.com/python/cpython/pull/22400 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 15:31:03 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 24 Sep 2020 19:31:03 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600975863.85.0.840028693904.issue41775@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21441 pull_request: https://github.com/python/cpython/pull/22401 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:02:12 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Sep 2020 20:02:12 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1600977732.31.0.809523173572.issue41774@roundup.psfhosted.org> Terry J. Reedy added the comment: I modeled the new entry on the previous one. The code and its test. def fr(n, remove): mylist = list(range(n)) for i in range(len(mylist)-1, -1, -1): if remove(mylist[i]): del mylist[i] return mylist def ff(n, keep): mylist = list(range(n)) j = 0 for i, item in enumerate(mylist): if keep(item): mylist[j] = item j += 1 del mylist[j:] return mylist for i in range(9): expect = list(range(0, i, 2)) def remove(n): return n % 2 def keep(n): return n % 2 == 0 print(fr(i, remove) == ff(i, keep) == expect) expect = list(range(i//2)) def remove(n): return n >= i//2 def keep(n): return n < i//2 print(fr(i, remove) == ff(i, keep) == expect) expect = list(range(i//2, i)) def remove(n): return n < i//2 def keep(n): return n >= i//2 print(fr(i, remove) == ff(i, keep) == expect) # all True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:07:56 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 24 Sep 2020 20:07:56 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600978076.79.0.130854579062.issue41775@roundup.psfhosted.org> miss-islington added the comment: New changeset 4080f12ccccb17cee36732758912dc4346ec9361 by Miss Islington (bot) in branch '3.9': bpo-41775: Make 'IDLE Shell' the shell title (GH-22399) https://github.com/python/cpython/commit/4080f12ccccb17cee36732758912dc4346ec9361 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:08:09 2020 From: report at bugs.python.org (miss-islington) Date: Thu, 24 Sep 2020 20:08:09 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600978089.71.0.361698805461.issue41775@roundup.psfhosted.org> miss-islington added the comment: New changeset 18e59f587b86297d4fc99765be10d92a717d4775 by Miss Islington (bot) in branch '3.8': bpo-41775: Make 'IDLE Shell' the shell title (GH-22399) https://github.com/python/cpython/commit/18e59f587b86297d4fc99765be10d92a717d4775 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:09:15 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Sep 2020 20:09:15 +0000 Subject: [issue41775] IDLE: change Shell window title In-Reply-To: <1599969610.9.0.339863836693.issue41775@roundup.psfhosted.org> Message-ID: <1600978155.38.0.679551936985.issue41775@roundup.psfhosted.org> Terry J. Reedy added the comment: In the last few months, there has been an increase in bpo issues mis-tagged IDLE. Today's example: #41774 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:11:39 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Sep 2020 20:11:39 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1600978299.05.0.993823992199.issue41774@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +21442 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22402 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:23:50 2020 From: report at bugs.python.org (Reuben Thomas) Date: Thu, 24 Sep 2020 20:23:50 +0000 Subject: [issue41854] argparse.add_mutually_exclusive_group fails for optional positional arguments Message-ID: <1600979030.91.0.326865229332.issue41854@roundup.psfhosted.org> New submission from Reuben Thomas : The following code: group = parser.add_mutually_exclusive_group() group.add_argument('--install-only', action='store_true', help='just install the program, do not run it') group.add_argument('args', metavar='ARGUMENT', nargs='*', default=None, help='arguments to PROGRAM') gives the following error: group.add_argument('args', metavar='ARGUMENT', nargs='*', File "/usr/lib/python3.8/argparse.py", line 1398, in add_argument return self._add_action(action) File "/usr/lib/python3.8/argparse.py", line 1621, in _add_action raise ValueError(msg) ValueError: mutually exclusive arguments must be optional But the 'args' argument *is* optional, as there can be 0 of them. ---------- components: Library (Lib) messages: 377460 nosy: rrt priority: normal severity: normal status: open title: argparse.add_mutually_exclusive_group fails for optional positional arguments versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:30:47 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 24 Sep 2020 20:30:47 +0000 Subject: [issue41855] FastPath.zip_children can give duplicate results on Python 3.8 Message-ID: <1600979447.4.0.878308868671.issue41855@roundup.psfhosted.org> New submission from Jason R. Coombs : Scott J. reports in an e-mail: When upgrading to Python 3.8.2, we noticed two issues in importlib.metadata which are not present in importlib_metadata. 1. FastPath.zip_children() is very slow for large zips. Python 3.8.3 > already has a fix for this > ([[bug]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.python.org%2Fissue39667&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462361570&sdata=Msk47lScorCQpx5PHiKrpeYYzBLMR89HNZ7RwY7ch4c%3D&reserved=0), > [[changelog]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.python.org%2F3%2Fwhatsnew%2Fchangelog.html%23id45&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462371564&sdata=CSPBVi5rPFSCovRZdd8WNbOQ4mxDycy%2FmjDhbty4OLk%3D&reserved=0)), > which includes merging in importlib_metadata 1.5.0. 2. FastPath.zip_children() can give duplicate results, causing > duplicate results in entry_points(). This issue was reported in > importlib_metadata in March > ([[link]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2Fpython-devs%2Fimportlib_metadata%2F-%2Fissues%2F117&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462371564&sdata=g5N0ew3WAOUfPJ5eL7oY0j9NIpXkh8HAkV%2FWD4UppX8%3D&reserved=0)) > and fixed in importlib_metadata 1.5.2 > ([[changelog]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fimportlib-metadata.readthedocs.io%2Fen%2Flatest%2Fchangelog.html%23v1-5-2&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462381558&sdata=UpnqBoyl%2FcGMkF%2BfFufredA0QGt31o5Qag3joQ%2FJhDs%3D&reserved=0)). In June, importlib_metadata 1.6.1 (including the fix for \#2) was merged into Python ([[bug]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.python.org%2Fissue39791%23msg370782&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462381558&sdata=i8Y8o5f3uBXPP8OU9I3PkKSHzS%2B3z4kcd%2FdH1l%2B9YI8%3D&reserved=0), [[PR]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F20659&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462391552&sdata=Q5P3RuTNpctc4E93l2dqXRc1LYmw9XSnBb%2FaJbKTcMg%3D&reserved=0)) and backported to 3.9 ([[PR]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F20661&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462391552&sdata=f%2BghmbplIsbmc9CFgoQX7vxc%2FZPLG2TkEgjMZtez71s%3D&reserved=0)). However, the backport for Python 3.8 was **not** merged ([[PR]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F20662&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462391552&sdata=JTpQpeuzE%2BGvL%2FNccWcuu0vQWRKQbkBHLmzeNmWZMFc%3D&reserved=0)). Jason said: > Of course this can\'t backport to 3.8; importlib.resources.files > doesn\'t exist there. No problem. Bug fixes will need to be backported > specially if needed. As far as I can tell, no version of importlib_metadata newer than 1.5.0 has ever been merged into Python 3.8, and so bug \#2 is still present (tested in 3.8.6rc1). This seems like it falls under the \"bug fixes if needed\" category. We just need to fix the duplicate entries, as reported in importlib_metadata. This should be trivial. The diff in python 3.9 is [[here]{.ul}](https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F20661%2Ffiles%23diff-499abe3a411df5cf55659b640ac3b2b4L411-R435&data=02%7C01%7Cbwarsaw%40linkedin.com%7C514c7c4d1eea417ed26908d86024cd43%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637365058462401547&sdata=qZXa9e13SVng5tkL3Im2s1Gc2OSLOKlqiiDKBTqkxoI%3D&reserved=0). ---------- assignee: jaraco messages: 377461 nosy: barry, jaraco priority: normal severity: normal status: open title: FastPath.zip_children can give duplicate results on Python 3.8 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:31:51 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 24 Sep 2020 20:31:51 +0000 Subject: [issue41855] FastPath.zip_children can give duplicate results on Python 3.8 In-Reply-To: <1600979447.4.0.878308868671.issue41855@roundup.psfhosted.org> Message-ID: <1600979511.96.0.0693723914923.issue41855@roundup.psfhosted.org> Jason R. Coombs added the comment: The relevant commit is already present in importlib_metadata as [079ca1cb701a5f4aab0a9cb00b0782c7ea8fb70b](https://gitlab.com/python-devs/importlib_metadata/-/commit/079ca1cb701a5f4aab0a9cb00b0782c7ea8fb70b). ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:39:03 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 20:39:03 +0000 Subject: [issue41492] Fix signing description for Windows release builds In-Reply-To: <1596670501.61.0.28435008733.issue41492@roundup.psfhosted.org> Message-ID: <1600979943.69.0.168957224354.issue41492@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:39:22 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 20:39:22 +0000 Subject: [issue39041] Support GitHub Actions in CI In-Reply-To: <1576274167.03.0.917402415265.issue39041@roundup.psfhosted.org> Message-ID: <1600979962.41.0.74891140043.issue39041@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:39:51 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 20:39:51 +0000 Subject: [issue40458] test_bad_getattr crashes on APPX test In-Reply-To: <1588288227.67.0.928950925895.issue40458@roundup.psfhosted.org> Message-ID: <1600979991.64.0.97511229954.issue40458@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 16:43:10 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 24 Sep 2020 20:43:10 +0000 Subject: [issue41855] FastPath.zip_children can give duplicate results on Python 3.8 In-Reply-To: <1600979447.4.0.878308868671.issue41855@roundup.psfhosted.org> Message-ID: <1600980190.38.0.896621193345.issue41855@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +21443 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 18:17:54 2020 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 24 Sep 2020 22:17:54 +0000 Subject: [issue41855] FastPath.zip_children can give duplicate results on Python 3.8 In-Reply-To: <1600979447.4.0.878308868671.issue41855@roundup.psfhosted.org> Message-ID: <1600985874.25.0.617828291835.issue41855@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +21444 pull_request: https://github.com/python/cpython/pull/22404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 18:27:40 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 24 Sep 2020 22:27:40 +0000 Subject: [issue41849] Support reading long lines with io._WindowsConsoleIO In-Reply-To: <1600907590.14.0.954461587522.issue41849@roundup.psfhosted.org> Message-ID: <1600986460.74.0.18301283333.issue41849@roundup.psfhosted.org> Eryk Sun added the comment: > The biggest risk here is that we have to emulate GNU readline for > compatibility, which severely limits the data that can be passed > through, and also forces multiple encoding/decoding passes. I'm not suggesting to disable the console's line-input and echo-input modes and implement our own line editor. If people don't like the built-in line editor that the console provides, they can use pyreadline, which directly uses the console's low-level API via ctypes. Here's an example of what I would like to just work by default in Python: import sys import win32console def write_input(h, s): records = [] for c in s: b = c.encode('utf-16le') for i in range(0, len(b), 2): r = win32console.PyINPUT_RECORDType(win32console.KEY_EVENT) r.KeyDown = True r.RepeatCount = 1 r.Char = b[i:i+2].decode('utf-16le', 'surrogatepass') records.append(r) h.WriteConsoleInput(records) def write_and_read_line(s): if '\r' not in s: s += '\r' h = win32console.GetStdHandle(win32console.STD_INPUT_HANDLE) mode = h.GetConsoleMode() h.SetConsoleMode(mode & ~win32console.ENABLE_ECHO_INPUT) try: write_input(h, s) line = sys.stdin.readline() finally: h.SetConsoleMode(mode) return line >>> src_line = 'a' * 32765 + '\r' >>> res_line = write_and_read_line(src_line) >>> assert res_line == src_line.replace('\r', '\n') Traceback (most recent call last): File "", line 1, in AssertionError >>> len(res_line) 511 >>> res_line[:5], res_line[-5:] ('aaaaa', 'aaaa\n') Currently the ReadConsoleW buffer in read_console_w is capped at 512 (BUFSIZ) characters. With the console's processed-input mode enabled, it writes a trailing CRLF instead of the raw CR. So the user is limited to typing or pasting just 510 characters on a single line. I was only thinking to increase the default maximum size up to 32K in read_console_w -- removing the fixed BUFSIZ aspect of the implementation in favor of capping the buffer used at BUFMAX. In practice this also requires similar default increases for the BufferedReader size and TextIOWrapper chunk size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 18:33:37 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 22:33:37 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1600986817.32.0.23272962688.issue39107@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +21445 pull_request: https://github.com/python/cpython/pull/22405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 18:33:31 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Sep 2020 22:33:31 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1600986811.08.0.169001293957.issue41774@roundup.psfhosted.org> Raymond Hettinger added the comment: > The usually recommended alternative is to make a new list of > things not deleted. But one can do this in-place by writing > the new list on top of the old by using a explicit second > index to move items just once. I don't think we should send users down this path. Better to stick with high level, easy-to-implement and performant suggestions: """ To edit a list in-place it is often simplest and fastest to replace the entire list: colors[:] = [color for color in colors if websafe(color)] This makes a single pass through the list and efficiently builds a new list. The colors[:] then replaces the entire contents of the original list with the new list """ Besides being easy to get right, this is likely to be *much* faster than tracking two indicies to manipulate the array in-place. Slice operations run at the speed of a C memcpy (plus the ref count changes) and don't involve creating and destroying integer objects for indexing. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 18:55:46 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 22:55:46 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1600988146.0.0.467989005496.issue39107@roundup.psfhosted.org> Steve Dower added the comment: I did a build for Windows and put up the PR taking it in and there seems to be one (related) test failure: ====================================================================== FAIL: test_from (tkinter.test.test_tkinter.test_widgets.ScaleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\a\cpython\cpython\lib\tkinter\test\test_tkinter\test_widgets.py", line 943, in test_from self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=float_round) File "D:\a\cpython\cpython\lib\tkinter\test\widget_tests.py", line 106, in checkFloatParam self.checkParam(widget, name, value, conv=conv, **kwargs) File "D:\a\cpython\cpython\lib\tkinter\test\widget_tests.py", line 63, in checkParam self.assertEqual2(widget[name], expected, eq=eq) File "D:\a\cpython\cpython\lib\tkinter\test\widget_tests.py", line 47, in assertEqual2 self.assertEqual(actual, expected, msg) AssertionError: 14.9 != 15.0 Terry, any ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 18:56:32 2020 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Sep 2020 22:56:32 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1600988192.39.0.309903497209.issue39107@roundup.psfhosted.org> Steve Dower added the comment: (My PR is from a branch in the main repo, so if you want to just go in and fix it, feel free.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 19:01:53 2020 From: report at bugs.python.org (Irit Katriel) Date: Thu, 24 Sep 2020 23:01:53 +0000 Subject: [issue40813] Output SyntaxError is not defective In-Reply-To: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> Message-ID: <1600988513.06.0.0587828137584.issue40813@roundup.psfhosted.org> Irit Katriel added the comment: I don't think it's true that the lineno is correct when compiling a string (Remi's string is just too short): >>> try: ... compile('if __name__ == "__main__":\n print("hello world"\n x=5\n', '', 'exec') ... except SyntaxError as e: ... print("e.lineno=", e.lineno) ... print("e.offset=", e.offset) ... print("e.text=", e.text) ... e.lineno= 3 e.offset= 4 e.text= x=5 >>> Arguably the syntax error is on line 3. Line 2 can be complemented by a line 3 that will make it valid. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 19:20:17 2020 From: report at bugs.python.org (Eryk Sun) Date: Thu, 24 Sep 2020 23:20:17 +0000 Subject: [issue24757] Installing Py on Windows: Need to restart or logout for path to be added In-Reply-To: <1438278915.55.0.513516650833.issue24757@psf.upfronthosting.co.za> Message-ID: <1600989617.9.0.365673262972.issue24757@roundup.psfhosted.org> Eryk Sun added the comment: > We already update the current shell, so if you start a new > terminal/Powershell/cmd/etc. instance it should have the > updated variable. The installer broadcasts an "Environment" message to top-level windows. In practice, only Explorer listens for and reloads its environment for this window message. For most programs, a new instance has to be run from Explorer in order to get the updated environment. CMD and PowerShell don't own any windows, so they cannot get this message in principle. The console-session host process (conhost or openconsole) may own a top-level window if it wasn't allocated with CREATE_NO_WINDOW and wasn't created as a ConPTY server (e.g. under Windows Terminal). But the console doesn't have a console control event for this case (e.g. something like a hypothetical CTRL_ENVIRONMENT_EVENT) that it sends to client processes. It's assumed that console applications that need to interact with the desktop environment will create at least a hidden window. Without the "Environment" message, it's still possible for the user to run a script that reloads the environment in place in CMD or PowerShell. The environment has to be loaded in four passes: system REG_SZ values, system REG_EXPAND_SZ values, user REG_SZ values, and user REG_EXPAND_SZ values. User values should always be able to depend on system values, and REG_EXPAND_SZ values should always be able to depend on REG_SZ values. This is the way WinAPI CreateEnvironmentBlock has always worked. When reloading PATH, this is an issue if a new machine PATH value depends on new/modified REG_SZ system variables or if a new user PATH value depends on new/modified system variables or new/modified REG_SZ user variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 19:40:02 2020 From: report at bugs.python.org (Reuben Thomas) Date: Thu, 24 Sep 2020 23:40:02 +0000 Subject: [issue41856] argparse: auto-generated synopsis omits REMAINDER argument Message-ID: <1600990802.2.0.259982030629.issue41856@roundup.psfhosted.org> New submission from Reuben Thomas : Consider the following example from the Python documentation: >>> parser = argparse.ArgumentParser(prog='PROG') >>> parser.add_argument('--foo') >>> parser.add_argument('command') >>> parser.add_argument('args', nargs=argparse.REMAINDER) Now show the help: >>> parser.parse_args(['-h']) This prints: usage: PROG [-h] [--foo FOO] command ... positional arguments: command args Note that "args" is not shown in the synopsis. I suggest that the synopsis should instead say: usage: PROG [-h] [--foo FOO] command args... ---------- components: Library (Lib) messages: 377469 nosy: rrt priority: normal severity: normal status: open title: argparse: auto-generated synopsis omits REMAINDER argument versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 19:42:31 2020 From: report at bugs.python.org (Reuben Thomas) Date: Thu, 24 Sep 2020 23:42:31 +0000 Subject: [issue41856] argparse: auto-generated synopsis omits REMAINDER argument In-Reply-To: <1600990802.2.0.259982030629.issue41856@roundup.psfhosted.org> Message-ID: <1600990951.1.0.564601469106.issue41856@roundup.psfhosted.org> Reuben Thomas added the comment: A workaround to help users for now is: >>> parser.add_argument('args', metavar='...', nargs=argparse.REMAINDER) as then at least the help entry corresponds to the synopsis: positional arguments: command ... And with a `help` string, this can be clarified further, e.g.: >>> parser.add_argument('args', metavar='...', nargs=argparse.REMAINDER, help='arguments to the command') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 21:20:19 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 01:20:19 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1600996819.72.0.798610721769.issue41774@roundup.psfhosted.org> Terry J. Reedy added the comment: You are right; the replacement index I called 'j' is better buried as a C index or pointer within a slice replacement. In fact, a generator expression, if one has a keep expression, or a filter call, if one has filter function, work, without the intermediate list. Both also incorporate the keep scan index/pointer in C. I verified that this works by defining 3 functions. def fc(n, keep): mylist = list(range(n)) mylist[:] = [x for x in mylist if keep(x)] return mylist def fg(n, keep): mylist = list(range(n)) mylist[:] = (x for x in mylist if keep(x)) return mylist def fl(n, keep): mylist = list(range(n)) mylist[:] = filter(keep, mylist) return mylist I added a second test expression. print(fc(i, keep) == fg(i, keep) == fl(i, keep) == expect) at the 3 obvious places in the test loop above. --- In the existing question about removing duplicates, the existing all-hashable answer mylist = list(set(mylist)) could be replaced by mylist[:] = set(mylist) ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 21:56:49 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 01:56:49 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1600999009.77.0.60615630333.issue39107@roundup.psfhosted.org> Terry J. Reedy added the comment: The existing patch mostly changes '9' to '10', which cannot in itself cause the test failure. There must be a change in widget behavior. Either Serhiy or Mark Rosemen might do better at diagnosing the discrepancy and whether _tkinter.c, tkinter.__init__, or tkinter/.../test_widget.py should be changed. -- PR branches on the main repository are discouraged. It is just as easy and safer for another coredev to modify a fork branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 22:00:00 2020 From: report at bugs.python.org (Zane Bitter) Date: Fri, 25 Sep 2020 02:00:00 +0000 Subject: [issue41857] Document timeout arguments to poll() in select module Message-ID: <1600999200.88.0.890857154586.issue41857@roundup.psfhosted.org> New submission from Zane Bitter : The select.poll.poll() and select.devpoll.poll() methods don't have their timeout arguments documented in their docstrings. In both cases the argument is in milliseconds, whereas the timeout arguments to select.kqueue.control() and select.epoll.poll() are in seconds, and are documented in the docstring. ---------- assignee: docs at python components: Documentation messages: 377473 nosy: docs at python, zaneb priority: normal severity: normal status: open title: Document timeout arguments to poll() in select module type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 22:09:38 2020 From: report at bugs.python.org (Zane Bitter) Date: Fri, 25 Sep 2020 02:09:38 +0000 Subject: [issue41857] Document timeout arguments to poll() in select module In-Reply-To: <1600999200.88.0.890857154586.issue41857@roundup.psfhosted.org> Message-ID: <1600999778.04.0.0157960302357.issue41857@roundup.psfhosted.org> Change by Zane Bitter : ---------- keywords: +patch pull_requests: +21446 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 22:16:48 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 25 Sep 2020 02:16:48 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation Message-ID: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> New submission from Emmanuel Arias : This line seems to be incomplete. This fix come from the translation to spanish of @fjsevilla-dev on https://github.com/python/python-docs-es/pull/758/file. reading the proposal for the translate has sense add `the next lines`. ---------- assignee: docs at python components: Documentation messages: 377474 nosy: docs at python, eamanu priority: normal severity: normal status: open title: Fix incomplete line on optparse documentation versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 22:17:47 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 25 Sep 2020 02:17:47 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601000267.87.0.911881747764.issue41858@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +21447 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22407 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 22:48:48 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 25 Sep 2020 02:48:48 +0000 Subject: [issue41850] inspect.py: access block stack In-Reply-To: <1600935790.44.0.688452336961.issue41850@roundup.psfhosted.org> Message-ID: <1601002128.64.0.217987969372.issue41850@roundup.psfhosted.org> Dennis Sweeney added the comment: I believe the block stack is only for catching exceptions. Loops do not interact with the block stack. Only SETUP_FINALLY adds to the block stack: https://docs.python.org/3/library/dis.html#opcode-SETUP_FINALLY Meanwhile, loops and conditionals and the like are compiled into goto-like jumps. There may be some existing solution, but I'm not sure what. Maybe look at the traceback or ast modules. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 23:36:31 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 03:36:31 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1601004991.5.0.692822938928.issue39107@roundup.psfhosted.org> Terry J. Reedy added the comment: On Windows, tk Scale['from'] is no longer rounded, matching ttk.Scale. More details and conditional fix on the PR. ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 24 23:48:46 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Sep 2020 03:48:46 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601005726.48.0.928285560739.issue41774@roundup.psfhosted.org> Raymond Hettinger added the comment: Try running some timings. I suspect the genexp/iterator versions run more slowly. The speed of the slice replacement relies on knowing the size of the input. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 00:05:35 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 04:05:35 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601006735.88.0.449325153566.issue41774@roundup.psfhosted.org> Terry J. Reedy added the comment: Timings depend on multiple factors, including implementation (cpython versus pypy versus cython, etc) and complexity of the keep/discard decision. I said in the proposed text that a listcomp may be faster. I think that sufficient; anyone who cares can test their specific case. I like the simple ad easy 'slice replacement = iterator' form because it illustrates to me that we have done something right with Python's design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 00:12:05 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Sep 2020 04:12:05 +0000 Subject: [issue41859] Uncaught ValueError Message-ID: <1601007125.39.0.397372093674.issue41859@roundup.psfhosted.org> New submission from Raymond Hettinger : I found this in today's long running shell session. The trigger event isn't known. Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1885, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/multicall.py", line 176, in handler r = l[i](event) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/autocomplete_w.py", line 430, in keyrelease_event self.hide_window() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/autocomplete_w.py", line 447, in hide_window self.widget.event_delete(HIDE_VIRTUAL_EVENT_NAME, seq) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/multicall.py", line 392, in event_delete triplets.remove(triplet) ValueError: list.remove(x): x not in list ---------- assignee: terry.reedy components: IDLE messages: 377479 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: Uncaught ValueError versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 01:14:18 2020 From: report at bugs.python.org (Heng Sun) Date: Fri, 25 Sep 2020 05:14:18 +0000 Subject: [issue41860] random.choices() raises "int too large" error while random.randint does not Message-ID: <1601010858.58.0.226250103404.issue41860@roundup.psfhosted.org> New submission from Heng Sun : If I run this one line of code: random.choices(range(2**100), k=5) I would get error: OverflowError: Python int too large to convert to C ssize_t But I can run equivalent line to achieve this without error: [random.randint(0, 2**100-1) for j in range(5)] With the understanding of the issue coming from len(), ref https://bugs.python.org/issue12159, I still think random.choices() should be able to handle large integers. ---------- components: Library (Lib) messages: 377480 nosy: mathtester priority: normal severity: normal status: open title: random.choices() raises "int too large" error while random.randint does not type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 01:25:40 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 05:25:40 +0000 Subject: [issue41859] Uncaught ValueError In-Reply-To: <1601007125.39.0.397372093674.issue41859@roundup.psfhosted.org> Message-ID: <1601011540.36.0.942593611255.issue41859@roundup.psfhosted.org> Terry J. Reedy added the comment: I presume that at some point you got a completion box. It disappeared with this traceback and when >>> appeared, you continued. What python binary? 3.8.5? 3.8.6? My diagnosis so far. __call__ is a method in CallWrapper. The wrapped func is multicall.handler. The exception was caught in the except: self.widget._report_exception() clause of __call__, but it should never have been raised. keyrelease_event catches internal errors. If the insert cursor is not where IDLE expects, because "# we didn't catch an event which moved the insert", IDLE just closes box rather than trying to recover. I presume that this should never happen. But when it did, a ValueError was raised for the reason given. In this error state, multicall.event_delete makes an invalid assumption. The simple and immediate fix would be to catch the very rare delete failure. A better and harder fix would be to catch the uncaught insert-moving event. For this, it would have been nice if keyrelease displayed a message identifying the released key with an email request. I should try to reproduce the failure (including on Mac) by trying every key (or type of key) that might possibly move the cursor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 02:57:57 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Sep 2020 06:57:57 +0000 Subject: [issue41860] random.choices() raises "int too large" error while random.randint does not In-Reply-To: <1601010858.58.0.226250103404.issue41860@roundup.psfhosted.org> Message-ID: <1601017077.41.0.490062733878.issue41860@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is virtually a duplicate of issue40388. ---------- nosy: +mark.dickinson, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 03:40:05 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 25 Sep 2020 07:40:05 +0000 Subject: [issue40813] Line number of SyntaxError In-Reply-To: <1590746912.78.0.622485430276.issue40813@roundup.psfhosted.org> Message-ID: <1601019605.91.0.959212599464.issue40813@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Output SyntaxError is not defective -> Line number of SyntaxError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 04:24:21 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Sep 2020 08:24:21 +0000 Subject: [issue41860] random.choices() raises "int too large" error while random.randint does not In-Reply-To: <1601010858.58.0.226250103404.issue41860@roundup.psfhosted.org> Message-ID: <1601022261.97.0.80618957414.issue41860@roundup.psfhosted.org> Raymond Hettinger added the comment: This is a known limitation and there isn't much we can do about it. The root cause is that for performance reasons the len() function doesn't handle sizes larger than a C ssize_t: >>> len(range(2**100)) Traceback (most recent call last): ... OverflowError: Python int too large to convert to C ssize_t For the same reason, you would also see the same error for random.choice(): >>> random.choice(range(2**100)) Traceback (most recent call last): ... OverflowError: Python int too large to convert to C ssize_t Given that we can't get the size of the population, there isn't much that choice() or choices() can do about the situation without special casing range objects and reconstructing what len() would have returned had it not been restricted. Given that this hasn't seemed to have ever been a problem in practice, I recommend just using randrange() in a loop. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 04:31:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Sep 2020 08:31:09 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601022669.0.0.613042559421.issue41774@roundup.psfhosted.org> Raymond Hettinger added the comment: > I like the simple ad easy 'slice replacement = iterator' form > because it illustrates to me that we have done something > right with Python's design. I understand that you like it and that it reflects the way you think the world should work, , but that doesn't warrant putting it in the FAQ. We should steer users down a path of feeding unsizable inputs into tooling that needs a size to work well (the receiving code either has to implicitly build a list first before it can start or it will have to have periodic resizes). A straight list comprehension will suffice to answer the question cleanly. FWIW, the same issue occurs with str.join(). It works better with a list comprehension than an iterator. Given an iterator, it has to build an internal list first before it can start. That is slower than starting with a list in the first place and makes the memory consumption implicit when it should be explicit (a generator would create the illusion that a list isn't being formed which is misleading). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 06:44:14 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 25 Sep 2020 10:44:14 +0000 Subject: [issue33867] Module dicts are wiped on module garbage collection In-Reply-To: <1529033651.78.0.947875510639.issue33867@psf.upfronthosting.co.za> Message-ID: <1601030654.09.0.895089446932.issue33867@roundup.psfhosted.org> Irit Katriel added the comment: I also can't reproduce it on a later version. If this is a 2.7/3.6 only problem, should the issue be closed? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 07:08:19 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 11:08:19 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601032099.74.0.271095311494.issue41774@roundup.psfhosted.org> Terry J. Reedy added the comment: Raymond, please take what I have written and rewrite it to your satisfaction. I have lots else to do, including investigating the IDLE bug you just reported. ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 07:47:05 2020 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 25 Sep 2020 11:47:05 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> Message-ID: <1601034425.48.0.970001295959.issue41826@roundup.psfhosted.org> Skip Montanaro added the comment: Possible patch. All this does is add some C casts. @pablogsal suggested there was more to be done, but my glance at the reference he gave suggested that's already been done. My apologies if I misinterpreted his reference. ---------- keywords: +patch Added file: https://bugs.python.org/file49474/test_peg_gen.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 08:18:11 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 25 Sep 2020 12:18:11 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 Message-ID: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : https://www.python.org/dev/peps/pep-0384/ ---------- components: Library (Lib) messages: 377488 nosy: erlendaasland priority: normal severity: normal status: open title: Convert sqlite3 to PEP 384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 08:19:09 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 25 Sep 2020 12:19:09 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601036349.3.0.558052531661.issue41861@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +berker.peksag, ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 08:25:24 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 25 Sep 2020 12:25:24 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601036724.3.0.957514666593.issue41861@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +21448 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22409 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 08:48:03 2020 From: report at bugs.python.org (Christopher Reilly) Date: Fri, 25 Sep 2020 12:48:03 +0000 Subject: [issue41862] can not open file in system folder Message-ID: <1601038083.98.0.914885440709.issue41862@roundup.psfhosted.org> New submission from Christopher Reilly : I am trying to load a Windows dll "ibfs64.dll" located in the C:\Windows\System32 folder: ctypes.windll.LoadLibrary('ibfs64.dll') When I attempt this call with Python 3.8.5 downloaded from python.org, the call fails with > FileNotFoundError: Could not find module 'ibfs64.dll' (or one of its dependencies). Try using the full path with constructor syntax. The function call, however, succeeds in Python 3.7.9 (downloaded from python.org). This behavior (3.7.9 works, 3.8.5 does not), has been duplicated by another user on two different Windows 10 machines (my machine is also Windows 10). Another piece of information is that this function call also succeeds in anaconda environments running Python 3.7.9 and Python 3.8.5. When I use the dll-diagnostics tracing utility (https://pypi.org/project/dll-diagnostics/) with the anaconda-managed Python 3.8.5 installation, it succeeds: > DLL Diagnostic Tools version 0.0.3 > Copyright (c) 2019 Adam Rehn > > Parsing module header and detecting architecture... done. > > Identifying the module's delay-loaded dependencies... done. > > Parsed module details: Module: C:\Windows\System32\ibfs64.dll > Type: Dynamic-Link Library Architecture: x64 > > The module imports 0 delay-loaded dependencies: > > > Performing LoadLibrary() trace for C:\Windows\System32\ibfs64.dll... > Done. > > Summary of LdrLoadDll calls: C:\Windows\System32\ibfs64.dll Loaded > successfully > > Summary of LdrpLoadDllInternal calls: C:\Windows\System32\ibfs64.dll > Loaded successfully NTDLL.DLL Loaded > successfully > > Summary of LdrpMinimalMapModule calls: > C:\Windows\System32\ADVAPI32.dll > Mapped successfully C:\Windows\System32\ibfs64.dll > Mapped successfully C:\Windows\System32\msvcrt.dll > Mapped successfully C:\Windows\System32\RPCRT4.dll > Mapped successfully C:\Windows\System32\sechost.dll > Mapped successfully > C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9672_none_88e266cb2fac7c0d\MSVCR80.dll > Mapped successfully > > Summary of LdrpResolveDllName calls: ibfs64.dll > C:\Windows\System32\ibfs64.dll MSVCR80.dll > C:\Windows\WinSxS\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.9672_none_88e266cb2fac7c0d\MSVCR80.dll But when I try it with the Python 3.8.5 installed from python.org, it fails: > DLL Diagnostic Tools version 0.0.3 > Copyright (c) 2019 Adam Rehn > > Parsing module header and detecting architecture... Traceback (most recent call last): > > File "c:\users\chris\appdata\local\programs\python\python38-32\lib\runpy.py", line 194, in _run_module_as_main > > return _run_code(code, main_globals, None, > > File "c:\users\chris\appdata\local\programs\python\python38-32\lib\runpy.py", line 87, in _run_code > > exec(code, run_globals) > > File "C:\Users\Chris\AppData\Local\Programs\Python\Python38-32\Scripts\dlldiag.exe\__main__.py", line 7, in > > File "c:\users\chris\appdata\local\programs\python\python38-32\lib\site-packages\dlldiag\main.py", line 29, in main > > subcommands[subcommand]['function']() > > File "c:\users\chris\appdata\local\programs\python\python38-32\lib\site-packages\dlldiag\subcommands\trace.py", line 188, in trace > > header = ModuleHeader(args.module) > > File "c:\users\chris\appdata\local\programs\python\python38-32\lib\site-packages\dlldiag\common\ModuleHeader.py", line 14, in __init__ > > self._pe = pefile.PE(module, fast_load=True) > > File "c:\users\chris\appdata\local\programs\python\python38-32\lib\site-packages\pefile.py", line 1754, in __init__ > > self.__parse__(name, data, fast_load) > > File "c:\users\chris\appdata\local\programs\python\python38-32\lib\site-packages\pefile.py", line 1797, in __parse__ > > stat = os.stat(fname) > > FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Windows\\system32\\ibfs64.dll' In fact, I can not even open the file in the python.org installation of Python 3.8.5, while I can in the python.org installation of Python 3.7.9. In other words, the command open(r'C:\Windows\System32\ibfs64.dll','r') succeeds with the python.org installation of Python 3.7.9, but fails (same FileNotFoundError) with version Python 3.8.5. What is the anaconda-managed installation doing differently? Why is the Python 3.7.9 installation from python.org successful while the 3.8.5 installation is not? ---------- components: IO, Installation, Windows, ctypes messages: 377489 nosy: paul.moore, reilly.christopher, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: can not open file in system folder type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 09:04:29 2020 From: report at bugs.python.org (Mark Shannon) Date: Fri, 25 Sep 2020 13:04:29 +0000 Subject: [issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10 In-Reply-To: <1583933092.46.0.675431384436.issue39934@roundup.psfhosted.org> Message-ID: <1601039069.35.0.322498741033.issue39934@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 02d126aa09d96d03dcf9c5b51c858ce5ef386601 by Mark Shannon in branch 'master': bpo-39934: Account for control blocks in 'except' in compiler. (GH-22395) https://github.com/python/cpython/commit/02d126aa09d96d03dcf9c5b51c858ce5ef386601 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 09:08:51 2020 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 25 Sep 2020 13:08:51 +0000 Subject: [issue41797] PyModule_GetState doesn't work with LazyLoader In-Reply-To: <1600262618.31.0.325694341017.issue41797@roundup.psfhosted.org> Message-ID: <1601039331.78.0.0514592025843.issue41797@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 09:32:44 2020 From: report at bugs.python.org (Eryk Sun) Date: Fri, 25 Sep 2020 13:32:44 +0000 Subject: [issue41862] can not open file in system folder In-Reply-To: <1601038083.98.0.914885440709.issue41862@roundup.psfhosted.org> Message-ID: <1601040764.17.0.524594735538.issue41862@roundup.psfhosted.org> Eryk Sun added the comment: > File "c:\users\chris\appdata\local\programs\python\python38-32 > \lib\runpy.py", line 194, in _run_module_as_main You have to use 64-bit Python in order to load a 64-bit DLL from the native "%SystemRoot%\System32" directory. The fact that the installation directory is "python38-32" implies that you're running 32-bit Python. In 64-bit Windows, a 32-bit program executes as a WOW64 process, for which "%SystemRoot%\System32" gets redirected to "%SystemRoot%\SysWOW64". ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 10:00:30 2020 From: report at bugs.python.org (Fabio Manganiello) Date: Fri, 25 Sep 2020 14:00:30 +0000 Subject: [issue40871] threading.Event.wait_unset() In-Reply-To: <1591364571.85.0.30119550937.issue40871@roundup.psfhosted.org> Message-ID: <1601042430.12.0.466836297703.issue40871@roundup.psfhosted.org> Fabio Manganiello added the comment: +1 I have similar applications (both using multithreading and multiprocessing) which rely upon waiting for events to be both set and unset. Some example common pattern: ``` from multithreading import Thread, Event, Queue import time q = Queue() reading = Event() def read_from_device(device): # Wait for the caller to signal that it's ready to receive reading.wait() data = get_data(device) while data: data = get_data(device) q.put(data) # Once we're done receiving data, wait for the caller to # signal that it has received everything while reading.is_set(): time.sleep(1) # Do some other operations once all threads are in sync release_device(device) processor = threading.Thread(target=read_from_device, args=(device,)) processor.start() # Do something else reading.set() # Get data from the processor data = q.get() while data: preprocess_data(data) data = q.get() # Do something before we're ready to clean up everything process_data() # Signal to the processor that we're done reading.clear() ``` Events (and I'd say that this also applies to Conditions) are supposed to be symmetric - one can either wait for an event to be set or cleared - but the implementation provided by the current API is definitely asymmetric - `wait()` can be used to wait for an event to be set, but if you want to wait for it to be cleared then the only provided approach is through a poll on `is_set()`. ---------- nosy: +BlackLight _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 10:10:13 2020 From: report at bugs.python.org (Jakub Kulik) Date: Fri, 25 Sep 2020 14:10:13 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition In-Reply-To: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> Message-ID: <1601043013.66.0.337180727303.issue27777@roundup.psfhosted.org> Jakub Kulik added the comment: We internally tested the most recent PR and found some issues with it: https://github.com/python/cpython/pull/21457#issuecomment-698845895 We ended up using a much simpler patch, which seems to work as expected. --- Python-3.7.8/Lib/cgi.py +++ Python-3.7.8/Lib/cgi.py @@ -703,7 +703,10 @@ if not data: self.done = -1 break - self.file.write(data) + if self._binary_file: + self.file.write(data) + else: + self.file.write(data.decode()) todo = todo - len(data) def read_lines(self): ---------- nosy: +kulikjak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 13:01:00 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Sep 2020 17:01:00 +0000 Subject: [issue41859] Uncaught ValueError In-Reply-To: <1601007125.39.0.397372093674.issue41859@roundup.psfhosted.org> Message-ID: <1601053260.96.0.537362564501.issue41859@roundup.psfhosted.org> Raymond Hettinger added the comment: > What python binary? This is from the 64-bit macOS build on python.org: $ python3.9 Python 3.9.0rc2 (v3.9.0rc2:2bd31b5fde, Sep 16 2020, 20:19:18) [Clang 6.0 (clang-600.0.57)] on darwin Thanks for looking into this :-) Let me know if filing these issues is helpful to you. I log a couple thousand hours of heavy IDLE usage each year and my students really put the tool through its paces. We tend to uncover buglets that wouldn't surface in light testing. At the end of the day, if there are tracebacks I haven't seen before, I'm posting them here. Hopefully, they are useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 13:57:20 2020 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 25 Sep 2020 17:57:20 +0000 Subject: [issue35765] Document references object x but doesn't show it in the example In-Reply-To: <1547771500.83.0.912392206765.issue35765@roundup.psfhosted.org> Message-ID: <1601056640.39.0.275228349681.issue35765@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +21449 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:14:48 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Sep 2020 18:14:48 +0000 Subject: [issue33867] Module dicts are wiped on module garbage collection In-Reply-To: <1529033651.78.0.947875510639.issue33867@psf.upfronthosting.co.za> Message-ID: <1601057688.64.0.774566697518.issue33867@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:16:58 2020 From: report at bugs.python.org (Ethan Furman) Date: Fri, 25 Sep 2020 18:16:58 +0000 Subject: [issue40066] Enum._convert should change __repr__ and/or __str__ to use module name instead of class name In-Reply-To: <1585165738.23.0.618463548627.issue40066@roundup.psfhosted.org> Message-ID: <1601057818.33.0.512199750356.issue40066@roundup.psfhosted.org> Ethan Furman added the comment: At this point, the PR has made the following changes: - normal Enums - repr() -> "classname.membername" - str() -> "membername" - stdlib Enums available as module attributes (RegexFlag, AddressFamily, etc.) - repr() -> "modulename.membername" - str() -> "membername" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:35:09 2020 From: report at bugs.python.org (Gagandeep Longia) Date: Fri, 25 Sep 2020 18:35:09 +0000 Subject: [issue41863] IDLE shell not opening Message-ID: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> New submission from Gagandeep Longia : I downloaded Python 3.5 and tried opening the IDLE shell. Each time I do it, it says "The application "IDLE" can't be opened." Any help? My Mac OS X is 10.14.6 Mojave ---------- components: macOS messages: 377496 nosy: glongia18, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: IDLE shell not opening versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:37:27 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Sep 2020 18:37:27 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601059047.19.0.73635041701.issue41774@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry for the wording of the last message. Go ahead with whatever you would like do :-) Was only trying to point-out that the generator semantics don't interact nicely with slice assignments: $ python3.9 -m timeit -s 'a=list(range(1000))' 'b=a[:]' 'b[:]=(x for x in a)' 5000 loops, best of 5: 46.6 usec per loop $ python3.9 -m timeit -s 'a=list(range(1000))' 'b=a[:]' 'b[:]=[x for x in a]' 10000 loops, best of 5: 26.3 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:45:53 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Sep 2020 18:45:53 +0000 Subject: [issue41863] IDLE shell not opening In-Reply-To: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> Message-ID: <1601059553.44.0.594585926057.issue41863@roundup.psfhosted.org> Ned Deily added the comment: Python 3.5 is very old; the last macOS installers from python.org for it were released over 3 years ago and the 3.5 release series has reached end-of-life. Is there a reason you can't use a current version of Python? 3.8.6 is now current. Since Python 3.5.4, the last 3.5 installers, there have been a number of important security fixes and support for current versions of macOS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:46:40 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Sep 2020 18:46:40 +0000 Subject: [issue41863] IDLE shell not opening In-Reply-To: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> Message-ID: <1601059600.49.0.0207983002479.issue41863@roundup.psfhosted.org> Change by Ned Deily : ---------- assignee: -> terry.reedy components: +IDLE nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:54:44 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 25 Sep 2020 18:54:44 +0000 Subject: [issue11305] TextIOWrapper.readline and str.splitlines have different behavior In-Reply-To: <1298513992.9.0.559771255242.issue11305@psf.upfronthosting.co.za> Message-ID: <1601060084.68.0.142653213046.issue11305@roundup.psfhosted.org> Irit Katriel added the comment: I think this documentation enhancement was done under issue36642 (PR 12855). ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 14:55:54 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 25 Sep 2020 18:55:54 +0000 Subject: [issue11305] TextIOWrapper.readline and str.splitlines have different behavior In-Reply-To: <1298513992.9.0.559771255242.issue11305@psf.upfronthosting.co.za> Message-ID: <1601060154.15.0.809545855622.issue11305@roundup.psfhosted.org> Irit Katriel added the comment: Sorry, I copied the wrong numbers. The doc change is here: https://github.com/python/cpython/commit/8218bd4caf683ee98c450a093bf171dbca6c4849 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 15:00:02 2020 From: report at bugs.python.org (Steve Dower) Date: Fri, 25 Sep 2020 19:00:02 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1601060402.46.0.16692876537.issue39107@roundup.psfhosted.org> Steve Dower added the comment: > PR branches on the main repository are discouraged. I had another reason, which was that I needed to trigger a signed build of the separate Tcl and Tk binaries. This is much easier (and safer) to do from the main repo than my own fork. But yeah, in general (for anyone else reading this), PRs from forks are fine. Tcl/Tk are special. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 15:05:44 2020 From: report at bugs.python.org (GJL) Date: Fri, 25 Sep 2020 19:05:44 +0000 Subject: [issue41863] IDLE shell not opening In-Reply-To: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> Message-ID: <1601060744.11.0.0173995921284.issue41863@roundup.psfhosted.org> GJL added the comment: Hey Ned, I'm using 3.5 in accordance with what "Introduction to Computation and Programming Using Python|With Application to Understanding Data" Should I just uninstall 3.5 and opt to use 3.8.6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 15:14:22 2020 From: report at bugs.python.org (Tal Einat) Date: Fri, 25 Sep 2020 19:14:22 +0000 Subject: [issue29940] Add follow_wrapped=True option to help() In-Reply-To: <1490802065.05.0.49346265762.issue29940@psf.upfronthosting.co.za> Message-ID: <1601061262.61.0.393726226471.issue29940@roundup.psfhosted.org> Tal Einat added the comment: To clarify, to my understanding the issue here is that when using a class as a decorator, and copying the wrapped function's __doc__ to self.__doc__ in __init__, help() will pick up the wrapper class's __doc__ rather than the instance's __doc__. For example: class Deco: "A decorator." def __init__(self, func): functools.update_wrapper(self, func) def __call__(self, *args, **kwargs): pass @Deco def double(n): "A function." return n * 2 help(double) will show "A decorator." rather than "A function." despite the use of functools.update_wrapper(). ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 15:23:11 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Sep 2020 19:23:11 +0000 Subject: [issue41863] IDLE shell not opening In-Reply-To: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> Message-ID: <1601061791.12.0.867233793265.issue41863@roundup.psfhosted.org> Ned Deily added the comment: Ah! I've never looked at the book or the MIT course materials. I see that an update to the book is planned for next year and that 3.5 would have been current when the current edition of the book was published. Generally, changes between recent Python feature releases are upward compatible. Off the top of my head, I can't think of any changes at the Python source level that would cause examples written for 3.5.x to fail on 3.8.x. Perhaps you could ask around online but, rather than trying to debug what's going wrong with your 3.5.x installation, I think you would be better off with 3.8.6. You can just install it on top of 3.5.x. Good luck! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 15:28:53 2020 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Sep 2020 19:28:53 +0000 Subject: [issue39107] Upgrade tcl/tk to 8.6.10 (Windows and maxOS) In-Reply-To: <1576838540.23.0.689551930127.issue39107@roundup.psfhosted.org> Message-ID: <1601062133.23.0.0600882634929.issue39107@roundup.psfhosted.org> Ned Deily added the comment: The ScaleTest failure is the subject of Issue41306 and PR 21715. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 15:37:25 2020 From: report at bugs.python.org (GJL) Date: Fri, 25 Sep 2020 19:37:25 +0000 Subject: [issue41863] IDLE shell not opening In-Reply-To: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> Message-ID: <1601062645.03.0.943973803232.issue41863@roundup.psfhosted.org> GJL added the comment: Thank you very much! I will uninstall soon and download 3.8.6 -- if anything comes up then I'll let you know fosho ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 16:19:29 2020 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 25 Sep 2020 20:19:29 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> Message-ID: <1601065169.8.0.327319038793.issue41826@roundup.psfhosted.org> Change by Skip Montanaro : ---------- pull_requests: +21450 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 16:23:32 2020 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 25 Sep 2020 20:23:32 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> Message-ID: <1601065412.97.0.329502824707.issue41826@roundup.psfhosted.org> Skip Montanaro added the comment: I created a PR from my patch, but it includes all the merges to my smontanaro/cpython master branch from python/cpython. I thought I was following the instructions properly (https://devguide.python.org/gitbootcamp/#creating-a-pull-request), but I guess I'm missing something. See: https://github.com/python/cpython/pull/22412 Can someone help me make a PR which only differs from the current python/cpython master? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 16:33:41 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 20:33:41 +0000 Subject: [issue41863] IDLE shell not opening with 3.5 on Mac Mohave. In-Reply-To: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> Message-ID: <1601066021.33.0.406945515003.issue41863@roundup.psfhosted.org> Terry J. Reedy added the comment: To try to run IDLE with 8.5, one should install tcl/tk 8.5.18 as described at https://www.python.org/download/mac/tcltk/. This requires making a free Active State account and is not at all guaranteed to be sufficient. Today I installed 3.8.6 and 3.9.0rc2 (3.9.0 is due in 2 weeks) on an Airbook with up to date Mohave and ran IDLE. In both cases, there are a few Mac-specific bugs, but IDLE mostly works. ---------- resolution: -> out of date stage: -> resolved status: open -> closed title: IDLE shell not opening -> IDLE shell not opening with 3.5 on Mac Mohave. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 17:15:23 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 21:15:23 +0000 Subject: [issue41306] test_tk test_widgets.ScaleTest fails with Tk 8.6.10 In-Reply-To: <1594840353.83.0.567403527611.issue41306@roundup.psfhosted.org> Message-ID: <1601068523.49.0.198568914739.issue41306@roundup.psfhosted.org> Terry J. Reedy added the comment: Fixing this test bug is required to upgrade tk on Windows. #39107 and PR 22405. E. Paine reported on the PR 21715 that this change is intentional and here to stay. I wondered the same; thank you for asking. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 18:47:08 2020 From: report at bugs.python.org (Irit Katriel) Date: Fri, 25 Sep 2020 22:47:08 +0000 Subject: [issue30953] Fatal python error when jumping into except clause In-Reply-To: <1500326698.05.0.0587216442362.issue30953@psf.upfronthosting.co.za> Message-ID: <1601074028.01.0.172247374538.issue30953@roundup.psfhosted.org> Irit Katriel added the comment: This seems resolved. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 19:05:21 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 23:05:21 +0000 Subject: [issue41812] Broken link on documentation header In-Reply-To: <1600511961.8.0.4482824701.issue41812@roundup.psfhosted.org> Message-ID: <1601075121.56.0.378721698981.issue41812@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +mdk versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 19:06:30 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 23:06:30 +0000 Subject: [issue41813] Clarify specification of object.__await__ In-Reply-To: <1600523854.86.0.266063347768.issue41813@roundup.psfhosted.org> Message-ID: <1601075190.56.0.195046530782.issue41813@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 19:13:38 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 23:13:38 +0000 Subject: [issue41822] Document the meaning of values for sys.float_info.rounds In-Reply-To: <1600648706.73.0.507862170012.issue41822@roundup.psfhosted.org> Message-ID: <1601075618.81.0.258402772452.issue41822@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Document the mean of values for sys.float_info.rounds -> Document the meaning of values for sys.float_info.rounds versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 19:20:56 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 23:20:56 +0000 Subject: [issue41848] PEG parser doesn't allow lambda in for_if_clause In-Reply-To: <1600903982.27.0.474581886877.issue41848@roundup.psfhosted.org> Message-ID: <1601076056.62.0.691638338325.issue41848@roundup.psfhosted.org> Terry J. Reedy added the comment: After adding parens, >>> [x for x in [] if (lambda: x)] [] ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 19:43:20 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Sep 2020 23:43:20 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601077400.11.0.360153875621.issue41858@roundup.psfhosted.org> Terry J. Reedy added the comment: I can see how the current phrasing gives one pause, and might seem incomplete, but it is not incorrect. The sense of Additionally, users can run one of :: -h --help and optparse will ... is "Additionally, users can run one of `` -h`` or `` --help`` and optparse will ...". I personally prefer this running text form with in-line code markup to the block form. What do you think? If we keep the block form, I slightly prefer 'one of the following' to 'one of the next lines' but cannot say why. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 20:24:49 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 26 Sep 2020 00:24:49 +0000 Subject: [issue29940] Add follow_wrapped=True option to help() In-Reply-To: <1490802065.05.0.49346265762.issue29940@psf.upfronthosting.co.za> Message-ID: <1601079889.1.0.846197050974.issue29940@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi @taleinat, Seems tha the wrapped func already has the __doc__ (in this case) copied. following your example: >>> double >>> double.__doc__ 'A function' so help(double) will print correctly the double doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 20:27:58 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 26 Sep 2020 00:27:58 +0000 Subject: [issue41848] PEG parser doesn't allow lambda in for_if_clause In-Reply-To: <1600903982.27.0.474581886877.issue41848@roundup.psfhosted.org> Message-ID: <1601080078.99.0.736999431207.issue41848@roundup.psfhosted.org> Guido van Rossum added the comment: I propose not to fix this, since it is pointless (a lambda is always truthy). We can call it out in What's New in 3.9 -- as a very small footnote. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 20:58:14 2020 From: report at bugs.python.org (=?utf-8?q?Vin=C3=ADcius_Viana_W=2E?=) Date: Sat, 26 Sep 2020 00:58:14 +0000 Subject: [issue39326] Python-3.8.1 "test_importlib" failed In-Reply-To: <1578977546.19.0.0039726161306.issue39326@roundup.psfhosted.org> Message-ID: <1601081894.48.0.413601918836.issue39326@roundup.psfhosted.org> Vin?cius Viana W. added the comment: I had this issue too, but in Python-3.8.6. I did what @Darryl Hall Jr suggested. But in my case, I just needed to ran 'sudo apt-get install zlib1g-dev', and then, I ran 'sudo make testall', and I got: 'Tests result: SUCCESS'! Thank you ---------- nosy: +viana200610 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 25 23:56:13 2020 From: report at bugs.python.org (Bug Reporter) Date: Sat, 26 Sep 2020 03:56:13 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1601092573.39.0.585349918862.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: I downloaded Ubuntu's openssl_1.1.1f.orig.tar.gz and openssl_1.1.1f-1ubuntu2.debian.tar.xz from https://launchpad.net/ubuntu/+source/openssl/1.1.1f-1ubuntu2, but I did not know how to apply patches. In addition, too many files differ, so I could not understand what makes test_ssl fail. So I took a different approach. In Ubuntu-20.04, "apt policy openssl" returned the version of the installed library: 1.1.1f-1ubuntu2. I ran "apt source openssl" to downloade the source code from Ubuntu. I compiled, tested and installed it. If LD_LIBRARY_PATH is not set, ldd returns this: libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 make test TESTOPTS="-v test_ssl": FAILED (errors=6, skipped=11) If LD_LIBRARY_PATH is set to compiled openssl-1.1.1f-1ubuntu2: libssl.so.1.1 => /home/bugsrep/openssl-ubuntu2/lib/libssl.so.1.1 libcrypto.so.1.1 => /home/bugsrep/openssl-ubuntu2/lib/libcrypto.so.1.1 make test TESTOPTS="-v test_ssl": OK (skipped=11) == Tests result: SUCCESS == 1 test OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 00:18:22 2020 From: report at bugs.python.org (Bug Reporter) Date: Sat, 26 Sep 2020 04:18:22 +0000 Subject: [issue41561] test_ssl fails in Ubuntu 20.04: test_min_max_version_mismatch In-Reply-To: <1597551049.14.0.0578030464715.issue41561@roundup.psfhosted.org> Message-ID: <1601093902.81.0.210653787744.issue41561@roundup.psfhosted.org> Bug Reporter added the comment: Please note that test_ssl also passes if /etc/ssl/openssl.conf is modified per msg376705 by Vladyslav Bondar (with /usr/lib/x86_64-linux-gnu/libssl.so.1.1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 01:44:40 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 26 Sep 2020 05:44:40 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1601099080.97.0.805773418047.issue1635741@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +21451 pull_request: https://github.com/python/cpython/pull/22415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 02:54:20 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 26 Sep 2020 06:54:20 +0000 Subject: [issue29940] Add follow_wrapped=True option to help() In-Reply-To: <1490802065.05.0.49346265762.issue29940@psf.upfronthosting.co.za> Message-ID: <1601103260.27.0.880855752976.issue29940@roundup.psfhosted.org> Tal Einat added the comment: The issue was not that __doc__ was not copied, but that help() would use the class's __doc__ when called on an instance, even if that instance had its own __doc__. See the StackOverflow question for another example. You will not see this issue with the latest master branch, because it has already been resolved by PR GH-19479, as described and discussed in issue40257. Closing as "out of date". ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 02:54:53 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Sep 2020 06:54:53 +0000 Subject: [issue41859] Uncaught ValueError In-Reply-To: <1601007125.39.0.397372093674.issue41859@roundup.psfhosted.org> Message-ID: <1601103293.87.0.0540702493014.issue41859@roundup.psfhosted.org> Terry J. Reedy added the comment: On Windows, the only key I found that closed the completion box via keyrelease_event is Left Arrow. If I explicitly caught that, the method might not be needed on Windows. Next I will look at the triplets list and how something might be missing or deleted twice. On my Mac Airbook with current 3.8.6 and 3.9.0rc2, I cannot get a completion box, even with the menu. Do you have the same issue? Reports with a traceback, like this one, are helpful and welcome. If possible, include and information about either the code or action that triggered the exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 02:56:11 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Sat, 26 Sep 2020 06:56:11 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1601103371.22.0.792801982651.issue40257@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu nosy_count: 11.0 -> 12.0 pull_requests: +21452 pull_request: https://github.com/python/cpython/pull/22390 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 03:54:43 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 26 Sep 2020 07:54:43 +0000 Subject: [issue41799] splunklib.client does not handle Unicode characters In-Reply-To: <1600279797.15.0.70851751953.issue41799@roundup.psfhosted.org> Message-ID: <1601106883.2.0.410388915931.issue41799@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> third party stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:04:51 2020 From: report at bugs.python.org (micwin) Date: Sat, 26 Sep 2020 10:04:51 +0000 Subject: [issue41864] Compiler error in _zoneinfo.c:1227: error: #pragma GCC diagnostic not allowed inside functions Message-ID: <1601114691.42.0.0298399391813.issue41864@roundup.psfhosted.org> New submission from micwin : Python 3.9.0rc2 OS: centos 6.10 Compiler: gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23) configure && make Python-3.9.0rc2/Modules/_zoneinfo.c:1227: error: #pragma GCC diagnostic not allowed inside functions Python-3.9.0rc2/Modules/_zoneinfo.c:1228: error: #pragma GCC diagnostic not allowed inside functions Python-3.9.0rc2/Modules/_zoneinfo.c:1229: warning: comparison is always false due to limited range of data type Python-3.9.0rc2/Modules/_zoneinfo.c:1230: error: #pragma GCC diagnostic not allowed inside functions Proposed fix, here the diff: 1227d1226 < #if defined(__GNUC__) && __GNUC__ >= 5 1230d1228 < #endif 1232d1229 < #if defined(__GNUC__) && __GNUC__ >= 5 1234d1230 < #endif ---------- components: Build messages: 377520 nosy: micwin priority: normal severity: normal status: open title: Compiler error in _zoneinfo.c:1227: error: #pragma GCC diagnostic not allowed inside functions type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:23:00 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 26 Sep 2020 10:23:00 +0000 Subject: [issue41428] PEP 604 -- Allow writing union types as X | Y In-Reply-To: <1595975550.94.0.895278514403.issue41428@roundup.psfhosted.org> Message-ID: <1601115780.26.0.545660647132.issue41428@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +21453 pull_request: https://github.com/python/cpython/pull/22416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:29:14 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 26 Sep 2020 10:29:14 +0000 Subject: [issue40042] Enum Flag: psuedo-members have None for name attribute In-Reply-To: <1589810738.21.0.092571074978.issue40042@roundup.psfhosted.org> Message-ID: <1601116154.71.0.66724430648.issue40042@roundup.psfhosted.org> Irit Katriel added the comment: I see in the code of _create_pseudo_member_ that _name_ is deliberately set to None, and furthermore in __str__ and __repr__ the fact that it is None is used to determine whether self is a composite (pseudo) or not. So first question is whether this should be fixed. If so, I see two options: 1. Establish another way to determine whether self is a composite or not, and change they way _name_ is initialised. 2. Leave _name_ as is, but override name (which currently is defined in Enum and simply returns _name_ but can be redefined to do something else). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:31:03 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 26 Sep 2020 10:31:03 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601116263.59.0.801174822755.issue41861@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +21454 pull_request: https://github.com/python/cpython/pull/22417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:48:00 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 26 Sep 2020 10:48:00 +0000 Subject: [issue41864] Compiler error in _zoneinfo.c:1227: error: #pragma GCC diagnostic not allowed inside functions In-Reply-To: <1601114691.42.0.0298399391813.issue41864@roundup.psfhosted.org> Message-ID: <1601117280.27.0.90245127582.issue41864@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:49:11 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 26 Sep 2020 10:49:11 +0000 Subject: [issue41428] PEP 604 -- Allow writing union types as X | Y In-Reply-To: <1595975550.94.0.895278514403.issue41428@roundup.psfhosted.org> Message-ID: <1601117351.76.0.49395382947.issue41428@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d73cf7ca85fb60b739e671597aabe72cc36d397a by Victor Stinner in branch 'master': bpo-41428: Fix compiler warning in unionobject.c (GH-22416) https://github.com/python/cpython/commit/d73cf7ca85fb60b739e671597aabe72cc36d397a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:49:12 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 26 Sep 2020 10:49:12 +0000 Subject: [issue41864] Compiler error in _zoneinfo.c:1227: error: #pragma GCC diagnostic not allowed inside functions In-Reply-To: <1601114691.42.0.0298399391813.issue41864@roundup.psfhosted.org> Message-ID: <1601117352.18.0.0216205842598.issue41864@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:56:33 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 26 Sep 2020 10:56:33 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1601117793.67.0.435592909517.issue1635741@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 2afd1751dd9a35d4ec03b708e3e5cddd72c43f7e by Dong-hee Na in branch 'master': bpo-1635741: Port _bisect module to multi-phase init (GH-22415) https://github.com/python/cpython/commit/2afd1751dd9a35d4ec03b708e3e5cddd72c43f7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 06:57:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Sat, 26 Sep 2020 10:57:08 +0000 Subject: [issue41428] PEP 604 -- Allow writing union types as X | Y In-Reply-To: <1595975550.94.0.895278514403.issue41428@roundup.psfhosted.org> Message-ID: <1601117828.48.0.910348840576.issue41428@roundup.psfhosted.org> STINNER Victor added the comment: > Now that PR 21515 is landed, we should consider what sections of the docs/spec needs to be updated. Any update on the documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 08:08:21 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 26 Sep 2020 12:08:21 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601122101.04.0.804227369476.issue41858@roundup.psfhosted.org> Tal Einat added the comment: I agree with Terry that the current form is not incorrect, as well as with his suggestion to inline the commands for printing the usage info. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 09:01:10 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 26 Sep 2020 13:01:10 +0000 Subject: [issue35765] Document references object x but doesn't show it in the example In-Reply-To: <1547771500.83.0.912392206765.issue35765@roundup.psfhosted.org> Message-ID: <1601125270.34.0.387501211152.issue35765@roundup.psfhosted.org> Vedran ?a?i? added the comment: I think it would be simpler to just remove the empty name `x`. "If you have an object, you can ...". ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 09:03:29 2020 From: report at bugs.python.org (Jack W.) Date: Sat, 26 Sep 2020 13:03:29 +0000 Subject: [issue41865] doc search for super().__init__() returns no useful results Message-ID: <1601125409.76.0.692244032033.issue41865@roundup.psfhosted.org> New submission from Jack W. : It's oddly difficult to glean from the official documentation the correct syntax for superclass initialization. ---------- assignee: docs at python components: Documentation messages: 377527 nosy: docs at python, softwoehr priority: normal severity: normal status: open title: doc search for super().__init__() returns no useful results type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 09:15:51 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 26 Sep 2020 13:15:51 +0000 Subject: [issue41851] tkinter: add font neg and equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601126151.58.0.670997311891.issue41851@roundup.psfhosted.org> Tal Einat added the comment: Why would negating the font size convert it from points to pixels?? It seems to be coming straight from Tk; is this documented anywhere? I'd greatly prefer that we use a properly named property instead, e.g. .pixel_size. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 09:22:28 2020 From: report at bugs.python.org (Tal Einat) Date: Sat, 26 Sep 2020 13:22:28 +0000 Subject: [issue41851] tkinter: add font neg and equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601126548.38.0.454874884795.issue41851@roundup.psfhosted.org> Tal Einat added the comment: As for an equal() method, I think that adding equal() which is different than the existing __eq__() would be a source of confusion. I also think using it wouldn't add anything, and would be less clear, compared to font1.actual() == font2.actual(). I'm definitely not happy with the existing __eq__() though, and think it would be worth discussing changing __eq__() to use self.actual() == other.actual() rather than just comparing names. That should be a separate issue, though - you're welcome to create one! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 10:07:18 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Sat, 26 Sep 2020 14:07:18 +0000 Subject: [issue39326] Python-3.8.1 "test_importlib" failed In-Reply-To: <1578977546.19.0.0039726161306.issue39326@roundup.psfhosted.org> Message-ID: <1601129238.72.0.826412130933.issue39326@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 10:13:24 2020 From: report at bugs.python.org (Rahul Kumaresan) Date: Sat, 26 Sep 2020 14:13:24 +0000 Subject: [issue41822] Document the meaning of values for sys.float_info.rounds In-Reply-To: <1600648706.73.0.507862170012.issue41822@roundup.psfhosted.org> Message-ID: <1601129604.97.0.22147179286.issue41822@roundup.psfhosted.org> Change by Rahul Kumaresan : ---------- nosy: +rahul-kumi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 11:07:20 2020 From: report at bugs.python.org (E. Paine) Date: Sat, 26 Sep 2020 15:07:20 +0000 Subject: [issue41851] tkinter: add font equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601132840.34.0.0102944282111.issue41851@roundup.psfhosted.org> E. Paine added the comment: > Why would negating the font size convert it from points to pixels?? Oh... I apologise: I clearly didn't think this through. It doesn't "convert" in any sense, it just negates the font size so 16 points becomes 16 pixels. Therefore, it is practically useless (besides, a new font object would not help the user a converted value anyway) - I therefore do not wish to proceed this this part of the issue (I have removed it from the title and will remove it from the PR). > I also think using [.equal] wouldn't add anything I disagree and will stand by this one! While the user could easily write it themselves, I think it would be helpful to have a convenience method to check if two fonts represent the same thing that is displayed to the user. When first creating this issue, I didn't want to touch __eq__ for two reasons: 1. I didn't know how much code changing this would break (it is very hard to check for code usage of dunder methods - if you know any ways please let me know!) 2. Checking to see if the fonts are the same Tk object is also very helpful (in other, granted fewer, contexts) For example, something like this could be used in IDLE so that if the user sets their font back to the equivalent of the default ("TkFixedFont"), the value isn't kept in the user's local config (similar to how all the other options do). Therefore, while I would like this somehow added, I agree that adding an `equal` method that does not do the same thing as `==` is confusing (you just have to look at Java and all the confusion over using `==` on strings - a 'gotcha' for every new Java learner). However, as I said above, I am reluctant to touch __eq__. Any ideas? ---------- title: tkinter: add font neg and equal methods -> tkinter: add font equal methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 12:00:28 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 26 Sep 2020 16:00:28 +0000 Subject: [issue41864] Compiler error in _zoneinfo.c:1227: error: #pragma GCC diagnostic not allowed inside functions In-Reply-To: <1601114691.42.0.0298399391813.issue41864@roundup.psfhosted.org> Message-ID: <1601136028.89.0.131499921417.issue41864@roundup.psfhosted.org> Dong-hee Na added the comment: see also: https://bugs.python.org/issue40686 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 12:23:58 2020 From: report at bugs.python.org (siyuan0322) Date: Sat, 26 Sep 2020 16:23:58 +0000 Subject: [issue41866] Document error in chinese version of contextlib. Message-ID: <1601137438.19.0.414392303646.issue41866@roundup.psfhosted.org> New submission from siyuan0322 : In the Chinese version of documentation (both simplified and tradinational) of contextlib, the URL of `__enter__` and `__exit__` of [`contextlib.AbstractContextManager`](https://docs.python.org/zh-cn/3/library/contextlib.html#contextlib.AbstractContextManager) is pointing to the `__aenter__` and `__aexit__` method, which is a small mistake. ---------- assignee: docs at python components: Documentation messages: 377532 nosy: docs at python, siyuan priority: normal severity: normal status: open title: Document error in chinese version of contextlib. versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 12:36:33 2020 From: report at bugs.python.org (siyuan0322) Date: Sat, 26 Sep 2020 16:36:33 +0000 Subject: [issue41866] Document error in chinese version of contextlib. In-Reply-To: <1601137438.19.0.414392303646.issue41866@roundup.psfhosted.org> Message-ID: <1601138193.95.0.332826283508.issue41866@roundup.psfhosted.org> siyuan0322 added the comment: Only found the source rst of the English version, doesn't know where the chinese version sources resides. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 12:44:43 2020 From: report at bugs.python.org (Ram Rachum) Date: Sat, 26 Sep 2020 16:44:43 +0000 Subject: [issue41867] Include options for timespec in docstrings of isoformat Message-ID: <1601138683.03.0.777121692912.issue41867@roundup.psfhosted.org> New submission from Ram Rachum : Writing the patch now. ---------- components: Library (Lib) messages: 377534 nosy: cool-RR priority: normal severity: normal status: open title: Include options for timespec in docstrings of isoformat type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 12:48:02 2020 From: report at bugs.python.org (Ram Rachum) Date: Sat, 26 Sep 2020 16:48:02 +0000 Subject: [issue41867] Include options for timespec in docstrings of isoformat In-Reply-To: <1601138683.03.0.777121692912.issue41867@roundup.psfhosted.org> Message-ID: <1601138882.98.0.869965986162.issue41867@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +21455 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 13:03:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 26 Sep 2020 17:03:42 +0000 Subject: [issue41866] Document error in chinese version of contextlib. In-Reply-To: <1601137438.19.0.414392303646.issue41866@roundup.psfhosted.org> Message-ID: <1601139822.37.0.524939463013.issue41866@roundup.psfhosted.org> Irit Katriel added the comment: You might find some information here: https://devguide.python.org/documenting/#translating ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 13:55:27 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 26 Sep 2020 17:55:27 +0000 Subject: =?utf-8?q?=5Bissue39862=5D_Why_are_the_union_relationships_not_implemente?= =?utf-8?b?ZCBieSBkZWZhdWx0IGZvciDiiaQgYW5kIOKJpT8=?= In-Reply-To: <1583404181.09.0.848601767593.issue39862@roundup.psfhosted.org> Message-ID: <1601142927.9.0.103121757097.issue39862@roundup.psfhosted.org> Irit Katriel added the comment: The PEP that Raymond linked to says: "Further smarts could have been added to the comparison mechanism, but this limited set of allowed "swaps" was chosen because it doesn't require the infrastructure to do any processing (negation) of return values. The choice of six special methods was made over a single (e.g. __richcmp__) method to allow the dispatching on the opcode to be performed at the level of the C implementation rather than the user-defined method." The pseudo code you suggested assumes that the results of comparisons can be interpreted as booleans, which not always correct and makes your suggestion under-specified. It is not easy to devise a sound and intuitive composition of boolean expressions whose semantics are user-defined. As an aside, I think for the boolean case it is enough that one of them is not NotImplemented, so your pseudo code should have been: def __le__(self, other): result_1 = self.__lt__(other) result_2 = self.__eq__(other) if result_1 is NotImplemented and result_2 is NotImplemented: return NotImplemented return result_1 or result_2 ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 14:51:05 2020 From: report at bugs.python.org (KK Hiraskar) Date: Sat, 26 Sep 2020 18:51:05 +0000 Subject: [issue41868] SMTPLIB integrate or provide option to use "logging" Message-ID: <1601146265.03.0.468460712956.issue41868@roundup.psfhosted.org> New submission from KK Hiraskar : Currently "smtplib" is directly printing data to stdout/stderr, and not getting any good way to get this data in to the logs written by "logging" please provide an option to achieve this. ---------- components: email messages: 377537 nosy: barry, hpkkumar007, r.david.murray priority: normal severity: normal status: open title: SMTPLIB integrate or provide option to use "logging" type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 14:53:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 Sep 2020 18:53:03 +0000 Subject: =?utf-8?q?=5Bissue39862=5D_Why_are_the_union_relationships_not_implemente?= =?utf-8?b?ZCBieSBkZWZhdWx0IGZvciDiiaQgYW5kIOKJpT8=?= In-Reply-To: <1583404181.09.0.848601767593.issue39862@roundup.psfhosted.org> Message-ID: <1601146383.48.0.731964992805.issue39862@roundup.psfhosted.org> Raymond Hettinger added the comment: This issue is more of a question or objection than a bug report, so I'm going to mark this as closed. Feel free to continue the discussion on python-ideas or ask more about it on StackOverflow. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 15:42:13 2020 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 26 Sep 2020 19:42:13 +0000 Subject: [issue35561] Valgrind reports Syscall param epoll_ctl(event) points to uninitialised byte(s) In-Reply-To: <1545492162.72.0.0770528567349.issue35561@roundup.psfhosted.org> Message-ID: <1601149333.47.0.435783469379.issue35561@roundup.psfhosted.org> Benjamin Peterson added the comment: The valgrind bug was also fixed https://bugs.kde.org/show_bug.cgi?id=422623. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 15:46:23 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 Sep 2020 19:46:23 +0000 Subject: [issue41865] doc search for super().__init__() returns no useful results In-Reply-To: <1601125409.76.0.692244032033.issue41865@roundup.psfhosted.org> Message-ID: <1601149583.38.0.556242848056.issue41865@roundup.psfhosted.org> Raymond Hettinger added the comment: The __init__() method isn't a feature of super(). It is a feature of the class being called. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 15:58:58 2020 From: report at bugs.python.org (Sumagna Das) Date: Sat, 26 Sep 2020 19:58:58 +0000 Subject: [issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora In-Reply-To: <1573836860.92.0.531253629667.issue38815@roundup.psfhosted.org> Message-ID: <1601150338.45.0.157702084409.issue38815@roundup.psfhosted.org> Sumagna Das added the comment: still getting this issue on Ubuntu 20.04 with the latest master checkout of cpython ---------- nosy: +sumagnadas versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 16:00:21 2020 From: report at bugs.python.org (Sumagna Das) Date: Sat, 26 Sep 2020 20:00:21 +0000 Subject: [issue38815] test_ssl: test_min_max_version() fails on FreeBSD and Fedora In-Reply-To: <1573836860.92.0.531253629667.issue38815@roundup.psfhosted.org> Message-ID: <1601150421.55.0.59289790168.issue38815@roundup.psfhosted.org> Change by Sumagna Das : ---------- versions: +Python 3.9 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 16:30:50 2020 From: report at bugs.python.org (Jack W.) Date: Sat, 26 Sep 2020 20:30:50 +0000 Subject: [issue41865] doc search for super().__init__() returns no useful results In-Reply-To: <1601125409.76.0.692244032033.issue41865@roundup.psfhosted.org> Message-ID: <1601152250.99.0.130927241163.issue41865@roundup.psfhosted.org> Jack W. added the comment: True enough, however, no search I could come up which included the term "super" or "__init__" returned a document near the top of the search which showed how to chain a superclass initializer. This can be confusing, as there are 2 syntaxes for doing this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 16:51:31 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 26 Sep 2020 20:51:31 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601153491.62.0.115004373013.issue41861@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +21456 pull_request: https://github.com/python/cpython/pull/22419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 16:51:31 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 26 Sep 2020 20:51:31 +0000 Subject: [issue2897] PyMemberDef missing in limited API / Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1601153491.71.0.982987016257.issue2897@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland nosy_count: 14.0 -> 15.0 pull_requests: +21457 pull_request: https://github.com/python/cpython/pull/22419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 17:01:42 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 Sep 2020 21:01:42 +0000 Subject: [issue41865] doc search for super().__init__() returns no useful results In-Reply-To: <1601125409.76.0.692244032033.issue41865@roundup.psfhosted.org> Message-ID: <1601154102.6.0.882491848462.issue41865@roundup.psfhosted.org> Raymond Hettinger added the comment: The primary documentation for super() is here: https://docs.python.org/3/library/functions.html#super At the bottom it references a guide to using super() that you might find helpful: https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ The standard library source code has many examples. In particular, the argparse module makes heavy use of super(): https://github.com/python/cpython/blob/3.8/Lib/argparse.py The tutorial provides some light discussion: https://docs.python.org/3/tutorial/classes.html#multiple-inheritance There is also an FAQ entry: https://docs.python.org/3/faq/programming.html#how-do-i-call-a-method-defined-in-a-base-class-from-a-derived-class-that-overrides-it There is also extensive coverage on StackOverflow: https://stackoverflow.com/search?q=%5Bpython%5D+super Hope you find these links helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 17:13:17 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 26 Sep 2020 21:13:17 +0000 Subject: [issue36255] Provide a simple way to delete and edit python's welcome message In-Reply-To: <1552227449.7.0.67751285833.issue36255@roundup.psfhosted.org> Message-ID: <1601154797.48.0.0804588873812.issue36255@roundup.psfhosted.org> Irit Katriel added the comment: I think this issue can be closed, there is nothing to do on it. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 17:49:42 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 26 Sep 2020 21:49:42 +0000 Subject: [issue41848] PEG parser doesn't allow lambda in for_if_clause In-Reply-To: <1600903982.27.0.474581886877.issue41848@roundup.psfhosted.org> Message-ID: <1601156982.45.0.196959902869.issue41848@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I concur with Guido: it makes the grammar slightly more complex for no gain. Also, the originally allowed rule does not allow *any* lambda but only the ones that are simple, which is a special case that makes it even more complex. In any case you can use parentheses to break this limitation. Like Guido, I propose to add a very small comment to What's New in 3.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 18:21:42 2020 From: report at bugs.python.org (Maxim Burov) Date: Sat, 26 Sep 2020 22:21:42 +0000 Subject: [issue23706] pathlib.Path.write_text should include a newline argument In-Reply-To: <1426757561.17.0.481870343329.issue23706@psf.upfronthosting.co.za> Message-ID: <1601158902.32.0.232542231564.issue23706@roundup.psfhosted.org> Change by Maxim Burov : ---------- keywords: +patch nosy: +maksvenberv nosy_count: 5.0 -> 6.0 pull_requests: +21458 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22420 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 19:36:40 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 26 Sep 2020 23:36:40 +0000 Subject: [issue41848] PEG parser doesn't allow lambda in for_if_clause In-Reply-To: <1600903982.27.0.474581886877.issue41848@roundup.psfhosted.org> Message-ID: <1601163400.16.0.551627194695.issue41848@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, let's close this. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 19:55:29 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 26 Sep 2020 23:55:29 +0000 Subject: [issue37378] FatalError: initfsencoding python couldn't find codec Module not found: Encodings In-Reply-To: <1561298259.69.0.399868439526.issue37378@roundup.psfhosted.org> Message-ID: <1601164529.33.0.874518225741.issue37378@roundup.psfhosted.org> Irit Katriel added the comment: Is this issue resolved? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 19:55:57 2020 From: report at bugs.python.org (Irit Katriel) Date: Sat, 26 Sep 2020 23:55:57 +0000 Subject: [issue37378] FatalError: initfsencoding python couldn't find codec Module not found: Encodings In-Reply-To: <1561298259.69.0.399868439526.issue37378@roundup.psfhosted.org> Message-ID: <1601164557.97.0.64773516197.issue37378@roundup.psfhosted.org> Irit Katriel added the comment: Oh, it's closed, sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 19:58:09 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 Sep 2020 23:58:09 +0000 Subject: [issue36255] Provide a simple way to delete and edit python's welcome message In-Reply-To: <1552227449.7.0.67751285833.issue36255@roundup.psfhosted.org> Message-ID: <1601164689.64.0.875932595205.issue36255@roundup.psfhosted.org> Raymond Hettinger added the comment: > I think this issue can be closed, there is nothing to do on it. Right. ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 20:01:21 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 00:01:21 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601164881.99.0.903158379865.issue41114@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Interpreter Core type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 20:06:07 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 00:06:07 +0000 Subject: [issue41051] Flush file after warning is written In-Reply-To: <1592656477.66.0.545359338323.issue41051@roundup.psfhosted.org> Message-ID: <1601165167.04.0.962606489666.issue41051@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +IO type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 20:12:10 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 27 Sep 2020 00:12:10 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601165530.59.0.619494978062.issue41858@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi Terry and Tal Einat, I can't say too much because I am not English native, and my English is very basic. When I read the docs and the translation from python-docs-es, that sentence make me feel how if something is missing, but I understand the intention with the Terry explanation. I will change the patch for ``Additionally, users can run one of the following ::`` What about now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 21:06:35 2020 From: report at bugs.python.org (Michael L. Boom) Date: Sun, 27 Sep 2020 01:06:35 +0000 Subject: [issue41869] Multiprocessing Manager Object Cleanup Message-ID: <1601168795.22.0.608352680719.issue41869@roundup.psfhosted.org> New submission from Michael L. Boom : I have a program that is running a multiprocessing manager. Other programs connect and get proxies for objects. If those programs close cleanly, the destructor in the multiprocessing manager for the corresponding object gets called. If I kill that program, the destructor never gets called. This is a serious problem as I can?t cleanup resources in this case. ---------- components: Library (Lib) messages: 377551 nosy: boom0192 priority: normal severity: normal status: open title: Multiprocessing Manager Object Cleanup type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 22:50:59 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 Sep 2020 02:50:59 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601175059.08.0.210646819903.issue41114@roundup.psfhosted.org> Raymond Hettinger added the comment: > It would be clearer if the message was something like: > > TypeError: 'dict' can not be used as a set value because > it is an unhashable type. IMO that doesn't help. The trackback already shows the code where the exception occurred. The user already knows the calling type, and the existing message tells them what type was passed in. Their real problem is that they still have to confront the notion of what "unhashable type" means and then need figure-out a way to fix it. So the proposed extra information is just a distractor that doesn't get the user any closer to understanding or solving their problem. To get a user closer to the solution they would either need an explanation of what hashable means and/or be given a suggestion of how to fix it: TypeError: unhashable type: 'dict'. Consider using an int, str, tuple, or frozenset. That said, it is precarious to guess what the user intended, so it is difficult to suggest some form of "did you mean ..." ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 23:43:22 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Sep 2020 03:43:22 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601178202.07.0.65955370785.issue41858@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 00eb063b6600fdb4ba5cfb99da83cc1660ec69bf by Emmanuel Arias in branch 'master': bpo-41858: Clarify line in optparse doc (GH-22407) https://github.com/python/cpython/commit/00eb063b6600fdb4ba5cfb99da83cc1660ec69bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 23:43:52 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 27 Sep 2020 03:43:52 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601178232.75.0.760111688495.issue41858@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +21459 pull_request: https://github.com/python/cpython/pull/22425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 23:44:01 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 27 Sep 2020 03:44:01 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601178241.4.0.13201074766.issue41858@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21460 pull_request: https://github.com/python/cpython/pull/22426 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 23:52:05 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 27 Sep 2020 03:52:05 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601178725.16.0.539683461729.issue41858@roundup.psfhosted.org> miss-islington added the comment: New changeset e0e614ca99c39e107b97c7be779efea08f22ace3 by Miss Islington (bot) in branch '3.8': bpo-41858: Clarify line in optparse doc (GH-22407) https://github.com/python/cpython/commit/e0e614ca99c39e107b97c7be779efea08f22ace3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 23:55:10 2020 From: report at bugs.python.org (Jack W.) Date: Sun, 27 Sep 2020 03:55:10 +0000 Subject: [issue41865] doc search for super().__init__() returns no useful results In-Reply-To: <1601125409.76.0.692244032033.issue41865@roundup.psfhosted.org> Message-ID: <1601178910.31.0.817619984522.issue41865@roundup.psfhosted.org> Jack W. added the comment: Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 26 23:55:25 2020 From: report at bugs.python.org (Jack W.) Date: Sun, 27 Sep 2020 03:55:25 +0000 Subject: [issue41865] doc search for super().__init__() returns no useful results In-Reply-To: <1601125409.76.0.692244032033.issue41865@roundup.psfhosted.org> Message-ID: <1601178925.31.0.635925976005.issue41865@roundup.psfhosted.org> Change by Jack W. : ---------- resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 00:04:00 2020 From: report at bugs.python.org (miss-islington) Date: Sun, 27 Sep 2020 04:04:00 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601179440.11.0.38155528994.issue41858@roundup.psfhosted.org> miss-islington added the comment: New changeset 8b2595f68af059afdd61b2bb3d32a2bf4f1662c8 by Miss Islington (bot) in branch '3.9': bpo-41858: Clarify line in optparse doc (GH-22407) https://github.com/python/cpython/commit/8b2595f68af059afdd61b2bb3d32a2bf4f1662c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 02:46:38 2020 From: report at bugs.python.org (GJL) Date: Sun, 27 Sep 2020 06:46:38 +0000 Subject: [issue41863] IDLE shell not opening with 3.5 on Mac Mohave. In-Reply-To: <1601058909.32.0.910402125729.issue41863@roundup.psfhosted.org> Message-ID: <1601189198.54.0.572474069231.issue41863@roundup.psfhosted.org> GJL added the comment: Thank you both. Decided to just download 3.8.6 instead of dealing with 3.5 IDLE shell works. Appreciate the help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 03:30:44 2020 From: report at bugs.python.org (Tal Einat) Date: Sun, 27 Sep 2020 07:30:44 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601191844.13.0.531334090555.issue41858@roundup.psfhosted.org> Tal Einat added the comment: Thanks for the report and the PR, Emmanuel! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 06:49:07 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 10:49:07 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601203747.26.0.242051709061.issue41114@roundup.psfhosted.org> Irit Katriel added the comment: Do you think it would help if the exception was of type UnhashableType (subclass of TypeError)? This would give the user a hint that this error is a thing which is worth looking for in the docs and understanding. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 08:10:40 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 12:10:40 +0000 Subject: [issue17490] Improve ast.literal_eval test suite coverage In-Reply-To: <1363746875.32.0.0832947039866.issue17490@psf.upfronthosting.co.za> Message-ID: <1601208640.54.0.880695229631.issue17490@roundup.psfhosted.org> Irit Katriel added the comment: I think this is a bug in literal_eval: >>> 3+6j (3+6j) >>> 6j+3 (3+6j) >>> ast.literal_eval('3+6j') (3+6j) >>> ast.literal_eval('6j+3') Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython\lib\ast.py", line 105, in literal_eval return _convert(node_or_string) File "C:\Users\User\src\cpython\lib\ast.py", line 104, in _convert return _convert_signed_num(node) File "C:\Users\User\src\cpython\lib\ast.py", line 78, in _convert_signed_num return _convert_num(node) File "C:\Users\User\src\cpython\lib\ast.py", line 69, in _convert_num _raise_malformed_node(node) File "C:\Users\User\src\cpython\lib\ast.py", line 66, in _raise_malformed_node raise ValueError(f'malformed node or string: {node!r}') ValueError: malformed node or string: literal_eval accepts complex rhs, but not lhs: https://github.com/python/cpython/blame/master/Lib/ast.py#L99 if isinstance(left, (int, float)) and isinstance(right, complex): This was introduced here, I'm not sure why: https://github.com/python/cpython/commit/d8ac4d1d5ac256ebf3d8d38c226049abec82a2a0 In Nick's aborted patch, he removed that check. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 08:15:08 2020 From: report at bugs.python.org (STINNER Victor) Date: Sun, 27 Sep 2020 12:15:08 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601208908.66.0.552688276492.issue41861@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a937ab45d6af4f99ff16fec73d5d75d93c569456 by Erlend Egeberg Aasland in branch 'master': bpo-41861: Convert _sqlite3 cache and node static types to heap types (GH-22417) https://github.com/python/cpython/commit/a937ab45d6af4f99ff16fec73d5d75d93c569456 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 08:15:23 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 12:15:23 +0000 Subject: [issue17490] Improve ast.literal_eval test suite coverage In-Reply-To: <1363746875.32.0.0832947039866.issue17490@psf.upfronthosting.co.za> Message-ID: <1601208923.18.0.155559710475.issue17490@roundup.psfhosted.org> Irit Katriel added the comment: I just noticed that the patch by Serhiy has unit tests for this case, expecting ValueError. So this is apprently a feature and not a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 08:18:02 2020 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Sun, 27 Sep 2020 12:18:02 +0000 Subject: =?utf-8?q?=5Bissue39862=5D_Why_are_the_union_relationships_not_implemente?= =?utf-8?b?ZCBieSBkZWZhdWx0IGZvciDiiaQgYW5kIOKJpT8=?= In-Reply-To: <1583404181.09.0.848601767593.issue39862@roundup.psfhosted.org> Message-ID: <1601209082.37.0.639566781859.issue39862@roundup.psfhosted.org> G?ry added the comment: Alright @rhettinger, here is the post: https://discuss.python.org/t/add-missing-default-implementations-of-le-and-ge/5327 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:17:23 2020 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 27 Sep 2020 13:17:23 +0000 Subject: [issue41858] Fix incomplete line on optparse documentation In-Reply-To: <1601000208.27.0.918892305857.issue41858@roundup.psfhosted.org> Message-ID: <1601212643.86.0.786480421473.issue41858@roundup.psfhosted.org> Emmanuel Arias added the comment: Thanks for the help and review! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:20:58 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 27 Sep 2020 13:20:58 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() Message-ID: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> New submission from Dong-hee Na : bool type is well-used builtin types, I noticed that if we use vector call to bool type, it shows the awesome performance enhancement. Mean +- std dev: [master] 91.4 us +- 3.3 us -> [vectorcall] 48.6 us +- 3.1 us: 1.88x faster (-47%) ---------- assignee: corona10 files: bench_bool.py messages: 377565 nosy: corona10, vstinner priority: normal severity: normal status: open title: Use PEP 590 vectorcall to speed up calls to bool() type: performance versions: Python 3.10 Added file: https://bugs.python.org/file49475/bench_bool.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:24:00 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 27 Sep 2020 13:24:00 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601213040.96.0.0923939864228.issue41870@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +21461 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:26:28 2020 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 27 Sep 2020 13:26:28 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601213188.73.0.587808452493.issue41870@roundup.psfhosted.org> Change by Dong-hee Na : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:30:06 2020 From: report at bugs.python.org (hai shi) Date: Sun, 27 Sep 2020 13:30:06 +0000 Subject: [issue41871] Add PyList_Remove() in listobject.c Message-ID: <1601213406.91.0.754630281807.issue41871@roundup.psfhosted.org> New submission from hai shi : Do we need add PyList_Remove() in C level? same thing like list.remove(). As victor comment in: https://github.com/python/cpython/pull/19069#discussion_r491893466. ---------- components: C API messages: 377566 nosy: shihai1991, vstinner priority: normal severity: normal status: open title: Add PyList_Remove() in listobject.c versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:46:01 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 13:46:01 +0000 Subject: [issue40471] Grammar typo in issubclass docstring In-Reply-To: <1588357714.64.0.482700195727.issue40471@roundup.psfhosted.org> Message-ID: <1601214361.99.0.621651185981.issue40471@roundup.psfhosted.org> Irit Katriel added the comment: Should this PR be backported? Otherwise this issue can be closed. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:52:48 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Sep 2020 13:52:48 +0000 Subject: [issue41871] Add PyList_Remove() in listobject.c In-Reply-To: <1601213406.91.0.754630281807.issue41871@roundup.psfhosted.org> Message-ID: <1601214768.55.0.372038504525.issue41871@roundup.psfhosted.org> Serhiy Storchaka added the comment: You always can use PyObject_CallMethod(). It is not a method called in tight loop for which the overhead of calling method is significant. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 09:58:04 2020 From: report at bugs.python.org (Chris Withers) Date: Sun, 27 Sep 2020 13:58:04 +0000 Subject: [issue41872] get_type_hints fails to resolve forward references in nested function Message-ID: <1601215084.02.0.220244006466.issue41872@roundup.psfhosted.org> New submission from Chris Withers : Reproducer: def test_forward_type_references(self): def foo(a: 'Foo') -> 'Bar': pass class Foo: pass class Bar: pass get_type_hints(foo) The above gives the following exception, rather than resolving the type: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py:1001: in get_type_hints value = _eval_type(value, globalns, localns) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py:260: in _eval_type return t._evaluate(globalns, localns) /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/typing.py:464: in _evaluate eval(self.__forward_code__, globalns, localns), _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ??? E NameError: name 'Foo' is not defined ---------- components: Library (Lib) messages: 377569 nosy: cjw296 priority: normal severity: normal status: open title: get_type_hints fails to resolve forward references in nested function type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 10:03:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 14:03:42 +0000 Subject: [issue13790] In str.format an incorrect error message for list, tuple, dict, set In-Reply-To: <1326605478.95.0.601079964751.issue13790@psf.upfronthosting.co.za> Message-ID: <1601215422.55.0.991199547108.issue13790@roundup.psfhosted.org> Irit Katriel added the comment: This seems complete. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 10:25:01 2020 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 27 Sep 2020 14:25:01 +0000 Subject: [issue13790] In str.format an incorrect error message for list, tuple, dict, set In-Reply-To: <1326605478.95.0.601079964751.issue13790@psf.upfronthosting.co.za> Message-ID: <1601216701.18.0.740721359787.issue13790@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 10:24:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Sep 2020 14:24:43 +0000 Subject: [issue17490] Improve ast.literal_eval test suite coverage In-Reply-To: <1363746875.32.0.0832947039866.issue17490@psf.upfronthosting.co.za> Message-ID: <1601216683.42.0.500528133313.issue17490@roundup.psfhosted.org> Serhiy Storchaka added the comment: literal_eval() is not purposed to evaluate arbitrary arithmetic expressions. It is only purposed to handle strings produced by repr() of some simple builtin objects. repr(6j+3) is '(3+6j)', not '(6j+3)' and not '(6j--3)', so it accepts the former form and not the latters. If Nick no longer works on this I propose to close this issue. literal_eval() supports now more types of expressions, but it is more strict in other cases. I have doubts that any test changes are applicable to the current code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 10:47:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Sep 2020 14:47:15 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601218035.75.0.793615724293.issue41842@roundup.psfhosted.org> Serhiy Storchaka added the comment: If add a function for unregistering a codec search function, it would be worth to add also a function for unregistering an error handler. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 11:29:02 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 27 Sep 2020 15:29:02 +0000 Subject: [issue41872] get_type_hints fails to resolve forward references in nested function In-Reply-To: <1601215084.02.0.220244006466.issue41872@roundup.psfhosted.org> Message-ID: <1601220542.21.0.967625033015.issue41872@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 11:33:21 2020 From: report at bugs.python.org (hai shi) Date: Sun, 27 Sep 2020 15:33:21 +0000 Subject: [issue41871] Add PyList_Remove() in listobject.c In-Reply-To: <1601213406.91.0.754630281807.issue41871@roundup.psfhosted.org> Message-ID: <1601220801.01.0.261332797516.issue41871@roundup.psfhosted.org> hai shi added the comment: > You always can use PyObject_CallMethod(). It is not a method called in tight loop for which the overhead of calling method is significant. Thanks, serhiy. You are right. To PR19069, it's fine to use `PyList_SetSlice` or `PyObject_CallMethod`. We don't have the enough reason to add `PyList_Remove()`,so I decided close this bpo now. PS: I attach a PR which have add `PyList_Remove` in here in case we will meet another appropriate user case somedays: https://github.com/python/cpython/compare/master...shihai1991:add_PyList_Remove?expand=1 ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 12:52:42 2020 From: report at bugs.python.org (Irit Katriel) Date: Sun, 27 Sep 2020 16:52:42 +0000 Subject: [issue24427] subclass of multiprocessing Connection segfault upon attribute acces In-Reply-To: <1433964415.99.0.226244144163.issue24427@psf.upfronthosting.co.za> Message-ID: <1601225562.06.0.28836101695.issue24427@roundup.psfhosted.org> Irit Katriel added the comment: I think this issue is out of date. 1. I replaced the import statement in the script by "from multiprocessing.connection import Connection" and it gave "AttributeError: 'Crash' object has no attribute 'bar'" rather than a segfault. 2. I can't find "ConnectionObject" in the current codebase. ---------- components: +Interpreter Core nosy: +iritkatriel type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 13:11:26 2020 From: report at bugs.python.org (Maxim Burov) Date: Sun, 27 Sep 2020 17:11:26 +0000 Subject: [issue23706] pathlib.Path.write_text should include a newline argument In-Reply-To: <1426757561.17.0.481870343329.issue23706@psf.upfronthosting.co.za> Message-ID: <1601226686.81.0.522640396374.issue23706@roundup.psfhosted.org> Maxim Burov added the comment: For the newline parameter, what is the expected behaviour? To work as newline from io.open() which supports only so called "legal" newlines which are: None, '', '\n', '\r', and '\r\n', or to allow users use any sequence as newline hence do replacing before passing text to io.open()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 14:00:03 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 Sep 2020 18:00:03 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601229603.27.0.060067854368.issue41114@roundup.psfhosted.org> Raymond Hettinger added the comment: > Do you think it would help if the exception was of type UnhashableType That would not add more information. The message already says "unhashable type". Saying it twice doesn't help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 14:09:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Sep 2020 18:09:03 +0000 Subject: [issue23706] pathlib.Path.write_text should include a newline argument In-Reply-To: <1426757561.17.0.481870343329.issue23706@psf.upfronthosting.co.za> Message-ID: <1601230143.09.0.0336567041278.issue23706@roundup.psfhosted.org> Serhiy Storchaka added the comment: It should work exactly as the newline argument of open(). Anything else would be surprising. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 14:39:41 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 27 Sep 2020 18:39:41 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601231981.14.0.136545927871.issue41861@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +21462 pull_request: https://github.com/python/cpython/pull/22428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 15:08:53 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 27 Sep 2020 19:08:53 +0000 Subject: [issue41865] doc search for super().__init__() returns no useful results In-Reply-To: <1601125409.76.0.692244032033.issue41865@roundup.psfhosted.org> Message-ID: <1601233733.55.0.264011361925.issue41865@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 15:59:08 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 27 Sep 2020 19:59:08 +0000 Subject: [issue41872] get_type_hints fails to resolve forward references in nested function In-Reply-To: <1601215084.02.0.220244006466.issue41872@roundup.psfhosted.org> Message-ID: <1601236748.27.0.308802866894.issue41872@roundup.psfhosted.org> Guido van Rossum added the comment: This cannot be helped (unless we were to add an ugly sys._getframe() call to get_type_hints(), which I don't want to do). The solution is to pass `localns=locals()`, e.g. get_type_hints(foo, None, locals()) or get_type_hints(foo, localns=locals()) ---------- keywords: +3.6regression resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 17:23:14 2020 From: report at bugs.python.org (Chris Withers) Date: Sun, 27 Sep 2020 21:23:14 +0000 Subject: [issue41872] get_type_hints fails to resolve forward references in nested function In-Reply-To: <1601215084.02.0.220244006466.issue41872@roundup.psfhosted.org> Message-ID: <1601241794.88.0.820353328979.issue41872@roundup.psfhosted.org> Chris Withers added the comment: The tough one is that no-one wants an ugly sys._getframe() call, but by avoiding it in the standard library, we force each library that needs this to have the ugly sys._getframe() call rather than it being an unpleasant implementation detail of get_type_hints that users of the function don't have to know about. That said, I've only hit this so far when writing a unit test, but will update this issue if I see real-world cases of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 17:23:16 2020 From: report at bugs.python.org (Evgeny) Date: Sun, 27 Sep 2020 21:23:16 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1601241796.52.0.698754407126.issue14243@roundup.psfhosted.org> Evgeny added the comment: Hello, this is to let you know, that I have created a pull request for this issue https://github.com/python/cpython/pull/22431 I am not really an experienced programmer, but I will give it a try ---------- nosy: +ev2geny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 17:42:08 2020 From: report at bugs.python.org (ppperry) Date: Sun, 27 Sep 2020 21:42:08 +0000 Subject: [issue30953] Fatal python error when jumping into except clause In-Reply-To: <1500326698.05.0.0587216442362.issue30953@psf.upfronthosting.co.za> Message-ID: <1601242928.55.0.178915887065.issue30953@roundup.psfhosted.org> Change by ppperry : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 18:00:19 2020 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 27 Sep 2020 22:00:19 +0000 Subject: [issue41872] get_type_hints fails to resolve forward references in nested function In-Reply-To: <1601241794.88.0.820353328979.issue41872@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: I've only seen it in test cases too -- that's one of the very few situations where it makes sense to define a class inside a function. (Creating a class is an expensive operation, so any function that expects to be called more than once is better off moving the class out of the function.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 19:02:39 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Sun, 27 Sep 2020 23:02:39 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1601247759.55.0.850502230815.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: Serhiy, AFAIR PyIter_Send in my PR appear only as a rename from placeholder `Name_TBD` and it still was specific to PyGenObjects. Do you mean something that was listed in https://bugs.python.org/msg377007 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 19:11:49 2020 From: report at bugs.python.org (Samuel Freilich) Date: Sun, 27 Sep 2020 23:11:49 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601248309.9.0.580002983905.issue41114@roundup.psfhosted.org> Samuel Freilich added the comment: > The user already knows The example I link to in the initial description appears to be one case where the user does not in fact know. I do think context that this restriction applies to dict key in particular is very relevant. The line could use the same type for both the key and the value in a dict assignment, for example. > TypeError: unhashable type: 'dict'. Consider using an int, str, tuple, or frozenset. That seems like a pretty reasonable wording, though I think mentioning "dictionary key" or "set item" specifically still helps. It could also link to the documentation directly: https://docs.python.org/3/glossary.html#term-hashable Though other error messages don't generally follow that pattern. > Saying it twice doesn't help. As the comment you were responding to noted, putting it in the type implies there might be additional information in documentation (or at least provides a place in documentation to put that information). TypeError is too general to say something about that specifically: https://docs.python.org/3/library/exceptions.html#TypeError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 19:31:47 2020 From: report at bugs.python.org (William Pickard) Date: Sun, 27 Sep 2020 23:31:47 +0000 Subject: [issue24427] subclass of multiprocessing Connection segfault upon attribute acces In-Reply-To: <1433964415.99.0.226244144163.issue24427@psf.upfronthosting.co.za> Message-ID: <1601249507.14.0.772546324908.issue24427@roundup.psfhosted.org> William Pickard added the comment: You did just necro a 5 year old bug report... ---------- nosy: +WildCard65 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 27 19:31:56 2020 From: report at bugs.python.org (William Pickard) Date: Sun, 27 Sep 2020 23:31:56 +0000 Subject: [issue24427] subclass of multiprocessing Connection segfault upon attribute acces In-Reply-To: <1433964415.99.0.226244144163.issue24427@psf.upfronthosting.co.za> Message-ID: <1601249516.36.0.710595649475.issue24427@roundup.psfhosted.org> Change by William Pickard : ---------- nosy: -WildCard65 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 00:22:45 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Sep 2020 04:22:45 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601266965.66.0.528373360415.issue41114@roundup.psfhosted.org> Raymond Hettinger added the comment: > I've noticed that Python beginners tend to find this really confusing. No minor tweak to the exception message will make this go away. For understanding to occur, the only way to forward is to learn a bit about hashability. That is a step that every beginner must take. Fortunately, the term "hashable" is listed in the glossary. Also the error message itself is easily Googled: https://docs.python.org/3/glossary.html#term-hashable https://www.google.com/search?q=TypeError%3A+unhashable+type%3A+%27dict%27&oq=TypeError%3A+unhashable+type%3A+%27dict%27 I suggest that you take this to the python-ideas list. While there is a valid concern that a new user may not understand the error message (this is unfortunately true for many our error messages), the proposals don't actually improve the situation. The first proposal adds hard-to-implement context information that still doesn't tell a user what the issue is. The second proposal repeats information that is already being shown. Neither proposal explains what is meant by unhashable type, why it matters, what would be an allowable hashable type, or how to fix the problem (which is what the user really wants to know). After a discussion on python-ideas, if a better proposal is found, feel free to reopen this issue. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 03:05:14 2020 From: report at bugs.python.org (Mauro Matteo Cascella) Date: Mon, 28 Sep 2020 07:05:14 +0000 Subject: [issue39603] [security] http.client: HTTP Header Injection in the HTTP method In-Reply-To: <1581362975.61.0.33794022777.issue39603@roundup.psfhosted.org> Message-ID: <1601276714.16.0.961221964238.issue39603@roundup.psfhosted.org> Mauro Matteo Cascella added the comment: Hello, CVE-2020-26116 has been requested/assigned for this flaw via MITRE form: https://cveform.mitre.org/ I suggest mentioning it in the related vulnerability page: https://python-security.readthedocs.io/vuln/http-header-injection-method.html Also note that httplib (python-2.7.18) seems to be affected too. Any particular reason for it not to be listed in the same vulnerability page? Thank you, ---------- nosy: +mcascella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 03:38:03 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Sep 2020 07:38:03 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1601278683.45.0.935278017766.issue41756@roundup.psfhosted.org> Serhiy Storchaka added the comment: No, I meant a function which combines PyGen_Send, tp_iternext and _PyGen_FetchStopIterationValue. Was not it in your PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 04:14:07 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 28 Sep 2020 08:14:07 +0000 Subject: [issue41851] tkinter: add font equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601280847.44.0.93197701009.issue41851@roundup.psfhosted.org> Tal Einat added the comment: > > I also think using [.equal] wouldn't add anything > I disagree and will stand by this one! Please do note that the full quote was "I also think using it wouldn't add anything, and would be less clear, compared to font1.actual() == font2.actual()". > I think it would be helpful to have a convenience method to check if two fonts represent the same thing that is displayed to the user. More convenient than font1.actual() == font2.actual() ? Since this will be used rather rarely, IMO the more significant problem is discoverability - I've done a *lot* of work with Tkinter and had never heard of the .actual() method. However, adding another comparison method won't help with that by itself. > I am reluctant to touch __eq__. Any ideas? You wrote that "Checking to see if the fonts are the same Tk object is also very helpful (in other, granted fewer, contexts)": Could you elaborate on that? I still think we should consider overriding __eq__. But I need to check how consistent Tktinter is regarding __eq__ checking whether two objects have the same name. [goes to check the docs, code, and do some interactive investigation...] Okay, so the Font class's .name attribute is just a name the user gives to a certain font configuration, which is supposed to be unique. Our docs are pretty clear about this: "The Font class represents a named font. Font instances are given unique names and can be specified by their family, size, and style configuration. Named fonts are Tk's method of creating and identifying fonts as a single object, rather than specifying a font by its attributes with each occurrence." So in this case, tkinter is letting a particularly confusing Tk detail show through. Note that providing a name isn't required, and how confusing the result is when not providing font names: >>> Font(family='DejaVu Sans', size=12) == Font(family='DejaVu Sans', size=12) False Also, if you happen to try to create a font with a name which has already been used: >>> Font(name='default font', family='DejaVu Sans', size=12) >>> Font(name='default font', family='DejaVu Sans', size=12) Traceback [...] _tkinter.TclError: named font "default font" already exists One can avoid this error by passing exists=True, but using that when the font doesn't exist raises an exception: >>> Font(name='other font', family='DejaVu Sans', size=10, exists=True) Traceback [...] _tkinter.TclError: named font other font does not already exist My point is: Using named fonts in tkinter seems incredibly annoying. Using fonts without names seems to work better. But without using names, font comparison is meaningless. It seems to me that we could change __eq__ to: 1. Keep the current behavior if both font objects have explicitly set names or if their automatically generated names are equal (i.e. `self is other`). 2. Otherwise, compare the the results of calling their .actual() methods. This would require adding a simple internal flag in __init__ to remember whether the name was set explicitly, since __init__ sets a unique name if not provided with one. P.S. The "name" constructor parameter is confusing! Here even Terry J. Reedy got it wrong in IDLE font configuration dialog's code: https://github.com/python/cpython/blob/d9ab95ff1fe81efdf70e545d536d9f6927d1ba81/Lib/idlelib/config.py#L745) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 04:18:09 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 28 Sep 2020 08:18:09 +0000 Subject: [issue41851] tkinter: add font equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601281089.64.0.430734490539.issue41851@roundup.psfhosted.org> Tal Einat added the comment: P.P.S. Re-reading that piece of code for IDLE's font config dialog, that actually looks to be intentional and correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 04:55:08 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 28 Sep 2020 08:55:08 +0000 Subject: [issue41873] Add vectorcall for float() Message-ID: <1601283308.14.0.0300181585929.issue41873@roundup.psfhosted.org> New submission from Dennis Sweeney : I got these benchmarks: .\python.bat -m pyperf timeit "float(0)" Before: Mean +- std dev: 79.0 ns +- 1.0 ns After: Mean +- std dev: 51.5 ns +- 1.6 ns ---------- components: Interpreter Core messages: 377590 nosy: Dennis Sweeney priority: normal severity: normal status: open title: Add vectorcall for float() type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 04:55:34 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 28 Sep 2020 08:55:34 +0000 Subject: [issue41873] Add vectorcall for float() In-Reply-To: <1601283308.14.0.0300181585929.issue41873@roundup.psfhosted.org> Message-ID: <1601283334.76.0.814742508824.issue41873@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch pull_requests: +21463 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 06:06:59 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 28 Sep 2020 10:06:59 +0000 Subject: [issue24427] subclass of multiprocessing Connection segfault upon attribute acces In-Reply-To: <1433964415.99.0.226244144163.issue24427@psf.upfronthosting.co.za> Message-ID: <1601287619.41.0.929173054287.issue24427@roundup.psfhosted.org> Irit Katriel added the comment: The fact that a bug was discovered a long time ago doesn't say anything about its relevance (hence old issues are not automatically closed). In this case I believe the bug is no longer relevant and therefore the issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 06:55:46 2020 From: report at bugs.python.org (Red Rooster) Date: Mon, 28 Sep 2020 10:55:46 +0000 Subject: [issue41874] datetime.strptime raises error if date is before 1900 Message-ID: <1601290546.43.0.7600207822.issue41874@roundup.psfhosted.org> New submission from Red Rooster : This fails, because the date is before 1900: d = datetime.strptime("28. Februar 1899", '%d. %B %Y') But the opposite conversion direction works: d=datetime(1899,2,28) d.strftime('%d. %B %Y') prints out "28. Februar 1899" as it should be. ---------- components: Library (Lib) messages: 377592 nosy: redrooster priority: normal severity: normal status: open title: datetime.strptime raises error if date is before 1900 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 07:01:55 2020 From: report at bugs.python.org (Red Rooster) Date: Mon, 28 Sep 2020 11:01:55 +0000 Subject: [issue41874] datetime.strptime raises error if date is before 1900 In-Reply-To: <1601290546.43.0.7600207822.issue41874@roundup.psfhosted.org> Message-ID: <1601290915.94.0.524142413615.issue41874@roundup.psfhosted.org> Red Rooster added the comment: The issue is not that the date is before 1900, the issue are german month names. That strptime understands them, first set the locale like that: locale.setlocale(locale.LC_TIME, "de_DE") ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 07:15:51 2020 From: report at bugs.python.org (yota moteuchi) Date: Mon, 28 Sep 2020 11:15:51 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 Message-ID: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> New submission from yota moteuchi : While compiling a very recent release of Python (ie. 3.9.0rc2) with a fairly old release of gcc (ie. debian 6.0.6 gcc 4.4.5) I get the following error : gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Parser/pegen/pegen.o Parser/pegen/pegen.c Parser/pegen/pegen.c: In function ?_PyPegen_seq_count_dots?: Parser/pegen/pegen.c:1414: error: implicit declaration of function ?__builtin_unreachable? Indeed, this '__builtin_unreachable()' function will exists starting from gcc 4.5. The configure file could detect this and offer an alternative. (does a table of the supported gcc release for each python versions exists ?) ---------- components: Build messages: 377594 nosy: yota moteuchi priority: normal severity: normal status: open title: __builtin_unreachable error in gcc 4.4.5 type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 07:16:06 2020 From: report at bugs.python.org (pfctdayelise) Date: Mon, 28 Sep 2020 11:16:06 +0000 Subject: [issue39027] run_coroutine_threadsafe uses wrong TimeoutError In-Reply-To: <1576101847.74.0.586846433042.issue39027@roundup.psfhosted.org> Message-ID: <1601291766.02.0.276544198087.issue39027@roundup.psfhosted.org> pfctdayelise added the comment: Can we at least update the docs in the meantime? It's not great having incorrect docs. Then if a fix is made to revert the behaviour, it can include updating the docs back. ---------- nosy: +pfctdayelise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 07:27:25 2020 From: report at bugs.python.org (hai shi) Date: Mon, 28 Sep 2020 11:27:25 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601292445.37.0.680143480777.issue41842@roundup.psfhosted.org> hai shi added the comment: > If add a function for unregistering a codec search function, it would be worth to add also a function for unregistering an error handler. Registering an error handler have no refleaks when registering multiple search functions. +1 if end user need this function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 07:29:41 2020 From: report at bugs.python.org (hai shi) Date: Mon, 28 Sep 2020 11:29:41 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601292581.16.0.243487738766.issue41842@roundup.psfhosted.org> hai shi added the comment: oh, sorry, typo error. multiple search functions-->multiple error handler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 07:40:12 2020 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 28 Sep 2020 11:40:12 +0000 Subject: [issue41838] Value error is showing in docset python (class) In-Reply-To: <1600854065.72.0.967885714399.issue41838@roundup.psfhosted.org> Message-ID: <1601293212.44.0.0391809357613.issue41838@roundup.psfhosted.org> Eric V. Smith added the comment: If you can provide the information requested, please reopen this issue. In the meantime, I?m closing it. ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 08:45:30 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 12:45:30 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601297130.15.0.174340203717.issue41875@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 08:52:49 2020 From: report at bugs.python.org (Samuel Freilich) Date: Mon, 28 Sep 2020 12:52:49 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601297569.95.0.20237619337.issue41114@roundup.psfhosted.org> Samuel Freilich added the comment: > No minor tweak to the exception message will make this go away. For understanding to occur, the only way to forward is to learn a bit about hashability. That is a step that every beginner must take. This is a derisive and beginner-hostile response that ignores half of what's been said by other participants in this thread. > Also the error message itself is easily Googled Yeah, the first thing that comes up is ~4k Stack Overflow entries where people are really confused by the error message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 08:58:54 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 12:58:54 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601297934.92.0.260514289954.issue41875@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +21464 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22433 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 08:59:16 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 12:59:16 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601297956.75.0.135059235652.issue41875@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +serhiy.storchaka, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 09:02:25 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 13:02:25 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601298145.98.0.785384894064.issue41875@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 11:06:30 2020 From: report at bugs.python.org (pmp-p) Date: Mon, 28 Sep 2020 15:06:30 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1601305590.42.0.118921427471.issue14527@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: -pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 11:08:43 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Sep 2020 15:08:43 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601305723.45.0.856400561631.issue41842@roundup.psfhosted.org> Serhiy Storchaka added the comment: Although unregistering an error handler may be not so easy, so it is better to open a separate issue for it. ---------- keywords: +easy (C) -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 11:14:10 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 Sep 2020 15:14:10 +0000 Subject: [issue41859] Uncaught ValueError In-Reply-To: <1601007125.39.0.397372093674.issue41859@roundup.psfhosted.org> Message-ID: <1601306050.07.0.461829167087.issue41859@roundup.psfhosted.org> Terry J. Reedy added the comment: Reports with a reproducer are also helpful. Again, can you get a completion box at all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 11:23:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Sep 2020 15:23:53 +0000 Subject: [issue41851] tkinter: add font equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601306633.63.0.799965907252.issue41851@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Tal that negating size would be useless feature, and that we do not need an alternate equal() method. When we want to test that two strings are equal ignoring case we do not call a special method equalignorecase(), we just test that s1.casefold() == s2.casefold(). But I disagree that Font.__eq__() should be changed. The Font object is just a reference to the Tk font as the Path object is a reference to a file on filesystem. When we compare two Path objects we do not compare file sizes, modification times, permission bits and content. We just compare two full names. If two Path objects has the same full name, they are equal. If they full names are different, they are different, even if the corresponding files has the same content. The same is with Font objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 11:33:27 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Sep 2020 15:33:27 +0000 Subject: [issue41876] Add __repr__ for Tkinter Font objects Message-ID: <1601307207.95.0.784900613947.issue41876@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently Font objects have default repr: Since Font is just an object oriented wrapper for font name, and Font objects with the same name are equal, it is worth to show the font name in the repr and do not show an id. ---------- components: Tkinter keywords: easy messages: 377603 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Add __repr__ for Tkinter Font objects type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 12:00:03 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 16:00:03 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601308803.44.0.4772591661.issue41875@roundup.psfhosted.org> Dong-hee Na added the comment: I am able to reproduce this issue on my gcc 4.4.7 root at ef9b356a9deb:/home/cpython# gcc --version gcc (Ubuntu/Linaro 4.4.7-8ubuntu7) 4.4.7 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE Objects/abstract.c: In function '_PySequence_IterSearch': Objects/abstract.c:2065: error: implicit declaration of function '__builtin_unreachable' Makefile:1751: recipe for target 'Objects/abstract.o' failed make: *** [Objects/abstract.o] Error 1 And with PR 22433, I am success to build and run test. I 'd like to send backport patch into 3.9 also ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 12:16:26 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 16:16:26 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601309786.12.0.431938988982.issue41870@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset a195bceff7b552c5f86dec7894ff24dcc87235da by Dong-hee Na in branch 'master': bpo-41870: Use PEP 590 vectorcall to speed up bool() (GH-22427) https://github.com/python/cpython/commit/a195bceff7b552c5f86dec7894ff24dcc87235da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 12:17:17 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 16:17:17 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601309837.14.0.682421715623.issue41870@roundup.psfhosted.org> Dong-hee Na added the comment: Now I close this issue. Thank you, Mark! ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 12:20:01 2020 From: report at bugs.python.org (Larry Hastings) Date: Mon, 28 Sep 2020 16:20:01 +0000 Subject: [issue39603] [security] http.client: HTTP Header Injection in the HTTP method In-Reply-To: <1581362975.61.0.33794022777.issue39603@roundup.psfhosted.org> Message-ID: <1601310001.0.0.764702644359.issue39603@roundup.psfhosted.org> Larry Hastings added the comment: > Also note that httplib (python-2.7.18) seems to be affected too. Any particular reason for it not to be listed in the same vulnerability page? Yes: 2.7 has been end-of-lifed and is no longer supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 12:25:18 2020 From: report at bugs.python.org (E. Paine) Date: Mon, 28 Sep 2020 16:25:18 +0000 Subject: [issue41851] tkinter: add font equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601310318.78.0.799223666004.issue41851@roundup.psfhosted.org> Change by E. Paine : ---------- pull_requests: +21465 pull_request: https://github.com/python/cpython/pull/22434 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 13:04:01 2020 From: report at bugs.python.org (pmp-p) Date: Mon, 28 Sep 2020 17:04:01 +0000 Subject: [issue14527] How to link with a non-system libffi? In-Reply-To: <1333851935.11.0.629390980004.issue14527@psf.upfronthosting.co.za> Message-ID: <1601312641.51.0.0899517566639.issue14527@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 13:38:21 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Mon, 28 Sep 2020 17:38:21 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1601314701.25.0.193924013357.issue41756@roundup.psfhosted.org> Vladimir Matveev added the comment: No, I don't think so but I can definitely make one. A few questions first: - having PySendResult as a result type of PyIterSend seems ok, however prefix for each concrete value (PYGEN_*) is not aligned with the prefix of the function itself (PyIter_) - should it also deal with tstate->c_tracefunc (probably not) or just be something like ``` PySendResult PyIter_Send(PyObject *iter, PyObject *arg, PyObject **result) { _Py_IDENTIFIER(send); assert(result != NULL); if (PyGen_CheckExact(iter) || PyCoro_CheckExact(iter)) { return PyGen_Send((PyGenObject *)iter, arg, result); } if (arg == Py_None && Py_TYPE(iter)->tp_iternext != NULL) { *result = Py_TYPE(iter)->tp_iternext(iter); } else { *result = _PyObject_CallMethodIdOneArg(iter, &PyId_send, arg); } if (*result == NULL) { if (_PyGen_FetchStopIterationValue(result) == 0) { return PYGEN_RETURN; } return PYGEN_ERROR; } return PYGEN_NEXT; } ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 13:39:05 2020 From: report at bugs.python.org (Irit Katriel) Date: Mon, 28 Sep 2020 17:39:05 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601314745.78.0.606629342757.issue41114@roundup.psfhosted.org> Irit Katriel added the comment: I think it's reasonable to discuss the problem on python-ideas rather than on a bugs issue, when it's not obvious what the right solution is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:00:20 2020 From: report at bugs.python.org (DanilZ) Date: Mon, 28 Sep 2020 18:00:20 +0000 Subject: [issue37294] concurrent.futures.ProcessPoolExecutor state=finished raised error In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1601316020.18.0.354089259486.issue37294@roundup.psfhosted.org> DanilZ added the comment: After executing a single task inside a process the result is returned with state=finished raised error. Error happens when trying to load a big dataset (over 5 GB). Otherwise the same dataset reduced to a smaller nrows executes and returns from result() without errors. with concurrent.futures.ProcessPoolExecutor(max_workers = 1) as executor: results = executor.submit(pd.read_csv, path) data = results.result() ---------- components: +2to3 (2.x to 3.x conversion tool) -Library (Lib) nosy: +DanilZ title: concurrent.futures.ProcessPoolExecutor and multiprocessing.pool.Pool fail with super -> concurrent.futures.ProcessPoolExecutor state=finished raised error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:19:17 2020 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiBCcm/FvmVr?=) Date: Mon, 28 Sep 2020 18:19:17 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock Message-ID: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> New submission from V?clav Bro?ek : Recently we cleaned up the following typos in mocks in unittests of our codebase: * Wrong prefixes of mock asserts: asert/aseert/assrt -> assert * Wrong attribute names around asserts: autospect/auto_spec -> autospec, set_spec -> spec_set Especially the asserts are dangerous, because a misspelled assert_called will fail silently. We found real bugs in production code which were masked by a misspelled assert_called. There is prior work done to report similar cases of assert misspellings with an AttributeError: https://github.com/testing-cabal/mock/commit/7c530f0d9aa48d2538501761098df7a5a8979a7d, and adding new cases will be an easy change. I suppose that adding similar error signalling for the wrong argument names will not be much harder. I'm prepared to implement it, if people of this project would be happy to have such checks. ---------- components: Library (Lib) messages: 377611 nosy: vabr2 priority: normal severity: normal status: open title: Check against misspellings of assert etc. in mock type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:41:04 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 28 Sep 2020 18:41:04 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1601318464.93.0.605753716225.issue41877@roundup.psfhosted.org> Vedran ?a?i? added the comment: How about we actually _solve_ the problem, instead of masking it with layer upon layer of obfuscation? Python has standalone functions. assert_called (and company) should just be functions, they shouldn't be methods, and the problem is solved elegantly. The whole reason the problem exists in the first place is that Java, where Python copied the API from, has no standalone functions. In Pythonic design, the problem shouldn't exist at all. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:41:35 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 18:41:35 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601318495.75.0.575288096047.issue41870@roundup.psfhosted.org> STINNER Victor added the comment: You can put ok<0 test in the if (nargs) branch, to avoid the test when nargs=0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:53:41 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 28 Sep 2020 18:53:41 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601319221.26.0.947972695891.issue40105@roundup.psfhosted.org> Tal Einat added the comment: New changeset ff9147d93b868f0e13b9fe14e2a76c2879f6787b by Jan Mazur in branch 'master': bpo-40105: ZipFile truncate in append mode with shorter comment (GH-19337) https://github.com/python/cpython/commit/ff9147d93b868f0e13b9fe14e2a76c2879f6787b ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:54:13 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Sep 2020 18:54:13 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601319253.71.0.280955629706.issue40105@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21467 pull_request: https://github.com/python/cpython/pull/22437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:54:05 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Sep 2020 18:54:05 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601319245.54.0.884335762291.issue40105@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21466 pull_request: https://github.com/python/cpython/pull/22436 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:54:51 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 28 Sep 2020 18:54:51 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601319291.5.0.474548544765.issue40105@roundup.psfhosted.org> Tal Einat added the comment: Thanks for the report and initial PR, Yudi! Thanks for the second PR, Jan! ---------- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 14:54:57 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 28 Sep 2020 18:54:57 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601319297.84.0.800584876703.issue40105@roundup.psfhosted.org> Change by Tal Einat : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 15:12:20 2020 From: report at bugs.python.org (Robert Haschke) Date: Mon, 28 Sep 2020 19:12:20 +0000 Subject: [issue41878] python3 fails to use custom dict-like object as symbols in eval() Message-ID: <1601320340.36.0.581578891193.issue41878@roundup.psfhosted.org> New submission from Robert Haschke : The attached file implements a custom dict-like class (MyDict) as a minimal example of code I am using in a larger codebase. Before you ask, why I reimplemented a dict-like object: The real code base employs a hierarchical dict, referencing recursively to the parent dict, if a key cannot be found in the current dict. The main code of the file defines two entries/variables for this dict: symbols = MyDict() symbols['abc'] = '[1, 2, 3]' symbols['xyz'] = 'abc + abc' and eval_text('xyz', symbols) should evaluate to the python expression as you would have evaluated those variables in a python interpreter. While this works for the first given expression (above), it fails for this one: symbols['xyz'] = '[abc[i]*abc[i] for i in [0, 1, 2]]' raising NameError: name 'abc' is not defined. The same code works perfectly in python 2.7. Hence, I assume this is a bug in python3. ---------- files: buggy.py messages: 377616 nosy: Robert Haschke priority: normal severity: normal status: open title: python3 fails to use custom dict-like object as symbols in eval() versions: Python 3.8 Added file: https://bugs.python.org/file49476/buggy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 15:18:46 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Sep 2020 19:18:46 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601320726.54.0.322351645451.issue40105@roundup.psfhosted.org> miss-islington added the comment: New changeset e4008404fbc0002c49becc565d42e93eca11dd75 by Miss Islington (bot) in branch '3.8': bpo-40105: ZipFile truncate in append mode with shorter comment (GH-19337) https://github.com/python/cpython/commit/e4008404fbc0002c49becc565d42e93eca11dd75 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 15:56:32 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Sep 2020 19:56:32 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601322992.88.0.939965702664.issue40105@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21468 pull_request: https://github.com/python/cpython/pull/22439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:04:47 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Sep 2020 20:04:47 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1601323487.75.0.580042052322.issue41773@roundup.psfhosted.org> Raymond Hettinger added the comment: I've discussed this with other developers and now agree that a test should be added. While the current code's handing of Inf or NaN is correct in a technical sense, it is neither intuitive or useful. Even though it will have a small time cost for the common case of two weights, we should add a test just after the check for the total being greater than zero: if not _isfinite(total): raise ValueError('Total of weights must be finite') Also edit the docs to say: Weights are assumed to be non-negative and finite. Ram, since this was your finding, do you want to make a PR for it (with a test, news entry, and doc edit)? ---------- resolution: not a bug -> status: closed -> open type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:11:36 2020 From: report at bugs.python.org (Ram Rachum) Date: Mon, 28 Sep 2020 20:11:36 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1601323896.04.0.478328247386.issue41773@roundup.psfhosted.org> Ram Rachum added the comment: Sounds good, I'm on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:12:58 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Sep 2020 20:12:58 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1601323978.48.0.600940824574.issue41877@roundup.psfhosted.org> Raymond Hettinger added the comment: V?clav, I support your suggestion and suggest that you move forward to prepare a PR. Vedran, this API has been set in stone for a long time, so changing is disruptive. If you really think the API needs to be redesigned, consider bringing it up on python-ideas. The proposal would need broad support to move forward. ---------- nosy: +michael.foord, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:15:35 2020 From: report at bugs.python.org (Nick Gaya) Date: Mon, 28 Sep 2020 20:15:35 +0000 Subject: [issue41879] Outdated description of async iterables in documentation of async for statement Message-ID: <1601324135.53.0.963696566223.issue41879@roundup.psfhosted.org> New submission from Nick Gaya : The documentation for the `async for` statement incorrectly states that "An asynchronous iterable is able to call asynchronous code in its iter implementation". Actually, this behavior was deprecated in Python 3.6 and removed in Python 3.7. As of Python 3.7, the `__aiter__()` method must return an asynchronous iterator directly. Suggested fix: Update the `async for` statement description for Python 3.7+ to match the "Asynchronous Iterators" section in the data model documentation. > An :term:`asynchronous iterator` can call asynchronous code in its *next* method. Relevant documentation: - https://docs.python.org/3/reference/compound_stmts.html#the-async-for-statement - https://docs.python.org/3/reference/datamodel.html#asynchronous-iterators ---------- assignee: docs at python components: Documentation messages: 377621 nosy: docs at python, nickgaya priority: normal severity: normal status: open title: Outdated description of async iterables in documentation of async for statement versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:15:56 2020 From: report at bugs.python.org (Ben Wolsieffer) Date: Mon, 28 Sep 2020 20:15:56 +0000 Subject: [issue41880] Get Python include directories from sysconfigdata Message-ID: <1601324156.19.0.410608433996.issue41880@roundup.psfhosted.org> New submission from Ben Wolsieffer : The distutils.sysconfig.get_python_inc() function finds headers relative to sys.base_prefix or sys.base_exec_prefix. This causes problems when cross-compiling extension modules because Python's headers are not platform independent. Instead, get_python_inc() should use the INCLUDEPY and CONFINCLUDEPY variables from sysconfigdata to find headers. The _PYTHON_SYSCONFIGDATA_NAME environment variable can then be used to make build arch Python load sysconfigdata from host arch Python. ---------- components: Cross-Build, Distutils messages: 377622 nosy: Alex.Willmer, benwolsieffer, dstufft, eric.araujo priority: normal severity: normal status: open title: Get Python include directories from sysconfigdata type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:18:50 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Sep 2020 20:18:50 +0000 Subject: [issue40105] Updating zip comment doesn't truncate the zip file In-Reply-To: <1585514903.71.0.609611507951.issue40105@roundup.psfhosted.org> Message-ID: <1601324330.34.0.837208987377.issue40105@roundup.psfhosted.org> miss-islington added the comment: New changeset 048f54dc75d51e8a1c5822ab7b2828295192aaa5 by Miss Islington (bot) in branch '3.9': bpo-40105: ZipFile truncate in append mode with shorter comment (GH-19337) https://github.com/python/cpython/commit/048f54dc75d51e8a1c5822ab7b2828295192aaa5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:25:48 2020 From: report at bugs.python.org (Ben Wolsieffer) Date: Mon, 28 Sep 2020 20:25:48 +0000 Subject: [issue41880] Get Python include directories from sysconfigdata In-Reply-To: <1601324156.19.0.410608433996.issue41880@roundup.psfhosted.org> Message-ID: <1601324748.33.0.0749296283625.issue41880@roundup.psfhosted.org> Change by Ben Wolsieffer : ---------- keywords: +patch pull_requests: +21469 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:27:15 2020 From: report at bugs.python.org (Ram Rachum) Date: Mon, 28 Sep 2020 20:27:15 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1601324835.56.0.346358429651.issue41773@roundup.psfhosted.org> Change by Ram Rachum : ---------- keywords: +patch pull_requests: +21470 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/22441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:31:39 2020 From: report at bugs.python.org (Tal Einat) Date: Mon, 28 Sep 2020 20:31:39 +0000 Subject: [issue41851] tkinter: add font equal methods In-Reply-To: <1600946839.14.0.547852459363.issue41851@roundup.psfhosted.org> Message-ID: <1601325099.38.0.460734267991.issue41851@roundup.psfhosted.org> Change by Tal Einat : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:39:53 2020 From: report at bugs.python.org (Kevin Ardath) Date: Mon, 28 Sep 2020 20:39:53 +0000 Subject: [issue41881] New Line escape issue in raw strings Message-ID: <1601325593.83.0.504309665752.issue41881@roundup.psfhosted.org> New submission from Kevin Ardath : When attempting to concatenate some strings with a new line, I observed that formatting braces in a raw string skipped a new line escape: print(r'{{}}\nx'.format()) Produces: {}\nx Rather than: {} x ---------- messages: 377624 nosy: ardath.kevin priority: normal severity: normal status: open title: New Line escape issue in raw strings type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:40:03 2020 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 28 Sep 2020 20:40:03 +0000 Subject: [issue41877] Check against misspellings of assert etc. in mock In-Reply-To: <1601317157.88.0.730935461305.issue41877@roundup.psfhosted.org> Message-ID: <1601325603.49.0.346751873191.issue41877@roundup.psfhosted.org> Vedran ?a?i? added the comment: It would be a valid argument if the API _worked_. Obviously, it doesn't. Every few years, the same story repeats. "We've found even more missspellings of assert, we need to add them too. They cause real bugs in our tests." I have a strong feeling it will never end. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:41:33 2020 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 28 Sep 2020 20:41:33 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601325693.07.0.745756150051.issue41875@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 24ba3b0df5e5f2f237d7b23b4017ba12f16320ae by Dong-hee Na in branch 'master': bpo-41875: Use __builtin_unreachable when possible (GH-22433) https://github.com/python/cpython/commit/24ba3b0df5e5f2f237d7b23b4017ba12f16320ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:41:50 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Sep 2020 20:41:50 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601325710.67.0.742560280453.issue41875@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21471 pull_request: https://github.com/python/cpython/pull/22442 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:54:35 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Sep 2020 20:54:35 +0000 Subject: [issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment In-Reply-To: <1575658185.88.0.621824601443.issue38989@roundup.psfhosted.org> Message-ID: <1601326475.13.0.982764450527.issue38989@roundup.psfhosted.org> Steve Dower added the comment: I'm closing this as external, as the canonical source for platform tags is now the packaging library. Either pip and/or distlib should switch to using that library or the logic included (which I'll note is considerably more complex - but also more well defined and tested - than what is in distutils). ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 16:57:07 2020 From: report at bugs.python.org (Steve Dower) Date: Mon, 28 Sep 2020 20:57:07 +0000 Subject: [issue41738] MIME type for *.zip becomes application/x-zip-compressed on Windows In-Reply-To: <1599493521.86.0.992768213147.issue41738@roundup.psfhosted.org> Message-ID: <1601326627.71.0.196179009469.issue41738@roundup.psfhosted.org> Steve Dower added the comment: mimetype uses the system database for MIME types, which on Windows is application/x-zip-compressed, so this is by design. If you have a need to specify a MIME type that does not match the system you're on, you'll need your own logic. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 17:05:28 2020 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Sep 2020 21:05:28 +0000 Subject: [issue40554] Add escape to the glossary? In-Reply-To: <1588887417.08.0.726428643093.issue40554@roundup.psfhosted.org> Message-ID: <1601327128.16.0.926501468055.issue40554@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 3.0 -> 4.0 pull_requests: +21472 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 17:15:00 2020 From: report at bugs.python.org (Nick Gaya) Date: Mon, 28 Sep 2020 21:15:00 +0000 Subject: [issue39027] run_coroutine_threadsafe uses wrong TimeoutError In-Reply-To: <1576101847.74.0.586846433042.issue39027@roundup.psfhosted.org> Message-ID: <1601327700.29.0.378857501648.issue39027@roundup.psfhosted.org> Nick Gaya added the comment: @msg358296: > IMO, it seems rather counter-intuitive to have to specify `concurrent.futures.TimeoutError` when using a timeout for the future returned by `run_coroutine_threadsafe()`. I think that's expected, given that the function returns a `concurrent.futures.Future` object. The `Future.result()` method behaves the same regardless of the executor. @avsetlov: > futures._chain_future() should convert exceptions. Seems _convert_future_exc() does this work already but maybe it fails somehow. We need to investigate more. The `_convert_future_exc()` only converts `concurrent.futures` exceptions to `asyncio` exceptions, not the reverse. I'm not sure if this is intentional or not. With the current behavior there are two types of timeout errors that can occur in the example snippet: * If the coroutine itself throws an `asyncio.exceptions.TimeoutError`, this will be propagated as-is to the `concurrent.futures.Future` object and thrown by `future.result()`. * If the coroutine does not terminate within the timeout supplied to `future.result()`, then the method will throw a `concurrent.futures.TimeoutError` without changing the state of the future or the associated coroutine. It's only necessary to cancel the future in the second case, as in the first case it's already in a finished state. So the example should catch `concurrent.futures.TimeoutError` rather than `asyncio.TimeoutError`. ---------- nosy: +nickgaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 17:39:08 2020 From: report at bugs.python.org (Vladimir Matveev) Date: Mon, 28 Sep 2020 21:39:08 +0000 Subject: [issue41756] Do not always use exceptions to return result from coroutine In-Reply-To: <1599786636.95.0.884410425349.issue41756@roundup.psfhosted.org> Message-ID: <1601329148.02.0.950465620155.issue41756@roundup.psfhosted.org> Change by Vladimir Matveev : ---------- pull_requests: +21473 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/22443 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 17:41:18 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 21:41:18 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601329278.82.0.553327167881.issue41842@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d332e7b8164c3c9c885b9e631f33d9517b628b75 by Hai Shi in branch 'master': bpo-41842: Add codecs.unregister() function (GH-22360) https://github.com/python/cpython/commit/d332e7b8164c3c9c885b9e631f33d9517b628b75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:05:10 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:05:10 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601330710.95.0.928644536723.issue41861@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cb6db8b6ae47dccc1aa97830d0f05d29f31e0cbc by Erlend Egeberg Aasland in branch 'master': bpo-41861: Convert _sqlite3 PrepareProtocolType to heap type (GH-22428) https://github.com/python/cpython/commit/cb6db8b6ae47dccc1aa97830d0f05d29f31e0cbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:06:33 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:06:33 +0000 Subject: [issue41170] Use strnlen instead of strlen when the size i known. In-Reply-To: <1593565697.06.0.841082636792.issue41170@roundup.psfhosted.org> Message-ID: <1601330793.94.0.441956886941.issue41170@roundup.psfhosted.org> STINNER Victor added the comment: PR 21236 was closed by his author, can this issue be closed? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:08:46 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:08:46 +0000 Subject: [issue41170] Use strnlen instead of strlen when the size i known. In-Reply-To: <1593565697.06.0.841082636792.issue41170@roundup.psfhosted.org> Message-ID: <1601330926.12.0.0889584560728.issue41170@roundup.psfhosted.org> STINNER Victor added the comment: "Use strnlen instead of strlen when the size i known" rationale was "This PR changes strlen to strnlen so no buffer overruns are made when there's no null terminator", but strlen() was not called whne the string was not null terminated. Serhiy wrote that strnlen() can be faster and that can be slower... If the goal is an optimization, a benchmark should prove it (on at least one platform). https://github.com/python/cpython/pull/21236#issuecomment-699609949 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:10:32 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 28 Sep 2020 22:10:32 +0000 Subject: [issue40554] Add escape to the glossary? In-Reply-To: <1588887417.08.0.726428643093.issue40554@roundup.psfhosted.org> Message-ID: <1601331032.95.0.194164666329.issue40554@roundup.psfhosted.org> Raymond Hettinger added the comment: For the reasons mentioned by Inada, I don't think this should be added. The term "escape" means many different things in different contexts. To the extent the term needs to be defined, it should be done in the docs for those contexts (i.e. regular expression escapes should be talked about in the regex docs). Side note: It is not the purpose of the glossary to define every term in computer science. The more fluff we add to the glossary, the harder it becomes to rely the glossary and learn Python specific terms. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:16:32 2020 From: report at bugs.python.org (miss-islington) Date: Mon, 28 Sep 2020 22:16:32 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601331392.5.0.973847262626.issue41875@roundup.psfhosted.org> miss-islington added the comment: New changeset cca896e13b230a934fdb709b7f10c5451ffc25ba by Miss Islington (bot) in branch '3.9': bpo-41875: Use __builtin_unreachable when possible (GH-22433) https://github.com/python/cpython/commit/cca896e13b230a934fdb709b7f10c5451ffc25ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:17:45 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:17:45 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601331465.91.0.101849992496.issue41875@roundup.psfhosted.org> STINNER Victor added the comment: FYI __builtin_unreachable() is used since this change, of bpo-38249: commit eebaa9bfc593d5a46b293c1abd929fbfbfd28199 Author: Serhiy Storchaka Date: Mon Mar 9 20:49:52 2020 +0200 bpo-38249: Expand Py_UNREACHABLE() to __builtin_unreachable() in the release mode. (GH-16329) Co-authored-by: Victor Stinner ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:20:32 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:20:32 +0000 Subject: [issue41875] __builtin_unreachable error in gcc 4.4.5 In-Reply-To: <1601291751.72.0.463788017117.issue41875@roundup.psfhosted.org> Message-ID: <1601331632.64.0.905894276771.issue41875@roundup.psfhosted.org> STINNER Victor added the comment: Lukasz: Would you mind to cherry-pick the commit cca896e13b230a934fdb709b7f10c5451ffc25ba in 3.9.0 final? ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:21:00 2020 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 28 Sep 2020 22:21:00 +0000 Subject: [issue41861] Convert sqlite3 to PEP 384 In-Reply-To: <1601036291.36.0.740279655223.issue41861@roundup.psfhosted.org> Message-ID: <1601331660.36.0.220827008613.issue41861@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +21474 pull_request: https://github.com/python/cpython/pull/22444 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:21:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Sep 2020 22:21:15 +0000 Subject: [issue40554] Add escape to the glossary? In-Reply-To: <1588887417.08.0.726428643093.issue40554@roundup.psfhosted.org> Message-ID: <1601331675.81.0.205329858161.issue40554@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Raymond. Are there problems with understanding the term "escape" in some context? If yes, then we perhaps need to clarify the corresponding place in the documentation. But if there is a problem with understanding the general word "escape", I think we should not do anything. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:25:13 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:25:13 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601331913.15.0.301273134873.issue41842@roundup.psfhosted.org> STINNER Victor added the comment: PR 22360 required 15 iterations (15 commits) and it changes a lot of code. I wouldn't say that it's an "easy (C)" issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:25:15 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Sep 2020 22:25:15 +0000 Subject: [issue41881] New Line escape issue in raw strings In-Reply-To: <1601325593.83.0.504309665752.issue41881@roundup.psfhosted.org> Message-ID: <1601331915.13.0.383852135345.issue41881@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is expected behavior. \n in a raw string means two characters, backslash and "n", not a single newline character. Use non-raw string to embed a newline character. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:27:25 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:27:25 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601332045.33.0.554766720742.issue41842@roundup.psfhosted.org> STINNER Victor added the comment: codecs.unregister() is needed to write unit tests: see PR 19069 of bpo-39337. I don't see a strong need to add a new codecs.unregister_error() function, excpet for completeness. I don't think that completeness is enough to justify to add the function, but feel free to open a new issue if you consider that it's really needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:27:54 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:27:54 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601332074.49.0.0875175574183.issue41842@roundup.psfhosted.org> STINNER Victor added the comment: The function is added, I close the issue. Thanks Hai Shi. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:28:43 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:28:43 +0000 Subject: [issue41842] Add codecs.unregister() to unregister a codec search function In-Reply-To: <1600865818.68.0.279745610542.issue41842@roundup.psfhosted.org> Message-ID: <1601332123.59.0.0408701395088.issue41842@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:42:24 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:42:24 +0000 Subject: [issue39603] [security][ CVE-2020-26116] http.client: HTTP Header Injection in the HTTP method In-Reply-To: <1581362975.61.0.33794022777.issue39603@roundup.psfhosted.org> Message-ID: <1601332944.89.0.377832864588.issue39603@roundup.psfhosted.org> STINNER Victor added the comment: Mauro Matteo Cascella: "CVE-2020-26116 has been requested/assigned for this flaw via MITRE form: https://cveform.mitre.org/ I suggest mentioning it in the related vulnerability page: https://python-security.readthedocs.io/vuln/http-header-injection-method.html" Thanks, done. ---------- title: [security] http.client: HTTP Header Injection in the HTTP method -> [security][ CVE-2020-26116] http.client: HTTP Header Injection in the HTTP method _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:46:59 2020 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Sep 2020 22:46:59 +0000 Subject: [issue41871] Add PyList_Remove() in listobject.c In-Reply-To: <1601213406.91.0.754630281807.issue41871@roundup.psfhosted.org> Message-ID: <1601333219.74.0.85720755294.issue41871@roundup.psfhosted.org> STINNER Victor added the comment: I proposed to Hai Shi in his PR to add PyList_Remove() since I was surprised that the feature is exposed in Python but not at the C level. > You always can use PyObject_CallMethod(). It is not a method called in tight loop for which the overhead of calling method is significant. He reimplemented the function by copying items into a new list except of the item which should be removed. I expect that PyList_SetSlice() is more efficient than creating a new list, it modifies the list in-place. I'm fine with rejecting this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 18:57:37 2020 From: report at bugs.python.org (Samuel Freilich) Date: Mon, 28 Sep 2020 22:57:37 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1601333857.88.0.965150846794.issue41114@roundup.psfhosted.org> Samuel Freilich added the comment: > I think it's reasonable to discuss the problem on python-ideas rather than on a bugs issue, when it's not obvious what the right solution is. I did start a thread there. Don't object to that, if that's a better forum for this sort of thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 19:04:08 2020 From: report at bugs.python.org (Mikhail Terekhov) Date: Mon, 28 Sep 2020 23:04:08 +0000 Subject: [issue41882] CCompiler.has_function does not delete temporary files Message-ID: <1601334248.35.0.2911303448.issue41882@roundup.psfhosted.org> New submission from Mikhail Terekhov : CCompiler.has_function does not delete temporary files. Depending on the check result it leaves temporary C source, object and executable files. ---------- components: Distutils messages: 377646 nosy: dstufft, eric.araujo, termim priority: normal severity: normal status: open title: CCompiler.has_function does not delete temporary files type: resource usage versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 19:09:19 2020 From: report at bugs.python.org (Mikhail Terekhov) Date: Mon, 28 Sep 2020 23:09:19 +0000 Subject: [issue41882] CCompiler.has_function does not delete temporary files In-Reply-To: <1601334248.35.0.2911303448.issue41882@roundup.psfhosted.org> Message-ID: <1601334559.9.0.899437747276.issue41882@roundup.psfhosted.org> Change by Mikhail Terekhov : ---------- keywords: +patch pull_requests: +21475 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22446 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 20:56:02 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 29 Sep 2020 00:56:02 +0000 Subject: [issue41873] Add vectorcall for float() In-Reply-To: <1601283308.14.0.0300181585929.issue41873@roundup.psfhosted.org> Message-ID: <1601340962.16.0.951574580222.issue41873@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset e8acc355d430b45f1c3ff83312e72272262a854f by Dennis Sweeney in branch 'master': bpo-41873: Add vectorcall for float() (GH-22432) https://github.com/python/cpython/commit/e8acc355d430b45f1c3ff83312e72272262a854f ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 20:58:13 2020 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 29 Sep 2020 00:58:13 +0000 Subject: [issue41873] Add vectorcall for float() In-Reply-To: <1601283308.14.0.0300181585929.issue41873@roundup.psfhosted.org> Message-ID: <1601341093.0.0.546330907324.issue41873@roundup.psfhosted.org> Dong-hee Na added the comment: Now float() is faster! Thank you for your contribution, Dennis :) And thank you Victor as co-reviewer! ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 21:07:04 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Sep 2020 01:07:04 +0000 Subject: [issue40554] Add escape to the glossary? In-Reply-To: <1588887417.08.0.726428643093.issue40554@roundup.psfhosted.org> Message-ID: <1601341624.93.0.943472253825.issue40554@roundup.psfhosted.org> Raymond Hettinger added the comment: s/rely/read/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 21:32:18 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Sep 2020 01:32:18 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1601343138.39.0.893572095398.issue41773@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b0dfc7581697f20385813582de7e92ba6ba0105f by Ram Rachum in branch 'master': bpo-41773: Raise exception for non-finite weights in random.choices(). (GH-22441) https://github.com/python/cpython/commit/b0dfc7581697f20385813582de7e92ba6ba0105f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 21:33:05 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Sep 2020 01:33:05 +0000 Subject: [issue41773] Clarify handling of infinity and nan in random.choices In-Reply-To: <1599924677.89.0.407491787221.issue41773@roundup.psfhosted.org> Message-ID: <1601343185.71.0.0881152318509.issue41773@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the PR and for filing the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 22:16:16 2020 From: report at bugs.python.org (Kevin Ardath) Date: Tue, 29 Sep 2020 02:16:16 +0000 Subject: [issue41881] New Line escape issue in raw strings In-Reply-To: <1601325593.83.0.504309665752.issue41881@roundup.psfhosted.org> Message-ID: <1601345776.25.0.686240467187.issue41881@roundup.psfhosted.org> Change by Kevin Ardath : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 23:00:11 2020 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 29 Sep 2020 03:00:11 +0000 Subject: [issue41879] Outdated description of async iterables in documentation of async for statement In-Reply-To: <1601324135.53.0.963696566223.issue41879@roundup.psfhosted.org> Message-ID: <1601348411.35.0.0201636157311.issue41879@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +asyncio nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 28 23:40:06 2020 From: report at bugs.python.org (Ian M. Hoffman) Date: Tue, 29 Sep 2020 03:40:06 +0000 Subject: [issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes Message-ID: <1601350806.96.0.0908350548542.issue41883@roundup.psfhosted.org> New submission from Ian M. Hoffman : A description of the problem, complete example code for reproducing it, and a work-around are available on SO at the link: https://stackoverflow.com/questions/64083376/python-memory-corruption-after-successful-return-from-a-ctypes-foreign-function In summary: (1) create an array within a Python function, (2) create a ctypes.Structure with a pointer to that array, (3) return that struct from the Python function, (4) pass the struct out and back to a foreign function, (5) Python can successfully dereference the return from the foreign function, then (6) Python crashes. As far as I can tell, when the array in the function goes out of scope at the end of the function, the pointer to it in the struct becomes dangling ... but the dangling doesn't catch up with Python until the very end when the Python struct finally goes out of scope in Python and the GC can't find its pointee. I've reproduced this on Windows and linux with gcc- and MSVC-compiled Python 3.6 and 3.8. Perhaps it is not good practice on my part to have let the array go out of scope, but perhaps a warning from Python (or at least some internal awareness that the memory is no longer addressed) is in order so that Python doesn't crash upon failing to free it. This may be related to #39217; I can't tell. ---------- components: ctypes messages: 377652 nosy: NankerPhelge priority: normal severity: normal status: open title: ctypes pointee goes out of scope, then pointer in struct dangles and crashes type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 00:46:11 2020 From: report at bugs.python.org (Robert Haschke) Date: Tue, 29 Sep 2020 04:46:11 +0000 Subject: [issue41878] python3 fails to use custom mapping object as symbols in eval() In-Reply-To: <1601320340.36.0.581578891193.issue41878@roundup.psfhosted.org> Message-ID: <1601354771.67.0.486953895644.issue41878@roundup.psfhosted.org> Robert Haschke added the comment: Looks like the list generator is considered as a new nested scope, which prohibits access to local variables? This basic expression, passing local symbols only, fails as well: eval('[abc[i]*abc[i] for i in [0, 1, 2]]', {}, dict(abc=[1, 2, 3])) while this one, passing dict as global symbols, works: eval('[abc[i]*abc[i] for i in [0, 1, 2]]', dict(abc=[1, 2, 3])) However, passing globals must be a real dict. So I cannot simply pass my custom mapping to globals. ---------- title: python3 fails to use custom dict-like object as symbols in eval() -> python3 fails to use custom mapping object as symbols in eval() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 01:02:54 2020 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 Sep 2020 05:02:54 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601355774.54.0.722556386872.issue41774@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 5b0181d1f6474c2cb9b80bdaf3bc56a78bf5fbe7 by Terry Jan Reedy in branch 'master': bpo-41774: Add programming FAQ entry (GH-22402) https://github.com/python/cpython/commit/5b0181d1f6474c2cb9b80bdaf3bc56a78bf5fbe7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 01:03:07 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Sep 2020 05:03:07 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601355787.59.0.665636515763.issue41774@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +21478 pull_request: https://github.com/python/cpython/pull/22448 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 01:03:00 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Sep 2020 05:03:00 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601355780.09.0.618306285527.issue41774@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +21477 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22447 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 01:11:14 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Sep 2020 05:11:14 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601356274.42.0.0263697912432.issue41774@roundup.psfhosted.org> miss-islington added the comment: New changeset d50a0700265536a20bcce3fb108c954746d97625 by Miss Islington (bot) in branch '3.8': bpo-41774: Add programming FAQ entry (GH-22402) https://github.com/python/cpython/commit/d50a0700265536a20bcce3fb108c954746d97625 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 01:27:13 2020 From: report at bugs.python.org (miss-islington) Date: Tue, 29 Sep 2020 05:27:13 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601357233.85.0.938476747439.issue41774@roundup.psfhosted.org> miss-islington added the comment: New changeset 868c8e41eb1d7dc032679ae06e62c0d60edd7725 by Miss Islington (bot) in branch '3.9': bpo-41774: Add programming FAQ entry (GH-22402) https://github.com/python/cpython/commit/868c8e41eb1d7dc032679ae06e62c0d60edd7725 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 01:46:01 2020 From: report at bugs.python.org (Eryk Sun) Date: Tue, 29 Sep 2020 05:46:01 +0000 Subject: [issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes In-Reply-To: <1601350806.96.0.0908350548542.issue41883@roundup.psfhosted.org> Message-ID: <1601358361.09.0.770981761989.issue41883@roundup.psfhosted.org> Eryk Sun added the comment: I think this is a numpy issue. Its data_as() method doesn't support the ctypes _objects protocol to keep the numpy array referenced by subsequently created ctypes objects. For example: import ctypes import numpy as np dtype = ctypes.c_double ptype = ctypes.POINTER(dtype) class array_struct(ctypes.Structure): _fields_ = (('dim1', ctypes.c_int), ('dim2', ctypes.c_int), ('ptr', ptype)) n = 12 m = 50 a = np.ones((n, m), dtype=dtype) p = a.ctypes.data_as(ptype) data_as() is implemented as a cast() of the ctypes._data pointer. This is a c_void_p instance for the base address of the numpy array, but it doesn't reference the numpy array object itself. The pointer returned by cast() references this _data pointer in its _objects: >>> p._objects {139993690976448: c_void_p(42270224)} data_as() also sets a reference to the numpy array object as a non-ctypes _arr attribute: >>> p._arr is a True This _arr attribute keeps the array referenced for the particular instance, but ctypes isn't aware of it. When the object returned by data_as() is set in a struct, ctypes only carries forward the c_void_p reference from _objects that it's aware of: >>> a_wrap1 = array_struct(n, m, p) >>> a_wrap1._objects {'2': {139993690976448: c_void_p(42270224)}} It would be sufficient to keep the numpy array alive if this c_void_p instance referenced the array, but it doesn't. Alternatively, data_as() could update the _objects dict to reference the array. For example: >>> p._objects['1'] = a >>> a_wrap2 = array_struct(n, m, p) >>> a_wrap2._objects['2']['1'] is a True ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 03:21:09 2020 From: report at bugs.python.org (diohabara) Date: Tue, 29 Sep 2020 07:21:09 +0000 Subject: [issue41876] Add __repr__ for Tkinter Font objects In-Reply-To: <1601307207.95.0.784900613947.issue41876@roundup.psfhosted.org> Message-ID: <1601364069.64.0.801386538584.issue41876@roundup.psfhosted.org> diohabara added the comment: Hi, Storchaka!. I would like to tackle this issue. Because I am new to Python bug tracking, I am unsure that this is the right approach to bug fixing. ---------- nosy: +diohabara _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 03:34:06 2020 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 29 Sep 2020 07:34:06 +0000 Subject: [issue41295] CPython 3.8.4 regression on __setattr__ in multiinheritance with metaclasses In-Reply-To: <1594738636.27.0.745451783859.issue41295@roundup.psfhosted.org> Message-ID: <1601364846.9.0.148053017856.issue41295@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 05:09:30 2020 From: report at bugs.python.org (Mark Shannon) Date: Tue, 29 Sep 2020 09:09:30 +0000 Subject: [issue41670] ceval traces code differently with USE_COMPUTED_GOTOS In-Reply-To: <1598827771.16.0.682087136522.issue41670@roundup.psfhosted.org> Message-ID: <1601370570.83.0.181793907008.issue41670@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 17b5be0c0a3f74141014e06a660f1b5ddb002fec by Mark Shannon in branch 'master': bpo-41670: Remove outdated predict macro invocation. (GH-22026) https://github.com/python/cpython/commit/17b5be0c0a3f74141014e06a660f1b5ddb002fec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 06:11:51 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 29 Sep 2020 10:11:51 +0000 Subject: [issue41876] Add __repr__ for Tkinter Font objects In-Reply-To: <1601307207.95.0.784900613947.issue41876@roundup.psfhosted.org> Message-ID: <1601374311.63.0.390536930323.issue41876@roundup.psfhosted.org> E. Paine added the comment: Serhiy, while I agree this is an enhancement, I don't see that it would break *anyone's* code (this will mostly just affect the REPL output) so is it worth considering a backport? Diohabara, the Python devguide (https://devguide.python.org/) is a very good place to start. The first contribution is always the hardest so please do ask if you need clarification on something. Likely the first thing you will need to do, though, is sign the CLA which means we can legally accept your patch. ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 06:25:41 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Sep 2020 10:25:41 +0000 Subject: [issue41876] Add __repr__ for Tkinter Font objects In-Reply-To: <1601307207.95.0.784900613947.issue41876@roundup.psfhosted.org> Message-ID: <1601375141.91.0.355617131403.issue41876@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a new feature. We do not backport new features to old versions unless they fix some design bug. Nothing bad will happen if we DO NOT backport it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 06:35:53 2020 From: report at bugs.python.org (Anatoliy Platonov) Date: Tue, 29 Sep 2020 10:35:53 +0000 Subject: [issue41876] Add __repr__ for Tkinter Font objects In-Reply-To: <1601307207.95.0.784900613947.issue41876@roundup.psfhosted.org> Message-ID: <1601375753.4.0.15639130626.issue41876@roundup.psfhosted.org> Change by Anatoliy Platonov : ---------- keywords: +patch nosy: +p4m.dev nosy_count: 3.0 -> 4.0 pull_requests: +21479 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22450 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 07:13:15 2020 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 29 Sep 2020 11:13:15 +0000 Subject: [issue38989] pip install selects 32 bit wheels for 64 bit python if vcvarsall.bat amd64_x86 in environment In-Reply-To: <1575658185.88.0.621824601443.issue38989@roundup.psfhosted.org> Message-ID: <1601377995.47.0.50033849544.issue38989@roundup.psfhosted.org> Vinay Sajip added the comment: FYI I'm in the process of updating distlib to add the get_platform() / get_host_platform() distinction. The next release should have it. ---------- keywords: +3.5regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 08:02:49 2020 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 29 Sep 2020 12:02:49 +0000 Subject: [issue41878] python3 fails to use custom mapping object as symbols in eval() In-Reply-To: <1601320340.36.0.581578891193.issue41878@roundup.psfhosted.org> Message-ID: <1601380969.62.0.0892168478133.issue41878@roundup.psfhosted.org> Josh Rosenberg added the comment: Yes, list comprehensions having their own local scope was a change from Py2 to Py3. Python 2 did not do this for list comps initially, and it was left that way during the 2.x timeframe due to back compat constraints, but 2.x did it from the start for generator expressions, as well set and dict comps, and they were all made consistent for Py3. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 08:10:51 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 29 Sep 2020 12:10:51 +0000 Subject: [issue11414] Add import fix for email.Message In-Reply-To: <1299428963.38.0.740283733384.issue11414@psf.upfronthosting.co.za> Message-ID: <1601381451.49.0.657172650099.issue11414@roundup.psfhosted.org> Irit Katriel added the comment: I've added a PR with this fixer, which is quite a simple addition because the mechanism for such renames is already there. If we don't want to add features to lib2to3 (since I understand it will be deprecated in the future), then shall we instead close this issue as won't-do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 08:17:37 2020 From: report at bugs.python.org (Robert Haschke) Date: Tue, 29 Sep 2020 12:17:37 +0000 Subject: [issue41878] python3 fails to use custom mapping object as symbols in eval() In-Reply-To: <1601320340.36.0.581578891193.issue41878@roundup.psfhosted.org> Message-ID: <1601381857.48.0.466514591047.issue41878@roundup.psfhosted.org> Robert Haschke added the comment: Thanks, Josh, for this clarification. What is the suggested mitigation? Obviously, I need to pass all symbols from my hierarchical dictionary in a flattend version as a dict to globals. Or do you see another option? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 08:21:59 2020 From: report at bugs.python.org (Irit Katriel) Date: Tue, 29 Sep 2020 12:21:59 +0000 Subject: [issue26053] regression in pdb output between 2.7 and 3.5 In-Reply-To: <1452296621.32.0.373600761217.issue26053@psf.upfronthosting.co.za> Message-ID: <1601382119.15.0.418679004791.issue26053@roundup.psfhosted.org> Irit Katriel added the comment: As you see in the PR, this regression was in the commit I linked to which was made by Georg, but he has removed himself from the nosy list of this issue and was unavailable to review the PR when I asked him to. Can someone else review this? It's a 1-line fix (reverting to previous) plus unit test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 08:37:02 2020 From: report at bugs.python.org (pmp-p) Date: Tue, 29 Sep 2020 12:37:02 +0000 Subject: [issue36125] Cannot cross-compile to more featureful but same tune In-Reply-To: <1551196810.67.0.249603335877.issue36125@roundup.psfhosted.org> Message-ID: <1601383022.04.0.352500247947.issue36125@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 08:56:02 2020 From: report at bugs.python.org (Raymond Sit) Date: Tue, 29 Sep 2020 12:56:02 +0000 Subject: [issue41884] tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose to add mode argument Message-ID: <1601384162.52.0.6703641276.issue41884@roundup.psfhosted.org> New submission from Raymond Sit : `tempfile.TemporaryDirectory` always creates the directory with 0o700 permissions. So other applications which could run as a different user (i.e. root) cannot access the directory. To improve the usability I would like to add the option to set the permissions of the directory. Proposed Change is in the PR linked (https://github.com/python/cpython/pull/22451) ---------- components: Library (Lib) files: tempfile.py messages: 377667 nosy: ray-sit priority: normal pull_requests: 21480 severity: normal status: open title: tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose to add mode argument type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file49477/tempfile.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 09:20:53 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Sep 2020 13:20:53 +0000 Subject: [issue41884] tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose to add mode argument In-Reply-To: <1601384162.52.0.6703641276.issue41884@roundup.psfhosted.org> Message-ID: <1601385653.19.0.571157621072.issue41884@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can change permissions after creating the directory. The C function mkdtemp() creates the directory with permissions 0o700. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 10:38:34 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 29 Sep 2020 14:38:34 +0000 Subject: [issue41519] `pkgutil.get_data` causes future imports of children modules to fail. In-Reply-To: <1597091848.05.0.295677555121.issue41519@roundup.psfhosted.org> Message-ID: <1601390314.98.0.205980032624.issue41519@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +barry, brett.cannon, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 11:00:38 2020 From: report at bugs.python.org (dkreeft) Date: Tue, 29 Sep 2020 15:00:38 +0000 Subject: [issue41885] Unexpected behavior re.sub() with raw f-strings Message-ID: <1601391637.99.0.417746893206.issue41885@roundup.psfhosted.org> New submission from dkreeft : Steps to reproduce (Windows/Python 3.7.7): 1. Define replacement string that starts with an integer: REPLACEMENT = '12345' 2. Use re.sub() as follows: re.sub(r'([a-z]+)', fr"\1{REPLACEMENT}", 'something') 3. The outcome is not 'something12345' as expected, but 'J345'. Note that I am using the group in the replacement argument, which is a raw f-string. A quick investigation with other replacement strings renders similar unexpected behavior: REPLACEMENT = '1': leads to re.error (invalid group reference 11 at position 1) REPLACEMENT = '13': 'K' etc. So it seems like the f-string is evaluated first, yielding a string starting with an integer. Python then interprets the '\1' to indicate group 1 as '\1', which leads to the behavior described above. Even if this is by design, it seems confusing and makes using groups with re.sub() cumbersome if the replacement f-string starts with an integer. ---------- components: Regular Expressions, Windows messages: 377669 nosy: dkreeft, ezio.melotti, mrabarnett, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Unexpected behavior re.sub() with raw f-strings type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 11:19:39 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 29 Sep 2020 15:19:39 +0000 Subject: [issue41885] Unexpected behavior re.sub() with raw f-strings In-Reply-To: <1601391637.99.0.417746893206.issue41885@roundup.psfhosted.org> Message-ID: <1601392779.71.0.579896138723.issue41885@roundup.psfhosted.org> Eric V. Smith added the comment: f-strings are indeed evaluated when the value of the string is needed. Your example is equivalent to: >>> re.sub(r'([a-z]+)', fr"\112345", 'something') 'J345' As always with regexes, you need to be careful when dynamically composing them. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 11:35:02 2020 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 29 Sep 2020 15:35:02 +0000 Subject: [issue41885] Unexpected behavior re.sub() with raw f-strings In-Reply-To: <1601391637.99.0.417746893206.issue41885@roundup.psfhosted.org> Message-ID: <1601393702.81.0.12299781143.issue41885@roundup.psfhosted.org> Matthew Barnett added the comment: Arguments are evaluated first and then the results are passed to the function. That's true throughout the language. In this instance, you can use \g<1> in the replacement string to refer to group 1: re.sub(r'([a-z]+)', fr"\g<1>{REPLACEMENT}", 'something') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 11:40:21 2020 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 29 Sep 2020 15:40:21 +0000 Subject: [issue41885] Unexpected behavior re.sub() with raw f-strings In-Reply-To: <1601391637.99.0.417746893206.issue41885@roundup.psfhosted.org> Message-ID: <1601394021.7.0.322551877069.issue41885@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 11:47:15 2020 From: report at bugs.python.org (Ken Jin) Date: Tue, 29 Sep 2020 15:47:15 +0000 Subject: [issue31391] Forward-port test_xpickle from 2.7 to 3.x In-Reply-To: <1504838590.9.0.36921288266.issue31391@psf.upfronthosting.co.za> Message-ID: <1601394435.8.0.817342311303.issue31391@roundup.psfhosted.org> Change by Ken Jin : ---------- keywords: +patch nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +21481 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22452 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 11:55:27 2020 From: report at bugs.python.org (Thomas Holder) Date: Tue, 29 Sep 2020 15:55:27 +0000 Subject: [issue40075] _tkinter PythonCmd fails to acquire GIL In-Reply-To: <1585224969.87.0.649895216825.issue40075@roundup.psfhosted.org> Message-ID: <1601394927.93.0.38407343718.issue40075@roundup.psfhosted.org> Thomas Holder added the comment: I finally managed to test tstate_acquire.diff and it works perfectly! Should I close my pull request? Or update it with your patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 12:18:21 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 29 Sep 2020 16:18:21 +0000 Subject: [issue41774] While removing element from list using for and remove(), which has same items output is not right In-Reply-To: <1599927635.78.0.618314187509.issue41774@roundup.psfhosted.org> Message-ID: <1601396301.49.0.621233851152.issue41774@roundup.psfhosted.org> Raymond Hettinger added the comment: > If space is not an issue, the list comprehension may be fastest. I think there is still a misunderstanding here. The generator variant does not save space. It uses slightly *more* space than the list variant. The list_ass_slice()? function runs PySequence_Fast? on its input. If the input is already a list or tuple, it is returned immediately. If not, the iterator is run to exhaustion and a new list is built. Either way, when the actual update occurs, the source will be a list or tuple. ? https://github.com/rhettinger/cpython/blob/master/Objects/listobject.c#L597 ? https://github.com/rhettinger/cpython/blob/master/Objects/abstract.c#L2014 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 12:45:37 2020 From: report at bugs.python.org (Ian M. Hoffman) Date: Tue, 29 Sep 2020 16:45:37 +0000 Subject: [issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes In-Reply-To: <1601350806.96.0.0908350548542.issue41883@roundup.psfhosted.org> Message-ID: <1601397937.62.0.39072354581.issue41883@roundup.psfhosted.org> Ian M. Hoffman added the comment: You are correct. After further review, I found an older ctypes issue #12836 which was then enshrined in a workaround in the numpy.ndarray.ctypes interface to vanilla ctypes. https://numpy.org/doc/stable/reference/generated/numpy.ndarray.ctypes.html Numpy ctypes has both a `data` method for which "a reference will not be kept to the array" and a `data_as` method which has the desired behavior: "The returned pointer will keep a reference to the array." So, we've all got our workarounds. What remains is whether/how to implement a check in Python for the dangling pointer. I have no advice on that, except that it is desirable to avoid the fault crash, no matter who is to blame. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 12:55:45 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 29 Sep 2020 16:55:45 +0000 Subject: [issue40075] _tkinter PythonCmd fails to acquire GIL In-Reply-To: <1585224969.87.0.649895216825.issue40075@roundup.psfhosted.org> Message-ID: <1601398545.68.0.454453234279.issue40075@roundup.psfhosted.org> E. Paine added the comment: I do think we should close the existing PR (TBH, I completely forgot about this issue). Briefly looking again at the issue, it does indeed look like the GIL hasn't seen the thread before the attempted call to restore the tstate (as Steve said). If its alright with you, Thomas, I will open a new PR with the attached patch so it can be formally reviewed (though you can open the PR if you would prefer). ---------- components: -Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 13:11:18 2020 From: report at bugs.python.org (E. Paine) Date: Tue, 29 Sep 2020 17:11:18 +0000 Subject: [issue40075] _tkinter PythonCmd fails to acquire GIL In-Reply-To: <1585224969.87.0.649895216825.issue40075@roundup.psfhosted.org> Message-ID: <1601399478.95.0.813410471671.issue40075@roundup.psfhosted.org> Change by E. Paine : ---------- pull_requests: +21482 pull_request: https://github.com/python/cpython/pull/22453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 13:45:58 2020 From: report at bugs.python.org (Thomas Holder) Date: Tue, 29 Sep 2020 17:45:58 +0000 Subject: [issue40075] _tkinter PythonCmd fails to acquire GIL In-Reply-To: <1585224969.87.0.649895216825.issue40075@roundup.psfhosted.org> Message-ID: <1601401558.34.0.386971704007.issue40075@roundup.psfhosted.org> Thomas Holder added the comment: All good, thanks for opening PR 22453! I'll close my old PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 13:52:41 2020 From: report at bugs.python.org (Jason Haslam) Date: Tue, 29 Sep 2020 17:52:41 +0000 Subject: [issue35103] format_exception() doesn't work with PyErr_Fetch In-Reply-To: <1540803594.22.0.788709270274.issue35103@psf.upfronthosting.co.za> Message-ID: <1601401961.38.0.995795243895.issue35103@roundup.psfhosted.org> Jason Haslam added the comment: FWIW, I believe that you have to call `PyErr_NormalizeException` on the values returned from `PyErr_Fetch`. It looks like this is working as expected. ---------- nosy: +jason.haslam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 14:22:09 2020 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 29 Sep 2020 18:22:09 +0000 Subject: [issue41356] Convert bool.__new__ to argument clinic In-Reply-To: <1595325636.21.0.753393963516.issue41356@roundup.psfhosted.org> Message-ID: <1601403729.23.0.254765808757.issue41356@roundup.psfhosted.org> Dennis Sweeney added the comment: Superseded by https://bugs.python.org/issue41870 ---------- nosy: -larry resolution: -> works for me stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 14:49:06 2020 From: report at bugs.python.org (Brett Cannon) Date: Tue, 29 Sep 2020 18:49:06 +0000 Subject: [issue41519] `pkgutil.get_data` causes future imports of children modules to fail. In-Reply-To: <1597091848.05.0.295677555121.issue41519@roundup.psfhosted.org> Message-ID: <1601405346.5.0.0507674687445.issue41519@roundup.psfhosted.org> Brett Cannon added the comment: I wouldn't use pkgutil.get_data() -- or pkgutil, period -- and instead use importlib.resources to read data files from a package (which is available as a third-party package on PyPI if you need it for older versions of Python). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 15:09:39 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Sep 2020 19:09:39 +0000 Subject: [issue41871] Add PyList_Remove() in listobject.c In-Reply-To: <1601213406.91.0.754630281807.issue41871@roundup.psfhosted.org> Message-ID: <1601406579.68.0.978668371842.issue41871@roundup.psfhosted.org> Serhiy Storchaka added the comment: PyList_SetSlice() allows to remove an item by index, as in `del a[i]`. list.remove() searches the item by value and removes the first occurrence. You can implement it via PySequence_Index() and PyList_SetSlice(), but it is more convenient to just call the method. There is no C API for most methods of builtin types. C API is only added for the following cases: 1. Conversion between Python and C values. There is no other way to do this. PyLong_AsLong() and PyLong_FromLong(). 2. Access to general protocols. PyNumber_Add(), PyObject_GetAttr(), PySequence_etc. 3. Specialized versions for concrete types if they are much more convenient and performant. They are also often preceded the more general API. PyObject_GetItem() -> PySequence_GetItem() -> PyList_GetItem() -> PyList_GET_ITEM(). 4. High-level common operations. From PyImport_ImportModule() to PyRun_SimpleString(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 16:28:29 2020 From: report at bugs.python.org (Larry Hastings) Date: Tue, 29 Sep 2020 20:28:29 +0000 Subject: [issue41183] [3.5] Workaround or fix for SSL ".._KEY_TOO_SMALL" test failures In-Reply-To: <1593614146.46.0.384684767233.issue41183@roundup.psfhosted.org> Message-ID: <1601411309.39.0.925489256412.issue41183@roundup.psfhosted.org> Larry Hastings added the comment: A day and a half to go! Again, assuming that this won't be fixed and 3.5 will go EOL without supporting this year's Linux distro updates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 16:56:54 2020 From: report at bugs.python.org (Cory Nezin) Date: Tue, 29 Sep 2020 20:56:54 +0000 Subject: [issue41519] `pkgutil.get_data` causes future imports of children modules to fail. In-Reply-To: <1597091848.05.0.295677555121.issue41519@roundup.psfhosted.org> Message-ID: <1601413014.95.0.429636539275.issue41519@roundup.psfhosted.org> Cory Nezin added the comment: Wow, I did not know about that (probably because I've been stuck with Python3.6 for a while). Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 16:58:03 2020 From: report at bugs.python.org (da-woods) Date: Tue, 29 Sep 2020 20:58:03 +0000 Subject: [issue41886] PyType_Type is documented incorrectly Message-ID: <1601413083.05.0.277057194365.issue41886@roundup.psfhosted.org> New submission from da-woods : In the documentation PyType_Type is listed as a "PyObject*" (https://docs.python.org/3/c-api/type.html#c.PyType_Type). This is misleading because it is both not a pointer and is a PyTypeObject. Other type objects are documented as "PyTypeObject" (see unicode https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_Type as an arbitrary example) so I think the documentation is just inconsistent for PyType_Type alone. ---------- assignee: docs at python components: Documentation messages: 377683 nosy: da-woods, docs at python priority: normal severity: normal status: open title: PyType_Type is documented incorrectly versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 17:06:24 2020 From: report at bugs.python.org (Roundup Robot) Date: Tue, 29 Sep 2020 21:06:24 +0000 Subject: [issue41886] PyType_Type is documented incorrectly In-Reply-To: <1601413083.05.0.277057194365.issue41886@roundup.psfhosted.org> Message-ID: <1601413584.05.0.0400825151606.issue41886@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +21483 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 17:43:53 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 29 Sep 2020 21:43:53 +0000 Subject: [issue41826] test_peg_generator compilation warnings In-Reply-To: <1600710972.69.0.778161141813.issue41826@roundup.psfhosted.org> Message-ID: <1601415833.06.0.375978003857.issue41826@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +21484 pull_request: https://github.com/python/cpython/pull/22455 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 17:55:06 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 29 Sep 2020 21:55:06 +0000 Subject: [issue35103] format_exception() doesn't work with PyErr_Fetch In-Reply-To: <1540803594.22.0.788709270274.issue35103@psf.upfronthosting.co.za> Message-ID: <1601416506.82.0.631532349406.issue35103@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Closing as not a bug, feel free to reopen if we are missing something here :) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 17:54:35 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 29 Sep 2020 21:54:35 +0000 Subject: [issue35103] format_exception() doesn't work with PyErr_Fetch In-Reply-To: <1540803594.22.0.788709270274.issue35103@psf.upfronthosting.co.za> Message-ID: <1601416475.94.0.863495351681.issue35103@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > FWIW, I believe that you have to call `PyErr_NormalizeException` on the values returned from `PyErr_Fetch`. It looks like this is working as expected. Indeed that is the case, from the docs: Under certain circumstances, the values returned by PyErr_Fetch() below can be ?unnormalized?, meaning that *exc is a class object but *val is not an instance of the same class. This function can be used to instantiate the class in that case. If the values are already normalized, nothing happens. The delayed normalization is implemented to improve performance. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 17:56:09 2020 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 29 Sep 2020 21:56:09 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601416569.62.0.00984792429705.issue41870@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > You can put ok<0 test in the if (nargs) branch, to avoid the test when nargs=0. +1 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 21:25:52 2020 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 30 Sep 2020 01:25:52 +0000 Subject: [issue36424] Pickle fails on frozen dataclass that has slots In-Reply-To: <1553527088.82.0.636469633332.issue36424@roundup.psfhosted.org> Message-ID: <1601429152.56.0.489841920286.issue36424@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 6.0 -> 7.0 pull_requests: +21485 pull_request: https://github.com/python/cpython/pull/22459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 21:34:54 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 30 Sep 2020 01:34:54 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601429694.72.0.305872525266.issue41870@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +21486 pull_request: https://github.com/python/cpython/pull/22460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 21:46:57 2020 From: report at bugs.python.org (Saiyang Gou) Date: Wed, 30 Sep 2020 01:46:57 +0000 Subject: [issue41887] ast.literal_eval does not accept strings with leading whitespaces Message-ID: <1601430417.52.0.930336195437.issue41887@roundup.psfhosted.org> New submission from Saiyang Gou : `ast.literal_eval` does not accept code with leading whitespaces, while `eval` accepts them, which is an inconsistency. ``` >>> import ast >>> eval(' 1') 1 >>> ast.literal_eval(' 1') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/ast.py", line 62, in literal_eval node_or_string = parse(node_or_string, mode='eval') File "/usr/local/lib/python3.9/ast.py", line 50, in parse return compile(source, filename, mode, flags, File "", line 1 1 IndentationError: unexpected indent ``` ---------- components: Library (Lib) messages: 377687 nosy: gousaiyang priority: normal severity: normal status: open title: ast.literal_eval does not accept strings with leading whitespaces type: enhancement versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 23:06:11 2020 From: report at bugs.python.org (anthony shaw) Date: Wed, 30 Sep 2020 03:06:11 +0000 Subject: [issue41888] Duplicate Opcode value in master and 3.9rc2 Message-ID: <1601435171.42.0.708807939591.issue41888@roundup.psfhosted.org> New submission from anthony shaw : I noticed that HAVE_ARGUMENT and STORE_NAME have the same value (90) in Include/opcode.h in both the source code and in the 2bd31b5f revision (3.9.0rc2). This must be creating some weird bugs. https://github.com/python/cpython/blob/582aaf19e8b94a70c1f96792197770d604ba0fdf/Include/opcode.h#L70-L71 ---------- components: Interpreter Core messages: 377688 nosy: anthonypjshaw priority: normal severity: normal status: open title: Duplicate Opcode value in master and 3.9rc2 type: compile error versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 23:09:52 2020 From: report at bugs.python.org (anthony shaw) Date: Wed, 30 Sep 2020 03:09:52 +0000 Subject: [issue41888] Duplicate Opcode value in master and 3.9rc2 In-Reply-To: <1601435171.42.0.708807939591.issue41888@roundup.psfhosted.org> Message-ID: <1601435392.47.0.77092969928.issue41888@roundup.psfhosted.org> anthony shaw added the comment: No, this is intentional. sorry. closing https://github.com/python/cpython/blob/34cd3e9f6a87f9c50edac893b0d5ae46c4e48ee3/Doc/library/dis.rst#L1194 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 23:08:44 2020 From: report at bugs.python.org (anthony shaw) Date: Wed, 30 Sep 2020 03:08:44 +0000 Subject: [issue41888] Duplicate Opcode value in master and 3.9rc2 In-Reply-To: <1601435171.42.0.708807939591.issue41888@roundup.psfhosted.org> Message-ID: <1601435324.86.0.0358202113415.issue41888@roundup.psfhosted.org> anthony shaw added the comment: Or is this some sort of obscure month python reference!? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 23:10:04 2020 From: report at bugs.python.org (anthony shaw) Date: Wed, 30 Sep 2020 03:10:04 +0000 Subject: [issue41888] Duplicate Opcode value in master and 3.9rc2 In-Reply-To: <1601435171.42.0.708807939591.issue41888@roundup.psfhosted.org> Message-ID: <1601435404.57.0.714297983896.issue41888@roundup.psfhosted.org> Change by anthony shaw : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 23:49:55 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 30 Sep 2020 03:49:55 +0000 Subject: [issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes In-Reply-To: <1601350806.96.0.0908350548542.issue41883@roundup.psfhosted.org> Message-ID: <1601437795.92.0.49548477251.issue41883@roundup.psfhosted.org> Eryk Sun added the comment: > `data_as` method which has the desired behavior: "The returned > pointer will keep a reference to the array." I don't think it's the desired behavior at all. data_as() sets an _arr attribute of which ctypes isn't aware. It should cast the address to the given type and manually set the array reference in the _objects dict, which ctypes will automatically carry forward in all instances of aggregate types (structs and arrays) that reference the numpy array. For example: >>> p = a.ctypes.data_as(ptype) >>> p._objects['1'] = a Adding p to an array carries its _objects dict forward: >>> ptarr = (ptype * 1)(p) >>> ptarr._objects['0']['1'] is a True If the returned pointer is cast() again, then bpo-12836 is an issue. For example: >>> p2 = ctypes.cast(p, ctypes.c_void_p) >>> p._objects is p2._objects True >>> for k in p._objects: ... if p._objects[k] is p: ... print('circular reference') ... circular reference That needs to be fixed. But relying on _arr instead of correctly integrating with ctypes isn't a good idea, IMO. Work around the actual bug instead of introducing behavior that risks crashing just for the sake of resolving an uncommon circular reference problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 29 23:51:20 2020 From: report at bugs.python.org (Eryk Sun) Date: Wed, 30 Sep 2020 03:51:20 +0000 Subject: [issue12836] ctypes.cast() creates circular reference in original object In-Reply-To: <1314222835.27.0.518600149254.issue12836@psf.upfronthosting.co.za> Message-ID: <1601437880.44.0.994620575224.issue12836@roundup.psfhosted.org> Change by Eryk Sun : ---------- stage: -> needs patch versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 00:21:36 2020 From: report at bugs.python.org (puddly) Date: Wed, 30 Sep 2020 04:21:36 +0000 Subject: [issue41889] enum: Mixin and int base class regression in 3.8.6 Message-ID: <1601439696.58.0.28102514399.issue41889@roundup.psfhosted.org> New submission from puddly : The following code worked in 3.8.5 but does not in 3.8.6 due to the fix for #39587: ``` import enum class MyInt(int): def __new__(cls, value): return super().__new__(cls, value) class HexMixin: def __repr__(self): return hex(self) class MyIntEnum(HexMixin, MyInt, enum.Enum): pass class Foo(MyIntEnum): TEST = 1 assert isinstance(Foo.TEST, MyInt) assert repr(Foo.TEST) == "0x1" ``` In 3.8.6, the `Foo` enum itself fails to be created because `HexMixin` is now considered the member type instead of `MyInt`: ``` Traceback (most recent call last): File "enum_test.py", line 18, in class Foo(MyIntEnum): File "/usr/local/Cellar/python at 3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/enum.py", line 215, in __new__ enum_member = __new__(enum_class) TypeError: object.__new__(Foo) is not safe, use int.__new__() ``` ---------- components: Library (Lib) messages: 377692 nosy: barry, eli.bendersky, ethan.furman, puddly priority: normal severity: normal status: open title: enum: Mixin and int base class regression in 3.8.6 type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 03:38:59 2020 From: report at bugs.python.org (Maxim Burov) Date: Wed, 30 Sep 2020 07:38:59 +0000 Subject: [issue23706] pathlib.Path.write_text should include a newline argument In-Reply-To: <1426757561.17.0.481870343329.issue23706@psf.upfronthosting.co.za> Message-ID: <1601451539.69.0.0835420693272.issue23706@roundup.psfhosted.org> Maxim Burov added the comment: CLA signed now and PR is ready :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 04:41:57 2020 From: report at bugs.python.org (Hazem Amara) Date: Wed, 30 Sep 2020 08:41:57 +0000 Subject: [issue41890] crypt produces wrong hashes for passwords containing newline character Message-ID: <1601455317.01.0.940646263522.issue41890@roundup.psfhosted.org> New submission from Hazem Amara : I am having an issue with crypt library (Lib/crypt.py) when hashing passwords containing \n character. I am using python 3.8.2 on Linux. To compare hashed passwords produced by crypt, I used openssl and mkpasswd utilities. When generating hashes for password without \n, crypt, openssl and mkpasswd return the same result: openssl passwd -6 -salt "saltySalt" "password" $6$saltySalt$0zG/rneQmcu2mKFi/xXKF5WVH4ald6AlPTwnSRggVpyu7iRbq9buUmS5gD884iB1seAPw3UehNZ/b.jxL0g4Y/ mkpasswd -S "saltySalt" -m sha-512 "password" $6$saltySalt$0zG/rneQmcu2mKFi/xXKF5WVH4ald6AlPTwnSRggVpyu7iRbq9buUmS5gD884iB1seAPw3UehNZ/b.jxL0g4Y/ python3 -c 'import crypt; print(crypt.crypt("password","$6$saltySalt"))' $6$saltySalt$0zG/rneQmcu2mKFi/xXKF5WVH4ald6AlPTwnSRggVpyu7iRbq9buUmS5gD884iB1seAPw3UehNZ/b.jxL0g4Y/ But when generating hashes for passwords containing \n character, crypt returns a result different from the result returned by openssl and mkpasswd: openssl passwd -6 -salt "saltySalt" "password\n" $6$saltySalt$v.6rXp74bIjKX42ufuY7/KWnngOAgFReenROiPODOQYzlRuE2NT4/Bgs8s4ULd3BgKNZQQ7i9GqlibMhRw2SV1 mkpasswd -S "saltySalt" -m sha-512 "password\n" $6$saltySalt$v.6rXp74bIjKX42ufuY7/KWnngOAgFReenROiPODOQYzlRuE2NT4/Bgs8s4ULd3BgKNZQQ7i9GqlibMhRw2SV1 python3 -c 'import crypt; print(crypt.crypt("password\n","$6$saltySalt"))' $6$saltySalt$hsmSR02RXIRP5U14cDo3wtwLCOD1Lb/9huWQEuJYRyatQjRjXmzYJI9rpfqys8ucIc.GbymuE3a5DVcLzSxn5/ I did not find a special mention for newline character in the documentation. Thanks for your help. ---------- components: Library (Lib) messages: 377694 nosy: amarahzm priority: normal severity: normal status: open title: crypt produces wrong hashes for passwords containing newline character versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 04:51:31 2020 From: report at bugs.python.org (Hazem Amara) Date: Wed, 30 Sep 2020 08:51:31 +0000 Subject: [issue41890] crypt produces wrong hashes for passwords containing newline character In-Reply-To: <1601455317.01.0.940646263522.issue41890@roundup.psfhosted.org> Message-ID: <1601455891.17.0.0406630414751.issue41890@roundup.psfhosted.org> Change by Hazem Amara : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 07:01:52 2020 From: report at bugs.python.org (Richard Kojedzinszky) Date: Wed, 30 Sep 2020 11:01:52 +0000 Subject: [issue41891] asyncio.wait_for does not wait for task/future to be completed in all cases Message-ID: <1601463712.11.0.444677837126.issue41891@roundup.psfhosted.org> New submission from Richard Kojedzinszky : This code should run without errors: ``` #!/usr/bin/env python import asyncio async def task1(): cv = asyncio.Condition() async with cv: await asyncio.wait_for(cv.wait(), 10) async def main(loop): task = loop.create_task(task1()) await asyncio.sleep(0) task.cancel() res = await asyncio.wait({task}) if __name__ == '__main__': loop = asyncio.get_event_loop() loop.run_until_complete(main(loop)) ``` ---------- components: asyncio messages: 377695 nosy: asvetlov, rkojedzinszky, yselivanov priority: normal severity: normal status: open title: asyncio.wait_for does not wait for task/future to be completed in all cases type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 07:04:51 2020 From: report at bugs.python.org (Richard Kojedzinszky) Date: Wed, 30 Sep 2020 11:04:51 +0000 Subject: [issue41891] asyncio.wait_for does not wait for task/future to be completed in all cases In-Reply-To: <1601463712.11.0.444677837126.issue41891@roundup.psfhosted.org> Message-ID: <1601463891.9.0.630433767541.issue41891@roundup.psfhosted.org> Change by Richard Kojedzinszky : ---------- keywords: +patch pull_requests: +21487 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 07:22:58 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Sep 2020 11:22:58 +0000 Subject: [issue41890] crypt produces wrong hashes for passwords containing newline character In-Reply-To: <1601455317.01.0.940646263522.issue41890@roundup.psfhosted.org> Message-ID: <1601464978.05.0.375157896902.issue41890@roundup.psfhosted.org> Serhiy Storchaka added the comment: For openssl and mkpasswd the password does not contain the newline character. It contains a pair of characters "\" and "n". And the crypt module produces the same output for it: $ python3 -c 'import crypt; print(crypt.crypt(r"password\n","$6$saltySalt"))' $6$saltySalt$v.6rXp74bIjKX42ufuY7/KWnngOAgFReenROiPODOQYzlRuE2NT4/Bgs8s4ULd3BgKNZQQ7i9GqlibMhRw2SV1 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 09:18:56 2020 From: report at bugs.python.org (Hazem Amara) Date: Wed, 30 Sep 2020 13:18:56 +0000 Subject: [issue41890] crypt produces wrong hashes for passwords containing newline character In-Reply-To: <1601455317.01.0.940646263522.issue41890@roundup.psfhosted.org> Message-ID: <1601471936.59.0.583691677633.issue41890@roundup.psfhosted.org> Hazem Amara added the comment: Thanks for your answer :) ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 09:37:29 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 30 Sep 2020 13:37:29 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601473049.29.0.0261214282647.issue41870@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +21488 pull_request: https://github.com/python/cpython/pull/22462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 09:38:08 2020 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 30 Sep 2020 13:38:08 +0000 Subject: [issue41870] Use PEP 590 vectorcall to speed up calls to bool() In-Reply-To: <1601212858.37.0.301484827373.issue41870@roundup.psfhosted.org> Message-ID: <1601473088.69.0.52914214699.issue41870@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: -21486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 10:20:25 2020 From: report at bugs.python.org (WoodyWoo) Date: Wed, 30 Sep 2020 14:20:25 +0000 Subject: [issue41892] use both "for" and "ElementTree.remove" has a index bug Message-ID: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> New submission from WoodyWoo : #Just run it in Python v3.8.6 of win7 32bit import xml.etree.ElementTree as ET xmlstr=''' ''' etroot = ET.fromstring(xmlstr) for ELEMchild in etroot: if ELEMchild.get("no") == "1" : etroot.remove(ELEMchild) #so far so good print (ELEMchild.tag) #It should be : "b /n c" or "a /n b /n c",I can live with it both. #But it is : "a /n c". #The index of ELEMchild should not +1 when there was a remove method worked on one of the before ELEMs. #I was forced to use while and if to control the index +1/+0. #BTW,ELEM has no method returning index in siblings, which is buging me too. ---------- components: XML messages: 377698 nosy: WoodyWoo priority: normal severity: normal status: open title: use both "for" and "ElementTree.remove" has a index bug type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 10:23:14 2020 From: report at bugs.python.org (WoodyWoo) Date: Wed, 30 Sep 2020 14:23:14 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601475794.93.0.809059880856.issue41892@roundup.psfhosted.org> Change by WoodyWoo : ---------- title: use both "for" and "ElementTree.remove" has a index bug -> use both "for in" and "ElementTree.remove" has a index bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 10:31:44 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 30 Sep 2020 14:31:44 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601476304.82.0.290568459494.issue41892@roundup.psfhosted.org> Eric V. Smith added the comment: I assume that ElementTree doesn't support mutation while iterating. However, the docs at https://docs.python.org/3/library/xml.etree.elementtree.html#modifying-an-xml-file show removing an item while iterating. It probably only works because the child being removed is the last one. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 10:43:11 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Sep 2020 14:43:11 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601476991.17.0.492597160685.issue41892@roundup.psfhosted.org> Serhiy Storchaka added the comment: You will get the same behavior for lists: >>> a = [1, 2, 3] >>> for x in a: ... if x == 1: ... a.remove(x) ... print(x) ... 1 3 Lists are iterated by index. First you get an item at index 0, then at index 1, etc, to the end of the list. Initially the list is [1, 2, 3]. After removing 1 at the first iteration it becomes [2, 3], and at the next iteration you get an item at index 1 which is 3. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 10:50:06 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 30 Sep 2020 14:50:06 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601477406.28.0.961170862484.issue41892@roundup.psfhosted.org> Eric V. Smith added the comment: I think the only action here is to improve the documentation. That example is especially problematic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:01:05 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Sep 2020 15:01:05 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601478065.92.0.958298133636.issue41892@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, eli.bendersky, scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:09:42 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 30 Sep 2020 15:09:42 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601478582.76.0.679738821055.issue41892@roundup.psfhosted.org> Stefan Behnel added the comment: > That example is especially problematic. No, it's not. It uses .findall(), which returns a list. It's like when you make a copy of a list to iterate over, when you want to modify the original list in the loop. That could be made explicit in the text that introduces the example, but I think it's a very good example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:13:08 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 30 Sep 2020 15:13:08 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601478788.18.0.987108104506.issue41892@roundup.psfhosted.org> Eric V. Smith added the comment: Ah, good point. I agree the example should make that clear. And I think a note in .remove() about using it while iterating would be a good idea, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:19:15 2020 From: report at bugs.python.org (WoodyWoo) Date: Wed, 30 Sep 2020 15:19:15 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601479155.27.0.747203175665.issue41892@roundup.psfhosted.org> WoodyWoo added the comment: I'm green hand in Coding. But I think the problem caused by "for each in list". Anything changed in "list" should not act at once,but should act when "for end" or break. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:22:21 2020 From: report at bugs.python.org (WoodyWoo) Date: Wed, 30 Sep 2020 15:22:21 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601479341.62.0.586289749966.issue41892@roundup.psfhosted.org> WoodyWoo added the comment: Only that makes "for each in list" literally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:24:21 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 30 Sep 2020 15:24:21 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601479461.34.0.148605328906.issue41892@roundup.psfhosted.org> Eric V. Smith added the comment: The example is iterating over the list returned by root.findall(), but removing from a different data structure in root, so it won't have a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:27:46 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 30 Sep 2020 15:27:46 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601479666.53.0.423129227154.issue41892@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: +patch pull_requests: +21489 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:31:18 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 30 Sep 2020 15:31:18 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601479878.82.0.749540096125.issue41892@roundup.psfhosted.org> Stefan Behnel added the comment: @WoodyWoo, you can (and should) do something like this: for ELEMchild in list(etroot): Modifying a container while iterating over it is usually not a good idea. The same applies to Python lists and dicts, for example. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:31:35 2020 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 30 Sep 2020 15:31:35 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601479895.26.0.926030494293.issue41892@roundup.psfhosted.org> Change by Stefan Behnel : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:45:40 2020 From: report at bugs.python.org (pushpam kumar) Date: Wed, 30 Sep 2020 15:45:40 +0000 Subject: [issue41893] remove() method is not working as expected(Hard to explain) Message-ID: <1601480740.82.0.874646425374.issue41893@roundup.psfhosted.org> New submission from pushpam kumar : I am not able to understand why "password" word is not removed by remove() method ---------- components: Interpreter Core files: testtt.py messages: 377708 nosy: ctf.challenge.pushpam priority: normal severity: normal status: open title: remove() method is not working as expected(Hard to explain) versions: Python 3.8 Added file: https://bugs.python.org/file49478/testtt.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:46:25 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 30 Sep 2020 15:46:25 +0000 Subject: [issue41887] ast.literal_eval does not accept strings with leading whitespaces In-Reply-To: <1601430417.52.0.930336195437.issue41887@roundup.psfhosted.org> Message-ID: <1601480785.74.0.17149305953.issue41887@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:51:26 2020 From: report at bugs.python.org (William Pickard) Date: Wed, 30 Sep 2020 15:51:26 +0000 Subject: [issue41889] enum: Mixin and int base class regression in 3.8.6 In-Reply-To: <1601439696.58.0.28102514399.issue41889@roundup.psfhosted.org> Message-ID: <1601481086.17.0.267572449204.issue41889@roundup.psfhosted.org> William Pickard added the comment: Actually, this is an issue with native types in general that define a 'tp_new' slot value ('!= NULL'). ---------- nosy: +WildCard65 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:54:04 2020 From: report at bugs.python.org (Ben) Date: Wed, 30 Sep 2020 15:54:04 +0000 Subject: [issue41893] remove() method is not working as expected(Hard to explain) In-Reply-To: <1601480740.82.0.874646425374.issue41893@roundup.psfhosted.org> Message-ID: <1601481244.62.0.0785847114948.issue41893@roundup.psfhosted.org> Ben added the comment: See the note in https://docs.python.org/3.7/reference/compound_stmts.html#the-for-statement "There is a subtlety when the sequence is being modified by the loop ..." Since your code is mutating the all_fields list as you iterate it, you get the " next item will be skipped " behaviour, which is why the loop is skipping over "password". remove() was never called to remove "password". There is an open issue https://bugs.python.org/issue32767 to clarify the docs about this, but it is not a bug in Python. ---------- nosy: +bjs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 11:58:30 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 30 Sep 2020 15:58:30 +0000 Subject: [issue41887] ast.literal_eval does not accept strings with leading whitespaces In-Reply-To: <1601430417.52.0.930336195437.issue41887@roundup.psfhosted.org> Message-ID: <1601481510.46.0.0998418291975.issue41887@roundup.psfhosted.org> Batuhan Taskaya added the comment: Looks like skipping the leading whitespace is an undocumented behavior for eval() introduced back in 1992 (f08ab0ad158f88f05dd923b129d2397e1882be14). I don't think that bringing it to the literal_eval is a good idea, at least after this much of a time. If so, both of them should be explicitly documented or at least mentioned in the source code (to avoid confusion). ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 12:39:00 2020 From: report at bugs.python.org (Ian M. Hoffman) Date: Wed, 30 Sep 2020 16:39:00 +0000 Subject: [issue41883] ctypes pointee goes out of scope, then pointer in struct dangles and crashes In-Reply-To: <1601350806.96.0.0908350548542.issue41883@roundup.psfhosted.org> Message-ID: <1601483940.54.0.539202373714.issue41883@roundup.psfhosted.org> Ian M. Hoffman added the comment: I agree with you. When I wrote "desired behavior" I intended it to mean "my selfishly desired outcome of not loading my struct with a dangling pointer." This issue seems to have descended into workarounds that treat the symptoms; I'm all for treating the cause. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 13:07:13 2020 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 30 Sep 2020 17:07:13 +0000 Subject: [issue41893] remove() method is not working as expected(Hard to explain) In-Reply-To: <1601480740.82.0.874646425374.issue41893@roundup.psfhosted.org> Message-ID: <1601485633.54.0.300936439958.issue41893@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 13:26:23 2020 From: report at bugs.python.org (Kevin) Date: Wed, 30 Sep 2020 17:26:23 +0000 Subject: [issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale Message-ID: <1601486783.26.0.906458411993.issue41894@roundup.psfhosted.org> New submission from Kevin : If a native module fails to load, the dynload code will call PyUnicode_FromString on the error message to give back to the user. This can cause a UnicodeDecodeError if the locale is not a UTF-8 locale and the error message contains non-ASCII code points. While Linux systems almost always use a UTF-8 locale by default nowadays, AIX systems typically use non-UTF-8 locales by default. We encountered an issue where a customer did not have libbz2 installed, causing a load failure when bz2 tried to import _bz2 when running in an Italian locale: $ LC_ALL=it_IT python3 -c 'import bz2' Traceback (most recent call last): File "", line 1, in File "/QOpenSys/pkgs/lib/python3.6/bz2.py", line 21, in from _bz2 import BZ2Compressor, BZ2Decompressor UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe8 in position 161: invalid continuation byte After switching to a UTF-8 locale, the problem goes away: $ LC_ALL=IT_IT python3 -c 'import bz2' Traceback (most recent call last): File "", line 1, in File "/QOpenSys/pkgs/lib/python3.6/bz2.py", line 21, in from _bz2 import BZ2Compressor, BZ2Decompressor ImportError: 0509-022 Impossibile caricare il modulo /QOpenSys/pkgs/lib/python3.6/lib-dynload/_bz2.so. 0509-150 Il modulo dipendente libbz2.so non ? stato caricato. 0509-022 Impossibile caricare il modulo libbz2.so. 0509-026 Errore di sistema: Un file o una directory nel nome percorso non esiste. 0509-022 Impossibile caricare il modulo /QOpenSys/pkgs/lib/python3.6/lib-dynload/_bz2.so. 0509-150 Il modulo dipendente /QOpenSys/pkgs/lib/python3.6/lib-dynload/_bz2.so non ? stato caricato. While this conceivably affects any Unix-like platform, the only system I can recreate it on is AIX and IBM i PASE. As far as I can tell, on Linux you will always get something like "error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory". Even though there seems to be some translations in GLIBC, I have been unable to get them to be used on either Fedora or Ubuntu. ---------- components: Interpreter Core messages: 377713 nosy: kadler priority: normal severity: normal status: open title: UnicodeDecodeError during load failure in non-UTF-8 locale type: behavior versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 13:38:05 2020 From: report at bugs.python.org (dexter) Date: Wed, 30 Sep 2020 17:38:05 +0000 Subject: [issue41895] PyMethodDef does NOT have any field contains context in embedded C Message-ID: <1601487485.79.0.674367935184.issue41895@roundup.psfhosted.org> New submission from dexter : I am trying to create app embedded python as interpreter, and I use PyImport_AppendInittab to import some helper functions to python. on website the example is excellent when you already know how many functions we want to import. but when my functions are based on a runtime dynamic list, even I create all PyModuleDef and PyMethodDef, but when the function all goes to PyCFunction which only has two PyObject* and return PyObject* i lost context information about C. may be I am not clear, but what I am expecting is PyMethodDef should define like struct PyMethodDef { const char *ml_name; /* The name of the built-in function/method */ PyCFunction ml_meth; /* The C function that implements it */ int ml_flags; /* Combination of METH_xxx flags, which mostly describe the args expected by the C func */ const char *ml_doc; /* The __doc__ attribute, or NULL */ void* extra; /* <================= here is NEW */ }; and PyCFunction should define like typedef PyObject *(*PyCFunction)(PyObject *, PyObject *, void * /* for extra void* */); ---------- components: C API messages: 377714 nosy: dexter priority: normal severity: normal status: open title: PyMethodDef does NOT have any field contains context in embedded C type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 13:42:03 2020 From: report at bugs.python.org (Kevin) Date: Wed, 30 Sep 2020 17:42:03 +0000 Subject: [issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale In-Reply-To: <1601486783.26.0.906458411993.issue41894@roundup.psfhosted.org> Message-ID: <1601487723.01.0.636193757981.issue41894@roundup.psfhosted.org> Change by Kevin : ---------- keywords: +patch pull_requests: +21490 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22466 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 14:06:32 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 30 Sep 2020 18:06:32 +0000 Subject: [issue15877] xml.dom.minidom cannot parse ISO-2022-JP In-Reply-To: <1346999883.79.0.0390921600311.issue15877@psf.upfronthosting.co.za> Message-ID: <1601489192.28.0.490110579028.issue15877@roundup.psfhosted.org> Irit Katriel added the comment: I don't see this problem on 3.10. Is this still an issue or can this issue be closed? Running Release|Win32 interpreter... Python 3.10.0a0 (heads/bpo17490-dirty:00eb063b66, Sep 27 2020, 13:20:24) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> c = u'\u65e5\u672c\u8a9e' >>> import xml.dom.minidom >>> xml.dom.minidom.parseString('%s' % c.encode('UTF-8')) >>> xml.dom.minidom.parseString('%s' % c.encode('ISO-2022-JP')) >>> ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 14:28:10 2020 From: report at bugs.python.org (Tama-kun) Date: Wed, 30 Sep 2020 18:28:10 +0000 Subject: [issue41896] Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget Message-ID: <1601490490.12.0.958872838055.issue41896@roundup.psfhosted.org> New submission from Tama-kun : This issue occurs when using the current mouse position from an event and the wordstart expression to find the index of the start of a clicked word on a text widget and the indices for the clicked word are tagged. If there's a single non-alphanumberic and underline character between the clicked word and the left edge of the text widget the index return for the start of the word will be the one for said non-alphanumeric and underline character. test.index(('@%s,%s wordstart' % (event.x, event.y))) Assuming "[testing]" is at the indices 1.0 to 1.9 of a text widget, clicking on testing will return 1.1. If we tag the indices 1.1 to 1.8 with test.tag_add("tag", 1.1, 1.8) then clicking on the word testing will return 1.0. This change of return doesn't occur if "[testing]" does not begin at a x.0 index or if there's multiple non-alphanumeric and underline characters such as "[[testing]". Using wordend will return 1.8 in both tagged and non tagged scenarios. The attached script illustrates this bug, only the middle text widget will print out the unexpected start index when clicking on the word testing. This issue isn't present when using python 3.5, running the script on python 3.5 will print out all expected indices. ---------- components: Tkinter files: test.py messages: 377716 nosy: Tama-kun, gpolo, serhiy.storchaka priority: normal severity: normal status: open title: Moving index with wordstart expression includes non-alphanumberic and underline characters if word is tagged and iat the edge of a text widget type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49479/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 14:55:04 2020 From: report at bugs.python.org (Saiyang Gou) Date: Wed, 30 Sep 2020 18:55:04 +0000 Subject: [issue41897] ast.parse in Python 3.9 does not produce SyntaxError for assignment to __debug__ Message-ID: <1601492104.09.0.103643328706.issue41897@roundup.psfhosted.org> New submission from Saiyang Gou : ast.parse in Python 3.9 does not produce SyntaxError for assignment to __debug__: ``` >>> import ast >>> ast.dump(ast.parse('__debug__ = 0')) "Module(body=[Assign(targets=[Name(id='__debug__', ctx=Store())], value=Constant(value=0))], type_ignores=[])" >>> exec('__debug__ = 0') Traceback (most recent call last): File "", line 1, in File "", line 1 SyntaxError: cannot assign to __debug__ ``` In Python 3.8 a SyntaxError was properly raised. Probably this is due to the new PEG parser. ---------- components: Library (Lib) messages: 377717 nosy: gousaiyang priority: normal severity: normal status: open title: ast.parse in Python 3.9 does not produce SyntaxError for assignment to __debug__ type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 15:03:21 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 30 Sep 2020 19:03:21 +0000 Subject: [issue31256] xml.etree.ElementTree: add support for doctype in tostring method In-Reply-To: <1503388868.57.0.0239596264981.issue31256@psf.upfronthosting.co.za> Message-ID: <1601492601.58.0.590455534811.issue31256@roundup.psfhosted.org> Irit Katriel added the comment: It looks like PR 12225 resolved this issue. Can this be closed then? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 15:03:33 2020 From: report at bugs.python.org (dexter) Date: Wed, 30 Sep 2020 19:03:33 +0000 Subject: [issue41895] PyMethodDef does NOT have any fields contain context in embedded C In-Reply-To: <1601487485.79.0.674367935184.issue41895@roundup.psfhosted.org> Message-ID: <1601492613.92.0.391423691121.issue41895@roundup.psfhosted.org> Change by dexter : ---------- title: PyMethodDef does NOT have any field contains context in embedded C -> PyMethodDef does NOT have any fields contain context in embedded C _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 15:13:37 2020 From: report at bugs.python.org (Troy Daniels) Date: Wed, 30 Sep 2020 19:13:37 +0000 Subject: [issue41898] Any logging causes assertLogs to pass Message-ID: <1601493217.83.0.77998878518.issue41898@roundup.psfhosted.org> New submission from Troy Daniels : The following test code unexpectedly passes. import logging import unittest LOG_FORMAT = '%(levelname)-10s %(asctime)s: %(message)s' def set_up_logger(app_name, level=logging.INFO, file="test.log"): formatter = logging.Formatter(LOG_FORMAT) log = logging.getLogger(app_name) # The next line lets the test pass log.setLevel(level) return log logger = set_up_logger(__name__) class TestLogging(unittest.TestCase): def test_logging(self): with self.assertLogs(level=logging.WARNING): logger.info('foo') Based on discussion at https://stackoverflow.com/questions/64141681/any-level-of-logging-lets-assertlogs-pass, it appears that I need to pass in the logger which is going to be doing the logging. Doing so would make the test over-specific and fragile. The requirement is that a warning be logged, not that a specific logger issue the warning. This was verified with Python 3.8.5 on a Mac, but probably exists in most/all other versions. ---------- components: Tests messages: 377719 nosy: udalrich.schermer priority: normal severity: normal status: open title: Any logging causes assertLogs to pass type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 15:48:00 2020 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Sep 2020 19:48:00 +0000 Subject: [issue41897] ast.parse in Python 3.9 does not produce SyntaxError for assignment to __debug__ In-Reply-To: <1601492104.09.0.103643328706.issue41897@roundup.psfhosted.org> Message-ID: <1601495280.95.0.545228382053.issue41897@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +BTaskaya, gvanrossum, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 16:01:45 2020 From: report at bugs.python.org (dexter) Date: Wed, 30 Sep 2020 20:01:45 +0000 Subject: [issue41895] PyMethodDef does NOT have any fields contain context in embedded C In-Reply-To: <1601487485.79.0.674367935184.issue41895@roundup.psfhosted.org> Message-ID: <1601496105.03.0.485925740285.issue41895@roundup.psfhosted.org> dexter added the comment: for example, there are some of shared libs, all these libs have a function named getList() exported. and getList() will return a list of names which also as a function name been exported. shared lib A export getList() -> return ["aaa", "bbb"] export aaa() export bbb(); shared lib A export getList() -> return ["xyz", "abc", "mno"] export xyz() export abc(); export mno(); and I want expose shared lib A aaa, bbb or shared lib B xyz abc mno when I load them, (maybe A, maybe B, or maybe both if they exists, work like plugins) I have a loop like for (int i = 0; i < length_of_list; ++i) { char* funcName = getName(i); PyMethodDef def { funcName, fooCall, MATH_VARARGS, nullptr, /* funcname here */}; /// .... } PyObject* fooCall(PyObject* self, PyObject* args, void* context) { char* funcname = (char*) context; /// .... load func based on name. } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 16:18:40 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 30 Sep 2020 20:18:40 +0000 Subject: [issue41887] ast.literal_eval does not accept strings with leading whitespaces In-Reply-To: <1601430417.52.0.930336195437.issue41887@roundup.psfhosted.org> Message-ID: <1601497120.8.0.749115988349.issue41887@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 16:28:55 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 30 Sep 2020 20:28:55 +0000 Subject: [issue41897] ast.parse in Python 3.9 does not produce SyntaxError for assignment to __debug__ In-Reply-To: <1601492104.09.0.103643328706.issue41897@roundup.psfhosted.org> Message-ID: <1601497735.6.0.533809494219.issue41897@roundup.psfhosted.org> Guido van Rossum added the comment: We moved the check from the parser to the bytecode compiler. I don't think this should be a problem. Kudos for noticing though! :-) ``` >>> compile("__debug__ = 1", "", "exec") Traceback (most recent call last): File "", line 1, in File "", line 1 SyntaxError: cannot assign to __debug__ >>> ``` ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 16:33:49 2020 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 30 Sep 2020 20:33:49 +0000 Subject: [issue41887] ast.literal_eval does not accept strings with leading whitespaces In-Reply-To: <1601430417.52.0.930336195437.issue41887@roundup.psfhosted.org> Message-ID: <1601498029.99.0.392885674775.issue41887@roundup.psfhosted.org> Guido van Rossum added the comment: Hm, I'm not sure. ast.literal_eval() does accept trailing whitespace, and embedded whitespace. ``` >>> ast.literal_eval("- ( 1\n)\n") -1 >>> ``` So I think it should start accepting leading whitespace too (but only in a feature release, so 3.10). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 16:52:36 2020 From: report at bugs.python.org (Batuhan Taskaya) Date: Wed, 30 Sep 2020 20:52:36 +0000 Subject: [issue41887] ast.literal_eval does not accept strings with leading whitespaces In-Reply-To: <1601430417.52.0.930336195437.issue41887@roundup.psfhosted.org> Message-ID: <1601499156.49.0.855444551563.issue41887@roundup.psfhosted.org> Change by Batuhan Taskaya : ---------- keywords: +patch pull_requests: +21492 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22469 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 17:28:13 2020 From: report at bugs.python.org (Irit Katriel) Date: Wed, 30 Sep 2020 21:28:13 +0000 Subject: [issue36255] Provide a simple way to delete and edit python's welcome message In-Reply-To: <1552227449.7.0.67751285833.issue36255@roundup.psfhosted.org> Message-ID: <1601501293.11.0.336440347203.issue36255@roundup.psfhosted.org> Irit Katriel added the comment: Raymond, I think you intended to close this but missed a click. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 19:27:22 2020 From: report at bugs.python.org (WoodyWoo) Date: Wed, 30 Sep 2020 23:27:22 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601508442.88.0.84939624349.issue41892@roundup.psfhosted.org> WoodyWoo added the comment: I think "for each in list" should not work by index,but should work by pointer like thing,could be a list of pointers. When the "for each in list" was acting,the pointers list would be fixed,and you need not to worry about the "list" changing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 20:08:35 2020 From: report at bugs.python.org (WoodyWoo) Date: Thu, 01 Oct 2020 00:08:35 +0000 Subject: [issue41899] Poor example for Element.remove() Message-ID: <1601510915.6.0.455772572055.issue41899@roundup.psfhosted.org> New submission from WoodyWoo : We can remove elements using Element.remove(). Let?s say we want to remove all countries with a rank higher than 50: >>> >>> for country in root.findall('country'): ... rank = int(country.find('rank').text) ... if rank > 50: ... root.remove(country) ... >>> tree.write('output.xml') When the original xml has over 2 country with rank>50,and they are one by one neighborly siblings element,the upper code will delete the 1st 3rd 5th and more odd No. country. A proper example should be: index=0 while index < len(root.findall("./*")): rank = int (root[index].find("rank").text) if rank>50: root.remove(root[index]) index=index+0 continue index=index+1 I think "for each in list" should not work by index,but should work by pointer like thing,could be a list of pointers. A finial solution should be like this --- when the "for each in list" was acting,the pointers list would be fixed,and you need not to worry about the "list" changing. ---------- assignee: docs at python components: Documentation messages: 377726 nosy: WoodyWoo, docs at python priority: normal severity: normal status: open title: Poor example for Element.remove() type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 20:08:35 2020 From: report at bugs.python.org (Matthieu Dartiailh) Date: Thu, 01 Oct 2020 00:08:35 +0000 Subject: [issue41703] Most bytecode changes are absent from Python 3.9 What's new In-Reply-To: <1599139613.26.0.744077883478.issue41703@roundup.psfhosted.org> Message-ID: <1601510915.46.0.407907085666.issue41703@roundup.psfhosted.org> Matthieu Dartiailh added the comment: Looking at the current version of the page https://docs.python.org/3.9/whatsnew/3.9.html#cpython-bytecode-changes I still see only the LOAD_ASSERTION_ERROR. It seems the changelog got updated but not the What's new ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 20:11:41 2020 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 01 Oct 2020 00:11:41 +0000 Subject: [issue37294] concurrent.futures.ProcessPoolExecutor state=finished raised error In-Reply-To: <1560620998.84.0.271411330169.issue37294@roundup.psfhosted.org> Message-ID: <1601511101.89.0.0203326077586.issue37294@roundup.psfhosted.org> Kyle Stanley added the comment: DanilZ, could you take a look at the superseding issue (https://bugs.python.org/issue37297) and see if your exception raised within the job is the same? If it's not, I would suggest opening a separate issue (and linking to it in a comment here), as I don't think it's necessarily related to this one. "state=finished raised error" doesn't indicate the specific exception that occurred. A good format for the name would be something along the lines of: "ProcessPoolExecutor.submit() while reading large object (4GB)" It'd also be helpful in the separate issue to paste the full exception stack trace, specify OS, and multiprocessing start method used (spawn, fork, or forkserver). This is necessary to know for replicating the issue on our end. In the meantime, I workaround I would suggest trying would be to use the *chunksize* parameter (or *Iterator*) in pandas.read_csv(), and split it across several jobs (at least 4+, more if you have additional cores) instead of within a single one. It'd also be generally helpful to see if that alleviates the problem, as it could possibly indicate an issue with running out of memory when the dataframe is converted to pickle format (which often increases the total size) within the process associated with the job. ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 20:25:23 2020 From: report at bugs.python.org (WoodyWoo) Date: Thu, 01 Oct 2020 00:25:23 +0000 Subject: [issue41899] Poor example for Element.remove() In-Reply-To: <1601510915.6.0.455772572055.issue41899@roundup.psfhosted.org> Message-ID: <1601511923.59.0.246596672954.issue41899@roundup.psfhosted.org> WoodyWoo added the comment: #new code to avoid an err index=0 count=len(root.findall("./*")) while index 50: root.remove(root[index]) index=index+0 count=count-1 # avoid index err continue index=index+1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 21:11:46 2020 From: report at bugs.python.org (WoodyWoo) Date: Thu, 01 Oct 2020 01:11:46 +0000 Subject: [issue41899] Poor example for Element.remove() In-Reply-To: <1601510915.6.0.455772572055.issue41899@roundup.psfhosted.org> Message-ID: <1601514706.89.0.342670385975.issue41899@roundup.psfhosted.org> WoodyWoo added the comment: My fault. "for country in root.findall('country')? is not working as same as "for country in root" all 3 method below: import xml.etree.ElementTree as ET xmlstr=\ r''' 2 2008 141100 5 2011 59900 69 2011 13600 69 2011 13600 ''' print(xmlstr) #orginal code root = ET.fromstring(xmlstr) for country in root.findall('country'): rank = int(country.find('rank').text) if rank > 50: root.remove(country) print("___orginal___") for country in root.findall('country'): print (country.get("name")) print("^^^orginal^^^^\n") #wrong code in my mind root = ET.fromstring(xmlstr) for country in root: rank = int(country.find('rank').text) if rank > 50: root.remove(country) print("___bad___") for country in root.findall('country'): print (country.get("name")) print("^^^bad^^^^\n") #my code root = ET.fromstring(xmlstr) index=0 count=len(root.findall("./*")) while index 50: root.remove(root[index]) index=index+0 count=count-1 # avoid index err continue index=index+1 print("___new___") for country in root.findall('country'): print (country.get("name")) print("^^^new^^^^\n") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 21:29:21 2020 From: report at bugs.python.org (WoodyWoo) Date: Thu, 01 Oct 2020 01:29:21 +0000 Subject: [issue41899] Poor example for Element.remove() In-Reply-To: <1601510915.6.0.455772572055.issue41899@roundup.psfhosted.org> Message-ID: <1601515761.51.0.509804678965.issue41899@roundup.psfhosted.org> WoodyWoo added the comment: The docs should specially tell that when need root.remove(child) must works with "for child in root.findall()". And my code with "while if continue" could make root.insert(index,newchild) easily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 21:30:24 2020 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 01 Oct 2020 01:30:24 +0000 Subject: [issue41899] Poor example for Element.remove() In-Reply-To: <1601510915.6.0.455772572055.issue41899@roundup.psfhosted.org> Message-ID: <1601515824.46.0.258864567571.issue41899@roundup.psfhosted.org> Eric V. Smith added the comment: As you've seen, the example is correct. I made the same mistake earlier today. For others: see also #41891 for a suggestion to improve the documentation. As was pointed out in that issue, it's generally true in Python that you should not mutate a sequence while iterating over it. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 21:52:53 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Oct 2020 01:52:53 +0000 Subject: [issue36255] Provide a simple way to delete and edit python's welcome message In-Reply-To: <1552227449.7.0.67751285833.issue36255@roundup.psfhosted.org> Message-ID: <1601517173.57.0.426704198691.issue36255@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 21:59:03 2020 From: report at bugs.python.org (WoodyWoo) Date: Thu, 01 Oct 2020 01:59:03 +0000 Subject: [issue41892] use both "for in" and "ElementTree.remove" has a index bug In-Reply-To: <1601475625.07.0.195514916094.issue41892@roundup.psfhosted.org> Message-ID: <1601517543.94.0.57521846368.issue41892@roundup.psfhosted.org> WoodyWoo added the comment: @eric.smith @scoder @serhiy.storchaka Thank U all. I get what to do,and still think the "for in" structure should rebuilding. All three methods: import xml.etree.ElementTree as ET xmlstr=\ r''' 2 2008 141100 5 2011 59900 69 2011 13600 69 2011 13600 ''' print(xmlstr) #orginal code root = ET.fromstring(xmlstr) for country in root.findall('country'): rank = int(country.find('rank').text) if rank > 50: root.remove(country) print("___orginal___") for country in root.findall('country'): print (country.get("name")) print("^^^orginal^^^^\n") #wrong code in my mind root = ET.fromstring(xmlstr) for country in root: rank = int(country.find('rank').text) if rank > 50: root.remove(country) print("___bad___") for country in root.findall('country'): print (country.get("name")) print("^^^bad^^^^\n") #my code root = ET.fromstring(xmlstr) index=0 count=len(root.findall("./*")) while index 50: root.remove(root[index]) index=index+0 count=count-1 # avoid index err continue index=index+1 print("___new___") for country in root.findall('country'): print (country.get("name")) print("^^^new^^^^\n") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 22:33:10 2020 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Oct 2020 02:33:10 +0000 Subject: [issue41859] Uncaught ValueError In-Reply-To: <1601007125.39.0.397372093674.issue41859@roundup.psfhosted.org> Message-ID: <1601519590.4.0.713068665453.issue41859@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't have a reproducer. The event occurred one in a full-day session. I don't get a completion box. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 30 22:34:23 2020 From: report at bugs.python.org (WoodyWoo) Date: Thu, 01 Oct 2020 02:34:23 +0000 Subject: [issue41899] Poor example for Element.remove() In-Reply-To: <1601510915.6.0.455772572055.issue41899@roundup.psfhosted.org> Message-ID: <1601519663.39.0.981308504991.issue41899@roundup.psfhosted.org> WoodyWoo added the comment: Could I say the mutable sequence containing not the object but the pointer like C++. So they can changed in def functions. ---------- _______________________________________ Python tracker _______________________________________