From report at bugs.python.org Mon Nov 1 03:44:31 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Nov 2021 07:44:31 +0000 Subject: [issue45598] setup.py grep_headers_for() is broken by design In-Reply-To: <1635077101.64.0.462136707743.issue45598@roundup.psfhosted.org> Message-ID: <1635752671.49.0.0492919687999.issue45598@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27613 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 05:58:02 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Nov 2021 09:58:02 +0000 Subject: [issue10572] Move test sub-packages to Lib/test In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za> Message-ID: <1635760682.05.0.824834245613.issue10572@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 762a4dc9361f9563e158e373ba8d767b4449f23d by Erlend Egeberg Aasland in branch 'main': bpo-10572: Fixup Lib/test/libregrtest/pgo.py (GH-29327) https://github.com/python/cpython/commit/762a4dc9361f9563e158e373ba8d767b4449f23d ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:10:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Nov 2021 10:10:17 +0000 Subject: [issue10572] Move test sub-packages to Lib/test In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za> Message-ID: <1635761417.38.0.895989776251.issue10572@roundup.psfhosted.org> Serhiy Storchaka added the comment: Do we need Lib/test/test_sqlite3/__init__.py? Would not tests in package be loaded automatically? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:12:29 2021 From: report at bugs.python.org (Alexandru Ardelean) Date: Mon, 01 Nov 2021 10:12:29 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635761549.57.0.870200385407.issue43158@roundup.psfhosted.org> Alexandru Ardelean added the comment: I've added Christian Heimes to this, mostly to help us get this further. (i.e. to refer someone else here, that can help). So, there is a fix for this in Buildroot's tree: https://github.com/buildroot/buildroot/blob/76c7fed85f7a822663cf0c8828e7d282198d0803/package/python3/0030-Fix-cross-compiling-the-uuid-module.patch I am porting this patch to OpenWrt. And it seems to work as well. I'd like to know how to proceed with this patch and submit it upstream. I did not author this patch, so it may be tricky. We may need to contact the original author? Or would it be fine for me to open a PR and mention the original source/author? ---------- nosy: +Alexandru Ardelean, christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:14:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Nov 2021 10:14:58 +0000 Subject: [issue45668] Some PGO tests are failing when building with --enable-optimizations --disable-test-modules In-Reply-To: <1635518249.11.0.537805942695.issue45668@roundup.psfhosted.org> Message-ID: <1635761698.43.0.4618234309.issue45668@roundup.psfhosted.org> Christian Heimes added the comment: New changeset e73283a20fb05b70da2990decefac0e011faec17 by Christian Heimes in branch 'main': bpo-45668: Fix PGO tests without test extensions (GH-29315) https://github.com/python/cpython/commit/e73283a20fb05b70da2990decefac0e011faec17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:35:06 2021 From: report at bugs.python.org (mike mcleod) Date: Mon, 01 Nov 2021 10:35:06 +0000 Subject: [issue2628] ftplib Persistent data connection In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za> Message-ID: <1635762906.3.0.943648746539.issue2628@roundup.psfhosted.org> mike mcleod added the comment: I am happy to do any testing. My reason for getting involved is I am new to helping with Cpython and thought this may be the least intrusive way of getting started with something that nobody really cares about that much. Hence, the oldest issue I see can be either completed as first envisioned or can be closed and I am ok with either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:36:22 2021 From: report at bugs.python.org (Martin Rueckl) Date: Mon, 01 Nov 2021 10:36:22 +0000 Subject: [issue45665] Problems caused by isinstance(list[int], type) returning True In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org> Message-ID: <1635762982.71.0.136253440992.issue45665@roundup.psfhosted.org> Martin Rueckl added the comment: One thing that probably should be considered in this context: isinstance(arg, type) == issubclass(type(arg), type) Holds True for arg in (Optional[X], Union[X, Y]). Both sides evaluate to False. (v3.10.0) While I still think both sides evaluating to True would be more intuitive, this supports the proposed change. Small test snippet: ``` from typing import Dict, List, Set, Tuple, Optional, Union import pytest @pytest.mark.parametrize('arg', [ list, List[int], list[int], dict, Dict[str, int], dict[str, int], set, Set[int], set[int], tuple, Tuple[str, int], tuple[str, int], Optional[int], Union[int, str] ]) def test_invariant(arg): same = isinstance(arg, type) == issubclass(type(arg), type) result = "Check" if same else "Failed" print(f"\n{result}: Testing: {arg=} with {type(arg)=}: {isinstance(arg, type)=} <> {issubclass(type(arg), type)=}") assert same ``` Any other commonly used annotations that could be added to the checklist? ---------- nosy: +martinitus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:40:21 2021 From: report at bugs.python.org (mike mcleod) Date: Mon, 01 Nov 2021 10:40:21 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1635703365.24.0.807420405093.issue10483@roundup.psfhosted.org> Message-ID: mike mcleod added the comment: Hi ?ric, Then would the easiest way of dealing with this issue, to close it without any further work? Possibly adding to the documents it doesn't work on windows.. I can move to the next issue. Regards, Mike On Sun, 31 Oct 2021 at 18:03, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > I don?t know if CGI on windows servers is very relevant nowadays. > > ---------- > nosy: +eric.araujo > versions: -Python 3.2 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:42:07 2021 From: report at bugs.python.org (Martin Rueckl) Date: Mon, 01 Nov 2021 10:42:07 +0000 Subject: [issue45665] Problems caused by isinstance(list[int], type) returning True In-Reply-To: <1635496063.98.0.5366836652.issue45665@roundup.psfhosted.org> Message-ID: <1635763327.99.0.735588630687.issue45665@roundup.psfhosted.org> Martin Rueckl added the comment: Sorry for the noise: - Literal['a', 'b'], - TypeVar('T') Behave like Optional/Union ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 06:42:40 2021 From: report at bugs.python.org (Fred) Date: Mon, 01 Nov 2021 10:42:40 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635763360.41.0.467944661116.issue45625@roundup.psfhosted.org> Fred added the comment: I think it would fit with the design and commmunity of Python. I think people who use Python don't care about what async runtime it is, or how to configure it or set it up, they just want to call async functions. This is 2021, we live in a async-first world. I think users expect to be able to do async with minimal friction. Other languages like C# lets you do it easy, by changing: static void Main() {} to: static async Task Main() {} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:18:19 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Nov 2021 11:18:19 +0000 Subject: [issue45668] Some PGO tests are failing when building with --enable-optimizations --disable-test-modules In-Reply-To: <1635518249.11.0.537805942695.issue45668@roundup.psfhosted.org> Message-ID: <1635765499.56.0.695598328166.issue45668@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:23:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 01 Nov 2021 11:23:33 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1635765813.05.0.395181724494.issue45635@roundup.psfhosted.org> Irit Katriel added the comment: It's more intricate than I initially thought - the assertion that no exception is set is in PyObject_Str rather than PyFile_WriteObject, and it should remain there because it ensures that exceptions are not accidentally cleared by an str() call. In the traceback display code, there are places where the exception is cleared because it's being overridden (like when modulename is not found and is replace by "") or places where the code makes a best-effort attempt to print something anyway. In these situations the error is cleared before calling PyFile_WriteObject. It is probably correct, but it's hard to follow the logic when making changes to the code, so it should be made more explicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:28:42 2021 From: report at bugs.python.org (emma) Date: Mon, 01 Nov 2021 11:28:42 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1635766122.39.0.611430775565.issue32545@roundup.psfhosted.org> emma added the comment: Missoma Discount Codes Shop online for more luxury jewelry for less when you use Missoma Discount Codes. For great gift ideas and inspiration, you can find it all, with the perfect accessories for less when you shop online. Choose from Rings, Necklaces, Bracelets, and much more for less when you use Missoma promo codes here at The Telegraph. Visit our voucher page with is updated daily with the latest offers. https://couponsagent.com/front/store-profile/missoma-promo-code ---------- nosy: +emmajohan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:36:12 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Nov 2021 11:36:12 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1635766572.54.0.64432656949.issue32545@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:36:50 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Nov 2021 11:36:50 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1635766610.73.0.194260278383.issue32545@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -emmajohan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:38:54 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Nov 2021 11:38:54 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1635766734.49.0.124963011324.issue32545@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg389658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:39:01 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Nov 2021 11:39:01 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1635766741.4.0.268627361289.issue32545@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg368787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:39:57 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Nov 2021 11:39:57 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1515875653.34.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <1635766797.33.0.362334054609.issue32545@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -gustavoxo, jugnugee2, kevingeller, printerhelpcenter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 07:53:26 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Nov 2021 11:53:26 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635767606.68.0.838498088638.issue43158@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27614 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 08:00:28 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Nov 2021 12:00:28 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635768028.06.0.0816225646722.issue43158@roundup.psfhosted.org> Christian Heimes added the comment: I have created a PR that adds a check for libuuid to configure and then uses configure variables in setup.py. Could you please try the patch in your build system? ---------- versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 08:05:04 2021 From: report at bugs.python.org (Oleksandr Pavliuk) Date: Mon, 01 Nov 2021 12:05:04 +0000 Subject: [issue43633] Improve the textual representation of IPv4-mapped IPv6 addresses In-Reply-To: <1616780080.54.0.443105360022.issue43633@roundup.psfhosted.org> Message-ID: <1635768304.79.0.625643769479.issue43633@roundup.psfhosted.org> Oleksandr Pavliuk added the comment: @maxmouchet, thank you for creating the issue. For me it makes sense, and RFC 4291 calls such IPv6 text representation approach as "more convenient". I'll try to fix this, if you don't mind. P.S.: Sorry for providing PR before I asked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 08:08:45 2021 From: report at bugs.python.org (Alexandru Ardelean) Date: Mon, 01 Nov 2021 12:08:45 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635768525.72.0.766471300048.issue43158@roundup.psfhosted.org> Alexandru Ardelean added the comment: I confirm that this works on OpenWrt :) I actually started testing shortly after the PR was created. Many thanks for the quick patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 08:11:43 2021 From: report at bugs.python.org (Ken Jin) Date: Mon, 01 Nov 2021 12:11:43 +0000 Subject: [issue45666] Warning: "'swprintf' : format string '%s' requires an argument of type 'unsigned short *', but variadic argument 1 has type 'const char *'" In-Reply-To: <1635500808.24.0.905348748425.issue45666@roundup.psfhosted.org> Message-ID: <1635768703.67.0.961523103586.issue45666@roundup.psfhosted.org> Ken Jin added the comment: New changeset 401d25e92f62a9ef320a97542b3e63cb8c34e7e9 by Nikita Sobolev in branch 'main': bpo-45666: Use `%S` for MSVC and `%s` elsewhere for `swprintf` in `_testembed.c` (GH-29341) https://github.com/python/cpython/commit/401d25e92f62a9ef320a97542b3e63cb8c34e7e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 08:14:53 2021 From: report at bugs.python.org (Ken Jin) Date: Mon, 01 Nov 2021 12:14:53 +0000 Subject: [issue45666] Warning: "'swprintf' : format string '%s' requires an argument of type 'unsigned short *', but variadic argument 1 has type 'const char *'" In-Reply-To: <1635500808.24.0.905348748425.issue45666@roundup.psfhosted.org> Message-ID: <1635768893.84.0.301336942712.issue45666@roundup.psfhosted.org> Ken Jin added the comment: @Serhiy Thanks for catching my mistake. I'm glad you came across the PR. And thank you @Nikita for your patience. Closing this issue! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 08:15:22 2021 From: report at bugs.python.org (E. Paine) Date: Mon, 01 Nov 2021 12:15:22 +0000 Subject: [issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware() In-Reply-To: <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org> Message-ID: <1635768922.8.0.0875801831132.issue45681@roundup.psfhosted.org> E. Paine added the comment: What happens if you use `ctypes.windll.user32.SetProcessDPIAware(1)` (note the 1)? Also, are the checkboxes on the IDLE config dialog affected (since IDLE also sets the dpi awareness: see https://github.com/python/cpython/blob/main/Lib/idlelib/pyshell.py#L14-L22)? ---------- nosy: +epaine, serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 08:58:19 2021 From: report at bugs.python.org (Kevin) Date: Mon, 01 Nov 2021 12:58:19 +0000 Subject: [issue22377] %Z in strptime doesn't match EST and others In-Reply-To: <1410301455.57.0.912701656833.issue22377@psf.upfronthosting.co.za> Message-ID: <1635771499.69.0.975154430946.issue22377@roundup.psfhosted.org> Kevin added the comment: With the introduction of PEP 0615 (https://www.python.org/dev/peps/pep-0615/) ??Support for the IANA Time Zone Database in the Standard Library ??should this be revisited to now leverage ZoneInfo to fully parse these time zone values in Python 3.9+ (or 3.11 with introduction of the feature if it is unreasonable to backport this)? ---------- nosy: +kkirsche _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 09:17:03 2021 From: report at bugs.python.org (Marc Culler) Date: Mon, 01 Nov 2021 13:17:03 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635772623.0.0.923426445729.issue44828@roundup.psfhosted.org> Marc Culler added the comment: Heads up! A strange Apple quirk has been identified which could affect the file dialog behavior if the Tk library is compiled on macOS 10.XX and used on macOS 11 or 12. (I am not sure if this applies here.) The fix for the broken file dialog was to use different calls to display the dialog, depending on the OS version. The quirk is that code compiled on 10.XX and run on 11 or 12 will report the host OS version as 10.16 (which does not exist) no matter whether the actual version is 11 or 12. The simplest workaround is to replace the condition OSVersion < 110000 by the condition OSVersion < 101600. Since tests like this occur in many places, a more robust workaround has been implemented in the Tk fossil repository and will appear in 8.6.12. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:03:20 2021 From: report at bugs.python.org (E. Paine) Date: Mon, 01 Nov 2021 14:03:20 +0000 Subject: [issue45641] Error In opening a file through tkinter on macOS Monterey In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org> Message-ID: <1635775400.44.0.175946600052.issue45641@roundup.psfhosted.org> E. Paine added the comment: > when is the new version is coming for tackling this problem? The patch was merged in #44828 and backported to 3.8, 3.9 and 3.10 (i.e. it will be in 3.9.8). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:14:12 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2021 14:14:12 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635776052.18.0.109667215176.issue45625@roundup.psfhosted.org> ?ric Araujo added the comment: But Python doesn?t have a concept of main function. Anyway, it?s no use arguing here, please go to python-ideas for a wider audience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 10:22:20 2021 From: report at bugs.python.org (Jonathan Bell) Date: Mon, 01 Nov 2021 14:22:20 +0000 Subject: [issue2628] ftplib Persistent data connection In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za> Message-ID: <1635776540.74.0.760372273904.issue2628@roundup.psfhosted.org> Jonathan Bell added the comment: No practical method exists to verify BLOCK transmission mode, which as mentioned earlier, was rarely implemented even when this issue was opened. Given that reality, I'm inclined to close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 11:25:58 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Nov 2021 15:25:58 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635780358.41.0.339395247557.issue44828@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the heads-up about the "10.16" issue, Marc. Sorry I missed that aspect when reviewing your fix as we had run into that "feature" before. I guess the idea was that it made it easier during the early days of Big Sur to build some products that were not expecting the version numbering change. In any case, it isn't an issue for the python.org macOS installer builds; we currently support two variants: universal2 which builds on 11 Big Sur (or later) with Tk 8.6.11 (or later); and the deprecated Intel-only variant which builds on 10.9 with Tk 8.6.8. After all the testing we've done, I'd prefer to not disturb the patches in place for the imminent release of 3.9.8 and a patched 3.10.0 installer; we will pick up the final versions when 8.6.12 releases. I am planning to use 8.6.12rc1 with the also imminent 3.11.0a2 to give it a little exposure but the 10.16 fix is also not an issue for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 11:43:10 2021 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=) Date: Mon, 01 Nov 2021 15:43:10 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635781390.09.0.49507390821.issue45625@roundup.psfhosted.org> Gr?gory Starck added the comment: python --async myscript.py ? ---------- nosy: +gstarck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 11:49:18 2021 From: report at bugs.python.org (Larry Hastings) Date: Mon, 01 Nov 2021 15:49:18 +0000 Subject: [issue45319] Possible regression in __annotations__ descr for heap type subclasses In-Reply-To: <1632916299.97.0.729247269758.issue45319@roundup.psfhosted.org> Message-ID: <1635781758.32.0.590151260484.issue45319@roundup.psfhosted.org> Larry Hastings added the comment: I got the PR locally, but the command-line you gave me fails, tox can't find python3.10 despite it being on the path. Rather than force me to reverse-engineer and recreate your build environment, can you give me a straightforward command-line or shell script to reproduce the problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 11:49:49 2021 From: report at bugs.python.org (Larry Hastings) Date: Mon, 01 Nov 2021 15:49:49 +0000 Subject: [issue45319] Possible regression in __annotations__ descr for heap type subclasses In-Reply-To: <1632916299.97.0.729247269758.issue45319@roundup.psfhosted.org> Message-ID: <1635781789.4.0.630468487605.issue45319@roundup.psfhosted.org> Larry Hastings added the comment: (Preferably not using "tox". I don't know that tool.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 12:06:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Nov 2021 16:06:30 +0000 Subject: [issue45319] Possible regression in __annotations__ descr for heap type subclasses In-Reply-To: <1632916299.97.0.729247269758.issue45319@roundup.psfhosted.org> Message-ID: <1635782790.32.0.98758649526.issue45319@roundup.psfhosted.org> Christian Heimes added the comment: I created a new branch in my clone for you that has the 3.10 workaround disabled. # checkout: git clone -b bpo45319 https://github.com/tiran/wrapt.git cd wrapt # build src/wrapt/_wrappers.abi3.so python3 setup.py build_ext -i # run tests $ PYTHONPATH=src python3.9 tests/test_update_attributes.py .......... ---------------------------------------------------------------------- Ran 10 tests in 0.001s OK $ PYTHONPATH=src python3.10 tests/test_update_attributes.py FF........ ====================================================================== FAIL: test_update_annotations (__main__.TestUpdateAttributes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/wrapt/tests/test_update_attributes.py", line 149, in test_update_annotations self.assertEqual(function.__wrapped__.__annotations__, override_annotations) AssertionError: {} != {'override_annotations': ''} - {} + {'override_annotations': ''} ====================================================================== FAIL: test_update_annotations_modified_on_original (__main__.TestUpdateAttributes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/wrapt/tests/test_update_attributes.py", line 173, in test_update_annotations_modified_on_original self.assertEqual(function.__annotations__, override_annotations) AssertionError: {} != {'override_annotations': ''} - {} + {'override_annotations': ''} ---------------------------------------------------------------------- Ran 10 tests in 0.001s FAILED (failures=2) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 12:20:04 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Nov 2021 16:20:04 +0000 Subject: [issue45420] Python 3.10 final installation failure In-Reply-To: <1633828108.74.0.92443333438.issue45420@roundup.psfhosted.org> Message-ID: <1635783604.72.0.480115310511.issue45420@roundup.psfhosted.org> Steve Dower added the comment: What tool did you use to find all the component registrations? If your answer is "Registry Editor", there's no chance you found them all. You'll need a tool specifically designed for cleaning up MSI issues. I don't know all the keys used. They're managed by the operating system, not by us. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 12:40:07 2021 From: report at bugs.python.org (Gabe) Date: Mon, 01 Nov 2021 16:40:07 +0000 Subject: [issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware() In-Reply-To: <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org> Message-ID: <1635784807.42.0.643109504408.issue45681@roundup.psfhosted.org> Gabe added the comment: The exact same effect happens with SetProcessDPIAware(1). The IDLE checkboxes are in fact affected; they're tiny. I discovered that I was able to prevent the issue by using `ctypes.windll.shcore.SetProcessDpiAwareness(0)`. This prevents the issue only if it is called prior to the SetProcessDPIAware call. This code does not have any issues (everything is correctly scaled) ``` import tkinter as tk from tkinter import ttk import ctypes ctypes.windll.shcore.SetProcessDpiAwareness(0) ctypes.windll.user32.SetProcessDPIAware() w = tk.Tk() ttk.Checkbutton(w, text = "Checkbox").grid() w.mainloop() ``` If the SetProcessDpiAwareness call comes after the SetProcessDPIAware call, then the error persists. I believe that this is because Windows only listens to the first DPI configuration call, so it ignores subsequent calls. I was unable to find documentation to support this though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 12:44:31 2021 From: report at bugs.python.org (Brett Cannon) Date: Mon, 01 Nov 2021 16:44:31 +0000 Subject: [issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are In-Reply-To: <1632168182.73.0.0551762354894.issue45250@roundup.psfhosted.org> Message-ID: <1635785071.79.0.564088961224.issue45250@roundup.psfhosted.org> Brett Cannon added the comment: > Wouldn't a nicer resolution for this be to change `iter` Unfortunately that isn't backwards-compatible. Some people may explicitly want their iterators to not be iterables to guarantee that people who want an iterator get a fresh/new one instead of reusing a live iterator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 12:55:19 2021 From: report at bugs.python.org (Gabe) Date: Mon, 01 Nov 2021 16:55:19 +0000 Subject: [issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware() In-Reply-To: <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org> Message-ID: <1635785719.7.0.845960080362.issue45681@roundup.psfhosted.org> Gabe added the comment: I should add - the reason why this is an issue is because pyautogui calls this function, and I would like to use pyautogui in my tkinter app, but I currently cannot without sacrificing my checkbuttons. (Well, pyautogui uses pyscreeze for screenshots and pyscreeze calls it: https://github.com/asweigart/pyscreeze/blob/master/pyscreeze/__init__.py#L69) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:04:41 2021 From: report at bugs.python.org (Fred) Date: Mon, 01 Nov 2021 17:04:41 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635786281.28.0.900837233113.issue45625@roundup.psfhosted.org> Fred added the comment: $ python3 --async myscript.py unknown option --async Also I cannot go around telling other people how to run my script. My script must be able to run properly without any special setup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:15:22 2021 From: report at bugs.python.org (E. Paine) Date: Mon, 01 Nov 2021 17:15:22 +0000 Subject: [issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware() In-Reply-To: <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org> Message-ID: <1635786922.24.0.306014781135.issue45681@roundup.psfhosted.org> E. Paine added the comment: This is definitely a Tk issue, but it is resolved as of Tk 8.6.11. I assume this is similar to #41969. Strangely, the Windows installers for 3.10 and 3.11 appear to still be using Tk 8.6.10 despite PR-25170, rather than 8.6.11. I'll raise it on #43652. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:17:30 2021 From: report at bugs.python.org (E. Paine) Date: Mon, 01 Nov 2021 17:17:30 +0000 Subject: [issue43652] Upgrade Windows tcl/tk to 8.6.11 In-Reply-To: <1617001631.71.0.115330422511.issue43652@roundup.psfhosted.org> Message-ID: <1635787050.35.0.124417345587.issue43652@roundup.psfhosted.org> E. Paine added the comment: This does not seem to have done the trick. The installers for 3.10.0 and 3.11.0a1 both use Tk 8.6.10 still. This can be verified using the bug in #45681 or using `tkinter.test.support.get_tk_patchlevel()`. ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:36:01 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Nov 2021 17:36:01 +0000 Subject: [issue45466] Simple curl/wget-like download functionality in urllib (like http offers server) In-Reply-To: <1634192112.29.0.508125660114.issue45466@roundup.psfhosted.org> Message-ID: <1635788161.87.0.174365527176.issue45466@roundup.psfhosted.org> Christian Heimes added the comment: I fear that you underestimate both the complexity of this feature request and the amount of demand from users this feature is going to create. Once we start to offer a command line client for urllib, users **will** ask for more options, e.g. POST requests, custom headers, various TLS/SSL options and so on. There is a ton of hidden complexity in a download tool. curl has over 240 (!) command line options for a reason. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 13:50:36 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 01 Nov 2021 17:50:36 +0000 Subject: [issue2628] ftplib Persistent data connection In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za> Message-ID: <1635789036.01.0.569749006035.issue2628@roundup.psfhosted.org> Ethan Furman added the comment: I would like to have the issue fixed instead of just closed. Jonathan, you say there is no practical method to verify that the block transmission mode exists -- so it's only useful if the user knows that it exists? If the user tries it and the server does not support it, is a useful exception raised? If the answer is yes (to the useful exception) I'm would like to see it added. ---------- versions: +Python 3.11 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:00:31 2021 From: report at bugs.python.org (Nir Friedman) Date: Mon, 01 Nov 2021 18:00:31 +0000 Subject: [issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are In-Reply-To: <1632168182.73.0.0551762354894.issue45250@roundup.psfhosted.org> Message-ID: <1635789631.75.0.813396307732.issue45250@roundup.psfhosted.org> Nir Friedman added the comment: Okay, fair enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:00:35 2021 From: report at bugs.python.org (Kelly Brazil) Date: Mon, 01 Nov 2021 18:00:35 +0000 Subject: [issue45617] sys.stdin does not iterate correctly on '\r' line separator In-Reply-To: <1635276029.13.0.174464623283.issue45617@roundup.psfhosted.org> Message-ID: <1635789635.26.0.0112593458108.issue45617@roundup.psfhosted.org> Kelly Brazil added the comment: Are there other scenarios where splitlines behavior deviates from the default of newline=None (Universal Newlines)? It seems sys.stdin (on non-Windows OS) is the outlier. All of these use Universal Newlines: - sys.stdin (on Windows) - open(0, 'r') - str.splitlines() For sake of consistency it seems that sys.stdin on non-Windows should use the Universal Newlines behavior. Since the difference in behavior is not documented, it is safe to assume users can be confused by this difference. Also, unless there is a technical reason for the difference, I'm not sure what the rationale would be to keep the behavior different. All types of data can be piped to STDIN on non-Windows systems. Just because the pipeline is happening on unix/linux doesn't mean the data inside conforms to \n newlines. I believe Universal Newlines should be the default (as with the other scenarios) and the user should be able to decide if another newline option should be configured. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:12:14 2021 From: report at bugs.python.org (James Lawrie) Date: Mon, 01 Nov 2021 18:12:14 +0000 Subject: [issue45683] dns.asyncresolver ignores nameserver parameter Message-ID: <1635790334.84.0.995507051537.issue45683@roundup.psfhosted.org> New submission from James Lawrie : The DNS async resolver allows you to specify a list of nameservers to use, but they are ignored and the system nameservers are used instead. Test code below demonstrating the issue: # cat test.py import dns.asyncresolver import asyncio from pprint import pprint async def main(domains): results = await get_ips_bulk(domains) results = [item for sublist in results for item in sublist] pprint(results) async def get_ips_bulk(domains): output = [get_ips(domain) for domain in domains] return await asyncio.gather(*output, return_exceptions=True) async def get_ips(domain): res = dns.asyncresolver.Resolver() res.nameserver = ["1.1.1.1"] results = [] try: ipv4 = await res.resolve(domain, 'A') for result in ipv4: results.append(['A', domain, result.to_text()]) except: results.append(['A', domain, 'n/a']) try: ipv6 = await res.resolve(domain, 'AAAA') results.append(['AAAA', domain, result.to_text()]) except: results.append(['AAAA', domain, 'n/a']) return results domains = ['python.org'] asyncio.run(main(domains)) It should use 1.1.1.1 as the nameserver but watching tcpdump it's using 8.8.8.8 per /etc/resolv.conf: # tcpdump -n port 53 & [1] 16751 listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes # python3 test.py 19:05:02.750458 IP x.x.x.x.44173 > 8.8.8.8.53: 46143+ A? python.org. (28) 19:05:02.756265 IP 8.8.8.8.53 > x.x.x.x.44173: 46143 1/0/0 A 138.197.63.241 (44) 19:05:02.757392 IP x.x.x.x.37827 > 8.8.8.8.53: 17493+ AAAA? python.org. (28) 19:05:02.765797 IP 8.8.8.8.53 > x.x.x.x.37827: 17493 0/1/0 (115) [['A', 'python.org', '138.197.63.241'], ['AAAA', 'python.org', 'n/a']] # fg tcpdump -n port 53 ^C # grep -P "^nameserver" /etc/resolv.conf nameserver 8.8.8.8 ---------- components: asyncio messages: 405460 nosy: asvetlov, james2, yselivanov priority: normal severity: normal status: open title: dns.asyncresolver ignores nameserver parameter type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:12:21 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Nov 2021 18:12:21 +0000 Subject: [issue45466] Simple curl/wget-like download functionality in urllib (like http offers server) In-Reply-To: <1634192112.29.0.508125660114.issue45466@roundup.psfhosted.org> Message-ID: <1635790341.52.0.7385767855.issue45466@roundup.psfhosted.org> Raymond Hettinger added the comment: > If curl/wget are available, great, but often slim images > don't offer that. I concur with Christian. For the most part, the standard library aims to be a collection of resources helpful for building applications like curl and wget. The applications themselves should live on the Python Package Index (PyPI). Also, as Christian points out, this is a non-trivial project with a large scope. > The urllib could provide a very simple download functionality > (like http offers a simple server): > > from urllib.request import urlopen > data = urlopen('https://.../install-poetry.py').read() > # print or save data This is a simpler request and is within our scope; however, I not sure how it differs from the existing functionality in urllib.request.urlretrieve(). Can you clarify what extra functionality is being requested? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:23:01 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 01 Nov 2021 18:23:01 +0000 Subject: [issue45684] `functools.singledispatchmethod` does not define `__class_getitem__` Message-ID: <1635790981.47.0.0130236033988.issue45684@roundup.psfhosted.org> New submission from Alex Waygood : `functools.singledispatchmethod` is marked as being a generic class in `typeshed`, but does not define `__class_getitem__`, so cannot be parameterized at runtime. cpython source code: https://github.com/python/cpython/blob/e2063d6a1ebc3568e90a14ed163fa291b5977ae8/Lib/functools.py#L891 typeshed stub: https://github.com/python/typeshed/blob/f4143c40e85db42dc98549e09329e196668395ee/stdlib/functools.pyi#L94 ---------- components: Library (Lib) messages: 405462 nosy: AlexWaygood, lukasz.langa, rhettinger priority: normal severity: normal status: open title: `functools.singledispatchmethod` does not define `__class_getitem__` type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:27:33 2021 From: report at bugs.python.org (James Lawrie) Date: Mon, 01 Nov 2021 18:27:33 +0000 Subject: [issue45683] dns.asyncresolver ignores nameserver parameter In-Reply-To: <1635790334.84.0.995507051537.issue45683@roundup.psfhosted.org> Message-ID: <1635791253.15.0.735329695993.issue45683@roundup.psfhosted.org> James Lawrie added the comment: Sorry. This was a pebkac error, I was setting nameserver instead of nameservers ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 14:37:34 2021 From: report at bugs.python.org (Glenn Linderman) Date: Mon, 01 Nov 2021 18:37:34 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1635791854.16.0.377822224525.issue10483@roundup.psfhosted.org> Glenn Linderman added the comment: As the original author of this report, getting significant pushback from the then maintainer of the code, I went ahead and implemented what I considered to be a useful set of features to make CGI work on Windows. I never proposed them as a patch, because they were bundled with a bunch of other things that certainly would have been considered feature requests, and I never figured out the process for submitting patches, which has changed a couple times since the bug was submitted, and I didn't have time to do all of (1) learn the churning patch mechanisms (2) separate my code changes into independent chunks (3) also get my projects completed The only reason that CGI support on Windows may not be relevant today is that it is so outdated, with no support or encouragement from the maintainers to encourage patches to make it useful, discouraging its use on Windows. With my private, forked implementation, I have a quite useful Windows testbed for implementing web server code that can run on Linux Apache servers. If only there were such support built-in! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 15:15:54 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 01 Nov 2021 19:15:54 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1635794154.72.0.0284718350563.issue10483@roundup.psfhosted.org> Ethan Furman added the comment: Glen, which version of Python is your fork using? ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:11:28 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2021 20:11:28 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1635797488.91.0.379171645013.issue45459@roundup.psfhosted.org> Antoine Pitrou added the comment: Py_buffer *is* an ABI, and it hasn't changed from the start. Of course you can still try to collect feedback from third-party projects, but there is a very high probability that it won't need to change in the near future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:14:26 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 01 Nov 2021 20:14:26 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1635797666.8.0.79962980168.issue45459@roundup.psfhosted.org> Antoine Pitrou added the comment: I would advocate: * expose the Py_buffer struct fully * expose the various PyBUF_* constants * expose at least PyObject_GetBuffer() and PyBuffer_Release() The rest is optional. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:36:05 2021 From: report at bugs.python.org (Rob Nelson) Date: Mon, 01 Nov 2021 20:36:05 +0000 Subject: [issue44495] wrong FNAME in tarfile if tgz extension is used In-Reply-To: <1624431314.4.0.407283752721.issue44495@roundup.psfhosted.org> Message-ID: <1635798965.17.0.462201782931.issue44495@roundup.psfhosted.org> Rob Nelson added the comment: The code referenced in the previous comment only hits for tarfiles built from Streams. The same (incorrect) code exists in the gzip.py library as well, and hits the more common usecase of building a tar.gz from a set of files on disk. def _write_gzip_header(self, compresslevel): self.fileobj.write(b'\037\213') # magic header self.fileobj.write(b'\010') # compression method try: # RFC 1952 requires the FNAME field to be Latin-1. Do not # include filenames that cannot be represented that way. fname = os.path.basename(self.name) if not isinstance(fname, bytes): fname = fname.encode('latin-1') if fname.endswith(b'.gz'): fname = fname[:-3] This effects decompressing the file with 7zip, who respects the FNAME value, and thus attempts to create a new file with the same name as the file its currently decompressing. Or if you extract to another directory, it creates a tar file that is named "foo.tgz", which is confusing to users who are expecting a tar. You can very easily reproduce this: import tarfile f = tarfile.open("test.tgz", mode="w:gz") f.close() and then "extract" the file with 7zip ---------- nosy: +veaviticus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 16:36:28 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 01 Nov 2021 20:36:28 +0000 Subject: [issue45466] Simple curl/wget-like download functionality in urllib (like http offers server) In-Reply-To: <1634192112.29.0.508125660114.issue45466@roundup.psfhosted.org> Message-ID: <1635798988.97.0.478081537059.issue45466@roundup.psfhosted.org> Eric V. Smith added the comment: The core devs have decided to reject this. Basically for a few reasons: - the possibility of introducing security vulnerabilities - the ongoing maintenance burden ---------- nosy: +eric.smith resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:18:40 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Nov 2021 21:18:40 +0000 Subject: [issue43652] Upgrade Windows tcl/tk to 8.6.11 In-Reply-To: <1617001631.71.0.115330422511.issue43652@roundup.psfhosted.org> Message-ID: <1635801520.34.0.59011010478.issue43652@roundup.psfhosted.org> Steve Dower added the comment: Looks like something went wrong back when I built it in March and it built the older version again. I probably need to revamp that build step. I think it relies on a race to build properly, since it's in the main repo. We need a way to override the version it's going to build without modifying the repo, since we can't modify the repo without the build being done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:24:19 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 01 Nov 2021 21:24:19 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1635801859.37.0.688027592524.issue43112@roundup.psfhosted.org> ?ric Araujo added the comment: If this is deemed a bugfix, the PR should be backported. ---------- nosy: +eric.araujo type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:52:03 2021 From: report at bugs.python.org (Glenn Linderman) Date: Mon, 01 Nov 2021 21:52:03 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1635803523.81.0.832819866577.issue10483@roundup.psfhosted.org> Glenn Linderman added the comment: Ethan, 3.7.2 at the moment. I doubt there'd be any issues moving it to 3.11, unless there have been significant changes to the main branch in that area, I just haven't bothered because it is working for me as is. I forget what version I started with, but I guess 3.6 was when I first reported it? I know I did have to tweak it a little when I upgraded Python once, and there had been changes to http.server in the meantime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 17:54:43 2021 From: report at bugs.python.org (Alexandre) Date: Mon, 01 Nov 2021 21:54:43 +0000 Subject: [issue45372] Unwarranted "certificate has expired" when urlopen-ing R3 sites In-Reply-To: <1633425440.6.0.270287663773.issue45372@roundup.psfhosted.org> Message-ID: <1635803683.12.0.106106925748.issue45372@roundup.psfhosted.org> Alexandre added the comment: If anyone is having this issue too, you can find more informations at https://community.letsencrypt.org/t/potential-problem-with-r3-intermediates-on-windows-servers/157164, it looks like Windows keeps using expired certificates until rebooted. A solution is to remove the expired R3 intermediary from the store, forcing Window to use the newer. ---------- nosy: +u36959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:28:28 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 01 Nov 2021 22:28:28 +0000 Subject: [issue45359] TopologicalSorter is not Generic at runtime (but is in typeshed) In-Reply-To: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org> Message-ID: <1635805708.45.0.300021907349.issue45359@roundup.psfhosted.org> Change by Alex Waygood : ---------- versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:43:16 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Nov 2021 22:43:16 +0000 Subject: [issue45681] tkinter breaks on high resolution screen after ctypes SetProcessDPIAware() In-Reply-To: <1635682322.33.0.130393544113.issue45681@roundup.psfhosted.org> Message-ID: <1635806596.75.0.688686858047.issue45681@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:43:45 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 01 Nov 2021 22:43:45 +0000 Subject: [issue45684] `functools.singledispatchmethod` does not define `__class_getitem__` In-Reply-To: <1635790981.47.0.0130236033988.issue45684@roundup.psfhosted.org> Message-ID: <1635806625.75.0.857302804137.issue45684@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch pull_requests: +27615 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29355 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 18:51:02 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Nov 2021 22:51:02 +0000 Subject: [issue45243] [sqlite3] add support for changing connection limits In-Reply-To: <1632090954.41.0.8887678667.issue45243@roundup.psfhosted.org> Message-ID: <1635807062.34.0.0326228945985.issue45243@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset b6b38a82267ff70d2abaf2a8371327268887c97d by Erlend Egeberg Aasland in branch 'main': bpo-45243: Add support for setting/getting `sqlite3` connection limits (GH-28463) https://github.com/python/cpython/commit/b6b38a82267ff70d2abaf2a8371327268887c97d ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:09:34 2021 From: report at bugs.python.org (giancarlo niccolo virgutto) Date: Mon, 01 Nov 2021 23:09:34 +0000 Subject: [issue45685] PuthonLauncher app fails run scripts on Mac BigSur Message-ID: <1635808174.14.0.867223626801.issue45685@roundup.psfhosted.org> New submission from giancarlo niccolo virgutto : I can?t figure out how to use Python Launcher on BigSur. Or it is broken. Anyway: It does absolutely nothing. When I double click a script file, I see very shortly the preferences window of Launcher, and this is all. The script is not executed. I made a very simple script which writes a small text file. The script works flawlessly, when I call it in the terminal, but the Launcher seems not even to open it. Is this a bug with BigSur, or what is to be done? ---------- components: macOS messages: 405475 nosy: gnvirgutto1990, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: PuthonLauncher app fails run scripts on Mac BigSur type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 19:09:44 2021 From: report at bugs.python.org (giancarlo niccolo virgutto) Date: Mon, 01 Nov 2021 23:09:44 +0000 Subject: [issue45685] PythonLauncher app fails run scripts on Mac BigSur In-Reply-To: <1635808174.14.0.867223626801.issue45685@roundup.psfhosted.org> Message-ID: <1635808184.58.0.538344530521.issue45685@roundup.psfhosted.org> Change by giancarlo niccolo virgutto : ---------- title: PuthonLauncher app fails run scripts on Mac BigSur -> PythonLauncher app fails run scripts on Mac BigSur _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 20:25:14 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 02 Nov 2021 00:25:14 +0000 Subject: [issue45243] [sqlite3] add support for changing connection limits In-Reply-To: <1632090954.41.0.8887678667.issue45243@roundup.psfhosted.org> Message-ID: <1635812714.36.0.359547622094.issue45243@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27616 pull_request: https://github.com/python/cpython/pull/29356 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 20:29:19 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 02 Nov 2021 00:29:19 +0000 Subject: [issue44511] Improve the bytecode for mapping patterns In-Reply-To: <1624666320.05.0.738166042939.issue44511@roundup.psfhosted.org> Message-ID: <1635812959.37.0.233931815991.issue44511@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +27617 pull_request: https://github.com/python/cpython/pull/29357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 20:50:51 2021 From: report at bugs.python.org (Michael Wayne Goodman) Date: Tue, 02 Nov 2021 00:50:51 +0000 Subject: [issue45686] ElementTree.Element.extend: bad error message when error occurs in generator Message-ID: <1635814251.62.0.355245938965.issue45686@roundup.psfhosted.org> New submission from Michael Wayne Goodman : Both the Python and C versions of xml.etree.ElementTree allow Element.extend() to accept a sequence or an iterable, such as a generator expression (although the docs only mention "sequence"; that's a separate problem): >>> from xml.etree import ElementTree as ET >>> elem = ET.Element('root') >>> elem.extend(ET.Element('child') for _ in range(3)) >>> pyelem = ET._Element_Py('root') >>> pyelem.extend(ET._Element_Py('child') for _ in range(3)) If the generator expression raises an Exception (for instance, by omitting the tag name as below), then the Python implementation passes up the error: >>> pyelem.extend(ET._Element_Py() for _ in range(3)) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.9/xml/etree/ElementTree.py", line 253, in extend for element in elements: File "", line 1, in TypeError: __init__() missing 1 required positional argument: 'tag' But the C implementation hides it with a misleading exception of its own: >>> elem.extend(ET.Element() for _ in range(3)) Traceback (most recent call last): File "", line 1, in TypeError: expected sequence, not "generator" Is it possible to pass up the original exception, as in the Python implementation? In the C code, the exception is raised when PySequence_Fast returns something false: seq = PySequence_Fast(elements, ""); if (!seq) { PyErr_Format( PyExc_TypeError, "expected sequence, not \"%.200s\"", Py_TYPE(elements)->tp_name ); return NULL; } Otherwise, while it would be good if the error message didn't incorrectly state that Element.extend() requires a sequence and not a generator, it currently leads the programmer to the actual error. That is, when the programmer tries to make the argument a sequence by creating a list, the error will be propagated before Element.extend() is called: >>> elem.extend([ET.Element() for _ in range(3)]) Traceback (most recent call last): File "", line 1, in File "", line 1, in TypeError: Element() takes at least 1 argument (0 given) ---------- components: XML messages: 405476 nosy: goodmami priority: normal severity: normal status: open title: ElementTree.Element.extend: bad error message when error occurs in generator type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:52:55 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 01:52:55 +0000 Subject: [issue45685] PythonLauncher app fails run scripts on Mac BigSur In-Reply-To: <1635808174.14.0.867223626801.issue45685@roundup.psfhosted.org> Message-ID: <1635817975.64.0.699097478548.issue45685@roundup.psfhosted.org> Ned Deily added the comment: Thank you for the issue and the reminder. Unfortunately, you are running into a problem with the Python Launcher as documented in open Issue40477, a problem that has slipped off my radar. Due to changes in macOS 10.15 Catalina and still present in 11 Big Sur, the Python Launcher is no longer able to successfully launch the Terminal app so the scripts are never executed. As described in msg368819 there, there is a simple workaround: just ensure that the Terminal app is already launched before trying to use the Python Launcher. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Python Launcher app on macOS 10.15 Catalina fails to run scripts type: crash -> behavior versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 21:53:39 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 01:53:39 +0000 Subject: [issue40477] Python Launcher app on macOS 10.15 Catalina fails to run scripts In-Reply-To: <1588435279.1.0.0339863635356.issue40477@roundup.psfhosted.org> Message-ID: <1635818019.85.0.601902622206.issue40477@roundup.psfhosted.org> Change by Ned Deily : ---------- type: crash -> behavior versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:23:01 2021 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 02 Nov 2021 02:23:01 +0000 Subject: [issue39214] Add curses.window.in_wch In-Reply-To: <1578177215.08.0.364585714734.issue39214@roundup.psfhosted.org> Message-ID: <1635819781.64.0.977535728174.issue39214@roundup.psfhosted.org> Anthony Sottile added the comment: rebased this onto 3.11 ---------- versions: +Python 3.11 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 22:27:51 2021 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 02 Nov 2021 02:27:51 +0000 Subject: [issue44295] self.assertDictContainsSubset warning is unhelpful In-Reply-To: <1622676760.31.0.209382096259.issue44295@roundup.psfhosted.org> Message-ID: <1635820071.84.0.0711263062497.issue44295@roundup.psfhosted.org> Anthony Sottile added the comment: looks like this was removed in 3.11 -- wondering if it's still worth correcting the deprecation warning location ---------- versions: +Python 3.10 -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:14:17 2021 From: report at bugs.python.org (Jonathan Bell) Date: Tue, 02 Nov 2021 03:14:17 +0000 Subject: [issue2628] ftplib Persistent data connection In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za> Message-ID: <1635822857.33.0.935748472198.issue2628@roundup.psfhosted.org> Jonathan Bell added the comment: I should rephrase: There doesn't seem to be a practical way to verify BLOCK transmission mode against actual servers in the wild. As the Wikipedia article that Giampaolo referenced points out, BLOCK mode is a rarity that was primarily supported only by mainframe and minicomputer systems. Any compliant server not supporting BLOCK should respond with a non-200 response. The PR sends its request to enter BLOCK mode with self.voidcmd(), which handles non-200 responses by raising error_reply. When I originally wrote that patch in 2008, such a system was running on a DEC Alpha under OpenVMS. Within months of the first test suite appearing for ftplib, that same vendor replaced their systems. The new server had no BLOCK transmission support, but was capable of handling multiple consecutive passive mode STREAM data connections without fault. Even at the time, I couldn't find any other freely available FTP servers supporting BLOCK. But STREAM was and continues to be the standard. Essentially this means that any changes to the existing PR may not be work properly with actual servers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:18:09 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 03:18:09 +0000 Subject: [issue45584] Clarifying truncating in documentation In-Reply-To: <1634952666.85.0.640050968697.issue45584@roundup.psfhosted.org> Message-ID: <1635823089.55.0.100996189687.issue45584@roundup.psfhosted.org> Terry J. Reedy added the comment: Current docs: math.ceil(x) Return the ceiling of x, the smallest integer greater than or equal to x. If x is not a float, delegates to x.__ceil__(), which should return an Integral value. math.floor(x) Return the floor of x, the largest integer less than or equal to x. If x is not a float, delegates to x.__floor__(), which should return an Integral value. math.trunc(x) Return the Real value x truncated to an Integral (usually an integer). Delegates to x.__trunc__(). Problems. 0. First sentence not parallel. 1. What does truncated mean? 2. What does 'Real' mean? 3. Delegation sentence not quite parallel. Copy the ceil/floor version. Current Proposal: Return the Real value *x* truncated to an Integral (usually an integer). Truncating *x* means removing the digits after the decimal separator, hence rounding toward 0. It is equivalent to floor and ceil for positive and negative numbers respectively. Delegates to :meth:`x.__trunc__() `. We can't say "Return the truncation (which refers to the action, not the result). "Return the truncated remains of x" would be accurate but begs the question about truncate. I suggest instead: "Return x with the fractional part removed, leaving the integer part. This rounds toward 0.0 and is equivalent to floor and ceil for positive and negative x respectively. If x is not a float, delegates to x.__trunc__(), which should return an Integral value." ---------- nosy: +mark.dickinson, rhettinger, terry.reedy versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:20:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 03:20:31 +0000 Subject: [issue45589] webbrowser does not handle opens under Windows WSL properly In-Reply-To: <1635010402.44.0.770979979986.issue45589@roundup.psfhosted.org> Message-ID: <1635823231.58.0.339403782973.issue45589@roundup.psfhosted.org> Terry J. Reedy added the comment: Windows people, do we support running on WSL? Is there a buildbot running it? ---------- nosy: +terry.reedy stage: -> test needed versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:23:50 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 03:23:50 +0000 Subject: [issue45602] The grammar misses links that are present everywhere else In-Reply-To: <1635128753.08.0.122680667814.issue45602@roundup.psfhosted.org> Message-ID: <1635823430.63.0.115847645416.issue45602@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +lukasz.langa, pablogsal stage: -> test needed versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:28:13 2021 From: report at bugs.python.org (Arthur Milchior) Date: Tue, 02 Nov 2021 03:28:13 +0000 Subject: [issue45584] Clarifying truncating in documentation In-Reply-To: <1634952666.85.0.640050968697.issue45584@roundup.psfhosted.org> Message-ID: <1635823693.87.0.354393131769.issue45584@roundup.psfhosted.org> Arthur Milchior added the comment: I'm quite fan of your suggestion. Should I push it on the PR? Do you create another PR? I'm not used to BPO, I beg your pardon, only to github ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:55:05 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 03:55:05 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635825305.04.0.151900993774.issue45625@roundup.psfhosted.org> Terry J. Reedy added the comment: Python has async frameworks other than anyncio. At least one is much older than asyncio. I think that this proposal to run one by default, on startup, should be rejected. >My script must be able to run properly without any special setup. Then write it with proper python, including the needed import of the async runner you want. ---------- nosy: +asvetlov, terry.reedy, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 1 23:59:14 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 03:59:14 +0000 Subject: [issue45638] Does ccbench still require 2.6 compatibility? In-Reply-To: <1635379544.92.0.412444620127.issue45638@roundup.psfhosted.org> Message-ID: <1635825554.39.0.519225223582.issue45638@roundup.psfhosted.org> Terry J. Reedy added the comment: Lukasz, is 'delete it' the no-brainer it seems to be? ---------- nosy: +lukasz.langa, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:07:54 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 04:07:54 +0000 Subject: [issue45584] Clarifying truncating in documentation In-Reply-To: <1634952666.85.0.640050968697.issue45584@roundup.psfhosted.org> Message-ID: <1635826074.63.0.537914210101.issue45584@roundup.psfhosted.org> Terry J. Reedy added the comment: Yes, revise and retest your branch and push it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:23:39 2021 From: report at bugs.python.org (Arthur Milchior) Date: Tue, 02 Nov 2021 04:23:39 +0000 Subject: [issue45584] Clarifying truncating in documentation In-Reply-To: <1634952666.85.0.640050968697.issue45584@roundup.psfhosted.org> Message-ID: <1635827019.28.0.00554302111359.issue45584@roundup.psfhosted.org> Arthur Milchior added the comment: Done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:29:39 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 04:29:39 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635827379.53.0.34639625162.issue44828@roundup.psfhosted.org> Ned Deily added the comment: As of 2021-11-02, the macOS installer file on python.org for the 3.10.0 release has been updated to include an updated Tk library that includes this fix. All other files installed by the installer are the same as in the original 3.10.0 installer, other than the Tk libraries and the installer ReadMe file. This updated installer pkg, at https://www.python.org/ftp/python/3.10.0/python-3.10.0post1-macos11.pkg, is now the default download for macOS from python.org and appears on the 3.10.0 release page (https://www.python.org/downloads/release/python-3100/). If you have already installed the original 3.10.0 universal2 installer pkg from python.org and are encountering this problem with file dialog windows on macOS 12 Monterey, you can download and run the updated installer pkg to obtain the updated Tk libraries. The updated Tk will also be included in the macOS installers provided with the next Python releases: 3.9.8 (expected to be released this week) and 3.10.1 (planned for 2021-12-06), as well as the 3.11.0a2 development preview. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 00:35:10 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 04:35:10 +0000 Subject: [issue45641] Error In opening a file through tkinter on macOS Monterey In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org> Message-ID: <1635827710.24.0.436091049094.issue45641@roundup.psfhosted.org> Ned Deily added the comment: See msg405488: an updated macOS installer for 3.10.0 is now available as the default download from python.org. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:08:53 2021 From: report at bugs.python.org (Dev Kumar) Date: Tue, 02 Nov 2021 05:08:53 +0000 Subject: [issue45641] Error In opening a file through tkinter on macOS Monterey In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org> Message-ID: <1635829733.4.0.309438188604.issue45641@roundup.psfhosted.org> Dev Kumar added the comment: Ya, it's resolved but, The saving prompt is not closing after saving the file. ---------- assignee: -> terry.reedy components: -Tkinter, macOS resolution: duplicate -> wont fix status: closed -> open type: crash -> behavior Added file: https://bugs.python.org/file50417/Screen Shot 2021-11-02 at 10.37.23 AM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:46:21 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 05:46:21 +0000 Subject: [issue45641] Error In opening a file through tkinter on macOS Monterey In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org> Message-ID: <1635831981.59.0.991316573851.issue45641@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. We'll look into it on Issue44828. ---------- resolution: wont fix -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 01:52:28 2021 From: report at bugs.python.org (Ethan Furman) Date: Tue, 02 Nov 2021 05:52:28 +0000 Subject: [issue2628] ftplib Persistent data connection In-Reply-To: <1208130611.58.0.0933193390026.issue2628@psf.upfronthosting.co.za> Message-ID: <1635832348.9.0.305593714763.issue2628@roundup.psfhosted.org> Ethan Furman added the comment: Ah. Well, in that case closing seems like the best idea. Thank you, Jonathan, for getting the CLA signed and providing perspective. Thank you, Mike, for moving this issue forward. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 03:02:07 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 07:02:07 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635836527.23.0.88673565091.issue44828@roundup.psfhosted.org> Ned Deily added the comment: Alas, the celebration was premature. Shortly after posting msg405488 above, I installed the updated 3.10.0 on yet another macOS system and, on this one, I observed a problem: under some circumstances at least, the Save dialog window becomes orphaned and does not disappear until IDLE terminates. Here is one sequence of commands I've used: - launch IDLE -> IDLE opens an IDLE shell window - press CMD-N to open a new IDLE edit window - type Python text into the window with a syntax error: x = $1 print(x) - press CMD-S to save the text into a file -> file Save window opens - enter a file name and click on Save -> file is saved and IDLE edit window regains focus - press F5 to run the script -> "Invalid syntax" popup appears - click on OK to dismiss popup -> the popup disappears and the edit window regains focus. BUT sometimes (and not always) the Save window reappears behind the edit window and does not respond to Cancel or Save buttons, remaining orphaned until IDLE is exited. This happens on both Monterey and Big Sur, I haven't tried earlier systems. So, while the current fix does make IDLE file dialogs usable on Monterey, it introduces an orphaned (though seemingly harmless) window on presumably all systems. The big question is why didn't we see this during earlier testing? In my case, the answer is that on all the systems I tested with, the Save dialog window was in its default "compact" form and thus was completely hidden by the IDLE windows. Plus it doesn't seem to always happen if you vary the sequence of events slightly, not surprisingly. I only noticed the orphaned Save window now because on this latest system the Save window defaulted to the fully expanded version (with the side bar etc) and that Save window was wide enough to not be fully hidden behind the other IDLE windows. Sigh! Until we can resolve this, I have reverted the changes to the website so that the default macOS download is again the original 3.10.0 installer. The patched installer is still downloadable for testing at https://www.python.org/ftp/python/3.10.0/python-3.10.0post1-macos11.pkg. ---------- resolution: fixed -> stage: resolved -> needs patch status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 04:03:35 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 08:03:35 +0000 Subject: [issue45641] Error In opening a file through tkinter on macOS Monterey In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org> Message-ID: <1635840215.75.0.264373293102.issue45641@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: terry.reedy -> components: +Tkinter, macOS -IDLE status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 04:21:56 2021 From: report at bugs.python.org (=?utf-8?q?Micha=C5=82_Bartoszkiewicz?=) Date: Tue, 02 Nov 2021 08:21:56 +0000 Subject: [issue45687] Infinite recursion in Pickler.persistent_id Message-ID: <1635841316.88.0.961902802593.issue45687@roundup.psfhosted.org> New submission from Micha? Bartoszkiewicz : The following code, which seems reasonable: import io import pickle class Pickler(pickle.Pickler): def persistent_id(self, obj): return super().persistent_id(obj) Pickler(io.BytesIO()).dump(42) crashes with: RecursionError: maximum recursion depth exceeded while calling a Python object It works perfectly when inheriting from pickle._Pickler (the Python implementation). ---------- components: Library (Lib) files: pickle-bug.py messages: 405494 nosy: embe-navalgo priority: normal severity: normal status: open title: Infinite recursion in Pickler.persistent_id type: behavior versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file50418/pickle-bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 04:24:05 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 08:24:05 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy Message-ID: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> New submission from Christian Heimes : stdlib_module_names.h is missing the macOS specific module _scproxy. Guido ran into the problem in PR https://github.com/python/cpython/pull/29118 ---------- components: Build messages: 405495 nosy: christian.heimes, eric.snow, gvanrossum, vstinner priority: normal severity: normal status: open title: stdlib_module_names.h is missing _scproxy type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 04:29:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 08:29:24 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1635841764.83.0.0307568874922.issue45688@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27618 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:15:22 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Tue, 02 Nov 2021 09:15:22 +0000 Subject: [issue45689] Custom Name for ThreadPoolExecutor Message-ID: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> New submission from Tangellapalli Sai Hanuma Rahul : Feature Request: Where we can use custom Names for separate threads submitted in ThreadPoolExecutor. It achieves by sending the name string to _work_queue of ThreadPoolExecutor and then in _worker function modifies the name of the current thread (through name property). ---------- components: Library (Lib) files: test.py hgrepos: 409 messages: 405496 nosy: RahulARanger priority: normal severity: normal status: open title: Custom Name for ThreadPoolExecutor type: enhancement versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file50419/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:16:16 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Nov 2021 09:16:16 +0000 Subject: [issue45687] Infinite recursion in Pickler.persistent_id In-Reply-To: <1635841316.88.0.961902802593.issue45687@roundup.psfhosted.org> Message-ID: <1635844576.28.0.537261853635.issue45687@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- components: +Interpreter Core nosy: +serhiy.storchaka versions: +Python 3.11 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:33:31 2021 From: report at bugs.python.org (mike mcleod) Date: Tue, 02 Nov 2021 09:33:31 +0000 Subject: [issue2628] ftplib Persistent data connection In-Reply-To: <1635832348.9.0.305593714763.issue2628@roundup.psfhosted.org> Message-ID: mike mcleod added the comment: You're welcome. Regards, Mike On Tue, 2 Nov 2021 at 05:52, Ethan Furman wrote: > > Ethan Furman added the comment: > > Ah. Well, in that case closing seems like the best idea. > > Thank you, Jonathan, for getting the CLA signed and providing perspective. > > Thank you, Mike, for moving this issue forward. > > ---------- > resolution: -> rejected > stage: patch review -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:41:23 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Tue, 02 Nov 2021 09:41:23 +0000 Subject: [issue45689] Custom Name for ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1635846083.04.0.515179245147.issue45689@roundup.psfhosted.org> Change by Tangellapalli Sai Hanuma Rahul : ---------- hgrepos: +410 keywords: +patch pull_requests: +27619 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:41:37 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Tue, 02 Nov 2021 09:41:37 +0000 Subject: [issue45689] Custom Name for ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1635846097.08.0.317621069242.issue45689@roundup.psfhosted.org> Change by Tangellapalli Sai Hanuma Rahul : ---------- hgrepos: -410 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 05:55:43 2021 From: report at bugs.python.org (Fred) Date: Tue, 02 Nov 2021 09:55:43 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635846943.31.0.209003337301.issue45625@roundup.psfhosted.org> Fred added the comment: I don't care what async framework is used, nor do I care if its a x86 or ARM, or if its Windows or Linux. I don't want to have to setup an async runner because it is boilerplate code, and it brings concern into my application which is outside of the domain of my application. In JavaScript, I can just call await fetch() or any other asynchronous function without having to pick and configure a async runtime. On .NET it is also very easy, just await a function at the top-level without declare any runtime either. https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/top-level-statements Python is suppose to be a high-level language. Programmers should focus on their domain, not underlying things such as which runtime to use, which garbage collector to use, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 06:35:39 2021 From: report at bugs.python.org (Maksim Beliaev) Date: Tue, 02 Nov 2021 10:35:39 +0000 Subject: [issue25024] Allow passing "delete=False" to TemporaryDirectory In-Reply-To: <1441690580.39.0.270846340544.issue25024@psf.upfronthosting.co.za> Message-ID: <1635849339.11.0.893485615614.issue25024@roundup.psfhosted.org> Maksim Beliaev added the comment: just want to correct code that Nils post in the last comment to really take args and kwargs ~~~ def mkdtemp_persistent(*args, persistent=True, **kwargs): if persistent: @contextmanager def normal_mkdtemp(): yield tempfile.mkdtemp(*args, **kwargs) return normal_mkdtemp() else: return tempfile.TemporaryDirectory(*args, **kwargs) with mkdtemp_persistent(persistent=False) as dir: ... ~~~ ---------- nosy: +beliaev-maksim _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 06:37:54 2021 From: report at bugs.python.org (za) Date: Tue, 02 Nov 2021 10:37:54 +0000 Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst In-Reply-To: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org> Message-ID: <1635849474.75.0.388438254839.issue45633@roundup.psfhosted.org> Change by za : ---------- nosy: +za nosy_count: 3.0 -> 4.0 pull_requests: +27620 pull_request: https://github.com/python/cpython/pull/29360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 06:44:42 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 02 Nov 2021 10:44:42 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635849882.12.0.125957900351.issue45625@roundup.psfhosted.org> Andrew Svetlov added the comment: As people write above, Python supports multiple async frameworks, asyncio is not the single choice. You should select and maybe configure the async framework before executing your first `await` statement. That's why the proposal doesn't work in Python. Both javascript and C# are designed slightly differently: they have the only async subsystem that is deeply built into the language. It allows *implicit* async engine initialization and starting. Sorry, should close the issue. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 06:47:09 2021 From: report at bugs.python.org (Fred) Date: Tue, 02 Nov 2021 10:47:09 +0000 Subject: [issue45625] Add support for top-level await In-Reply-To: <1635334685.92.0.999778106074.issue45625@roundup.psfhosted.org> Message-ID: <1635850029.46.0.0420825605902.issue45625@roundup.psfhosted.org> Fred added the comment: Yeah, those other languages such as C# and JavaScript and others make async much more easier, approachable, reduces boilerplate code and lowers the bar for entry! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:09:01 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 11:09:01 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1635851341.81.0.336687641485.issue45688@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 34098991289cb3e8eec012fa0243f30b9709666f by Christian Heimes in branch 'main': bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358) https://github.com/python/cpython/commit/34098991289cb3e8eec012fa0243f30b9709666f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:09:07 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 11:09:07 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1635851347.73.0.227255767333.issue45688@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +27621 pull_request: https://github.com/python/cpython/pull/29361 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:25:17 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 11:25:17 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635852317.19.0.396564226067.issue43158@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 77a1f8d94c29da7bda4bd43e5a9c2233573d46ee by Christian Heimes in branch 'main': bpo-43158: Use configure values for building _uuid extension (GH-29353) https://github.com/python/cpython/commit/77a1f8d94c29da7bda4bd43e5a9c2233573d46ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:25:22 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 11:25:22 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635852322.6.0.550369992879.issue43158@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27622 pull_request: https://github.com/python/cpython/pull/29362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:25:28 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 11:25:28 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635852328.46.0.57330052291.issue43158@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27623 pull_request: https://github.com/python/cpython/pull/29363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:32:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 11:32:40 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1635852760.54.0.351871346015.issue45688@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b2ae63161926527e31b9a9071b38836ad88e9a92 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45688: Add _scproxy to sys.stdlib_module_names (GH-29358) (GH-29361) https://github.com/python/cpython/commit/b2ae63161926527e31b9a9071b38836ad88e9a92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:32:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 11:32:48 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1635852768.88.0.641630322848.issue45688@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:49:41 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 11:49:41 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635853781.57.0.475171906727.issue43158@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b71bc052454803aa8bd3e7edd2044e2d5e962243 by Miss Islington (bot) in branch '3.10': [3.10] bpo-43158: Use configure values for building _uuid extension (GH-29353) (GH-29362) https://github.com/python/cpython/commit/b71bc052454803aa8bd3e7edd2044e2d5e962243 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:52:46 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 11:52:46 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635853966.67.0.725147155425.issue43158@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 91a51c5ffc3bd9da28a0000550530f6f2bcc25a2 by Miss Islington (bot) in branch '3.9': [3.9] bpo-43158: Use configure values for building _uuid extension (GH-29353) (GH-29363) https://github.com/python/cpython/commit/91a51c5ffc3bd9da28a0000550530f6f2bcc25a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 07:53:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Nov 2021 11:53:11 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1635853991.14.0.136995302711.issue43158@roundup.psfhosted.org> Christian Heimes added the comment: The problem should be fixed now. ---------- stage: patch review -> commit review status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 08:34:58 2021 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 02 Nov 2021 12:34:58 +0000 Subject: [issue45638] Does ccbench still require 2.6 compatibility? In-Reply-To: <1635379544.92.0.412444620127.issue45638@roundup.psfhosted.org> Message-ID: <1635856498.22.0.418924556007.issue45638@roundup.psfhosted.org> Skip Montanaro added the comment: CCbench was mentioned recently in the discussion about Sam Gross's nogil branch: https://mail.python.org/archives/list/python-dev at python.org/message/WRT7F2RHHCQ3N2TYEDC6JSIJ4T2ZM6F7/ I'm not convinced that deleting it is a no-brainer. Maybe if it landed somewhere generally useful (pyperformance?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 09:39:20 2021 From: report at bugs.python.org (andrew cooke) Date: Tue, 02 Nov 2021 13:39:20 +0000 Subject: [issue45690] Argparse exclusive group inside required exclusive group displays incorrectly Message-ID: <1635860360.92.0.910770346728.issue45690@roundup.psfhosted.org> New submission from andrew cooke : The code below, when invoked with -h, prints: (.env) [andrew at localhost py]$ python -m tests_sa.argparse_bug -h usage: argparse_bug.py [-h] (-a A | [-b B | -c C)] options: -h, --help show this help message and exit -a A -b B -c C where the final two characters in the usage line are swapped. It should be usage: argparse_bug.py [-h] (-a A | [-b B | -c C]) or maybe even usage: argparse_bug.py [-h] (-a A | (-b B | -c C)) from argparse import ArgumentParser def main(): parser = ArgumentParser() outer = parser.add_mutually_exclusive_group(required=True) outer.add_argument('-a') inner = outer.add_mutually_exclusive_group() inner.add_argument('-b') inner.add_argument('-c') parser.parse_args() if __name__ == '__main__': main() ---------- components: Library (Lib) messages: 405509 nosy: acooke priority: normal severity: normal status: open title: Argparse exclusive group inside required exclusive group displays incorrectly versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 09:43:55 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 02 Nov 2021 13:43:55 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1635860635.65.0.144944009379.issue45688@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 10:47:27 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 14:47:27 +0000 Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst In-Reply-To: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org> Message-ID: <1635864447.55.0.349897047461.issue45633@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27625 pull_request: https://github.com/python/cpython/pull/29365 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 10:47:22 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 14:47:22 +0000 Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst In-Reply-To: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org> Message-ID: <1635864442.17.0.0612711627029.issue45633@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +27624 pull_request: https://github.com/python/cpython/pull/29364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 10:47:30 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 02 Nov 2021 14:47:30 +0000 Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst In-Reply-To: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org> Message-ID: <1635864450.72.0.78177058155.issue45633@roundup.psfhosted.org> Ken Jin added the comment: New changeset 454cdb99abcda37413b15167cda564091fec2572 by Dmitry Smirnov in branch 'main': bpo-45633: Fix newtypes doc typo (GH-29318) https://github.com/python/cpython/commit/454cdb99abcda37413b15167cda564091fec2572 ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 11:36:07 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 02 Nov 2021 15:36:07 +0000 Subject: [issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489) In-Reply-To: <1602963425.44.0.576962569847.issue42064@roundup.psfhosted.org> Message-ID: <1635867367.17.0.522075689654.issue42064@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 401272e6e660445d6556d5cd4db88ed4267a50b3 by Erlend Egeberg Aasland in branch 'main': bpo-42064: Adapt `sqlite3` to multi-phase init (PEP 489) (GH-29234) https://github.com/python/cpython/commit/401272e6e660445d6556d5cd4db88ed4267a50b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 11:51:37 2021 From: report at bugs.python.org (Hans-Christoph Steiner) Date: Tue, 02 Nov 2021 15:51:37 +0000 Subject: [issue45567] Support TLS Encrypted ClientHello (ECH) In-Reply-To: <1634893186.6.0.527110144987.issue45567@roundup.psfhosted.org> Message-ID: <1635868297.99.0.583622954881.issue45567@roundup.psfhosted.org> Hans-Christoph Steiner added the comment: I agree with all you say, but I think it is important to not rule out handling HTTPS/SVCB DNS here. It can happen at a later stage though. What you propose works great for the first step. If handling the DNS is punted to some external library, that means that each client app will have to implement this itself, and its non-trivial. In that scenario, very few clients will implement it. This makes me believe that this should be implemented in the core. Granted, its an open question whether the ssl module is the right place. For example, it could makes more sense to handle HTTPS/SVCB DNS in the HTTP libs (urllib, requests, etc), but that means non-HTTP uses (XMPP, Matrix, etc) will be disadvantaged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:04:49 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Nov 2021 16:04:49 +0000 Subject: [issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse. Message-ID: <1635869089.92.0.280577291297.issue45691@roundup.psfhosted.org> New submission from Mark Shannon : We currently have an unstable state in the VM where some core objects are static and some are per-interpreter. For example, smalls ints are allocated per-interpreter, but many classes are allocated statically. This means that if any int is reachable from a class, then references to per-interpreter objects can be left dangling, or be out of date. E.g. consider this sequence: 1. Create an interpreter 2. Destroy it. 3. Create a new interpreter `sys.float_info.n_unnamed_fields` causes a memory violation if the per-interpreter allocated 0 held by sys.float_info.n_unnamed_fields is freed. If it is not freed, then `sys.float_info.n_unnamed_fields is 0` is False, meaning that there are two zeros present. The above is just an example. Classes have many references to ints, floats, code objects, etc. Any of those could have the same issue. All objects that form the core object graph must either be entirely static, or entirely per-interpreter. We cannot change from static to per-interpreter in a piecemeal fashion. It must be done all at once. ---------- components: Interpreter Core messages: 405514 nosy: Mark.Shannon, eric.snow, vstinner priority: normal severity: normal status: open title: Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse. type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:06:26 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 16:06:26 +0000 Subject: [issue45638] Does ccbench still require 2.6 compatibility? In-Reply-To: <1635379544.92.0.412444620127.issue45638@roundup.psfhosted.org> Message-ID: <1635869186.1.0.234633481347.issue45638@roundup.psfhosted.org> Terry J. Reedy added the comment: By 'it' I meant the comment and 2.6 compatibility you asked about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:13:39 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 16:13:39 +0000 Subject: [issue45646] Star expression in comprehension wrongly indicates to use or_expression after the star In-Reply-To: <1635432142.42.0.274045830946.issue45646@roundup.psfhosted.org> Message-ID: <1635869619.85.0.796834872252.issue45646@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:22:07 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Nov 2021 16:22:07 +0000 Subject: [issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse. In-Reply-To: <1635869089.92.0.280577291297.issue45691@roundup.psfhosted.org> Message-ID: <1635870127.83.0.598123092266.issue45691@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +27626 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29366 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:23:39 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 16:23:39 +0000 Subject: [issue45647] "expression" is erroneous in the doc In-Reply-To: <1635432686.87.0.829733368222.issue45647@roundup.psfhosted.org> Message-ID: <1635870219.07.0.22549066015.issue45647@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:45:21 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 16:45:21 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. Message-ID: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> New submission from Terry J. Reedy : IDLE currently defines the same set of chars in 5 places with 5 names. (Listed by Serhiy Storchaka in #45669.) Lib/idlelib/autoexpand.py:20: wordchars = string.ascii_letters + string.digits + "_" Lib/idlelib/undo.py:254: alphanumeric = string.ascii_letters + string.digits + "_" Lib/idlelib/editor.py:809: IDENTCHARS = string.ascii_letters + string.digits + "_" Lib/idlelib/hyperparser.py:13:_ASCII_ID_CHARS = frozenset(string.ascii_letters + string.digits + "_") Lib/idlelib/autocomplete.py:33:ID_CHARS = string.ascii_letters + string.digits + "_" I suspect that either a string or frozenset would work everywhere (check). I will pick a name after checking this. The single definition would go in the proposed utils.py, which is part of another issue and PR. (Note: the utility tk index functions should also go there.) ---------- assignee: terry.reedy components: IDLE messages: 405516 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: define word/id chars in one place. type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:52:28 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 16:52:28 +0000 Subject: [issue45669] An 'ascii_alphanumerics' variable is missing in the 'strings' lib In-Reply-To: <1635523863.84.0.534508316323.issue45669@roundup.psfhosted.org> Message-ID: <1635871948.86.0.193525107841.issue45669@roundup.psfhosted.org> Terry J. Reedy added the comment: Serhiy, thanks for the list. I can see it as either justifying or refuting the proposal. So +-1 for the moment. (I opened #45692 to eliminate the duplication in idlelib.) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:55:56 2021 From: report at bugs.python.org (Marc Culler) Date: Tue, 02 Nov 2021 16:55:56 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635872156.39.0.898845508162.issue44828@roundup.psfhosted.org> Marc Culler added the comment: I found the cause of the zombie dialog window. I was supposed to call [parent endSheet] after calling [parent beginSheet]. Adding that stops the window from reappearing. But it does not solve the whole problem. Subsequent Command-S presses do not cause the file dialog to reappear. In fact, they do not even generate a call to showOpenSavePanel, which is supposed to present the dialog, and is also the function where all of the changes have been made. So this would seem to be a different bug. I see that if I open a new editor with Command-N and enter some text then Command-S works for the new editor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 12:59:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Nov 2021 16:59:17 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635872357.52.0.608644902237.issue45692@roundup.psfhosted.org> Serhiy Storchaka added the comment: This set is mostly outdated. In Python 2 it was a set of characters composing identifiers, but in Python 3 identifiers can contain non-ASCII characters. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:00:40 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 17:00:40 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635872440.76.0.936026447647.issue44828@roundup.psfhosted.org> Ned Deily added the comment: > Subsequent Command-S presses do not cause the file dialog to reappear. Do you mean Command-S after modifying an IDLE edit window that has already been Save (or was Opened, not New)? In that case, the file dialog shouldn't appear: it saves to the existing file. To change the file, you'd need to do a Save As ... (Shift-Command-S). Or perhaps I'm misunderstanding? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:05:45 2021 From: report at bugs.python.org (paul j3) Date: Tue, 02 Nov 2021 17:05:45 +0000 Subject: [issue45690] Argparse exclusive group inside required exclusive group displays incorrectly In-Reply-To: <1635860360.92.0.910770346728.issue45690@roundup.psfhosted.org> Message-ID: <1635872745.42.0.063817341673.issue45690@roundup.psfhosted.org> paul j3 added the comment: There was a bug/issue that addressed problems with nested mutually_exclusive_groups. It should be easy to find. The problem is that the usage formatter is brittle, building a string and then striping out "unnecessary" characters. I assume the fix handled the default case (not required), but apparently it missed this variation. I wasn't too involved with that, since in my opinion nesting these groups is useless, and should be avoided. You might as well use one union group. Test the parsing for yourself. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:08:14 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Nov 2021 17:08:14 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635872894.2.0.166986536089.issue45692@roundup.psfhosted.org> Serhiy Storchaka added the comment: Complete sets of characters which can be used in identifiers are too large: >>> allchars = ''.join(map(chr, range(0x110000))) >>> identstartchars = ''.join(c for c in allchars if c.isidentifier()) >>> identcontchars = ''.join(c for c in allchars if ('a' + c).isidentifier()) >>> len(identstartchars), len(identcontchars) (131975, 135053) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:17:19 2021 From: report at bugs.python.org (paul j3) Date: Tue, 02 Nov 2021 17:17:19 +0000 Subject: [issue45673] argparse error with option with optional value In-Reply-To: <1635527165.05.0.842141756958.issue45673@roundup.psfhosted.org> Message-ID: <1635873439.1.0.417772490423.issue45673@roundup.psfhosted.org> paul j3 added the comment: This is too big of an example for this board; I think it should have been asked on StackOverFlow. Or maybe trimmed do to a more compact example. But in any case, this is normal behavior for argparse. Type checking, here 'int', is done after the string is allocated to the '-s' argument. Reserving that string for the required positional requires a form of look ahead that argparse does not currently do. I think there's an old bug/issue on the topic, but the fix was, if I remember correctly, too complex to simply drop in. I may look that up later. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:27:41 2021 From: report at bugs.python.org (Hai Shi) Date: Tue, 02 Nov 2021 17:27:41 +0000 Subject: [issue45444] test.test_concurrent_futures fail in x86_ 64 architecture In-Reply-To: <1634045867.87.0.955416673386.issue45444@roundup.psfhosted.org> Message-ID: <1635874061.1.0.251160712671.issue45444@roundup.psfhosted.org> Hai Shi added the comment: > I use the Linux operating system (openeuler), kernel version 4.19.90, GCC version 7.3.0. I directly run the following statement in the virtual machine Hm. I haven't openeuler system, but I get docker container of the euler system. The tests have passed in my docker containers(x86_64/aarch64). My aarch64 systeminfo: Linux version 4.19.36-vhulk1907.1.0.h1088.eulerosv2r8.aarch64 (abuild at szxrtosci10000) (gcc version 7.3.0 (GCC)) #1 SMP Fri Aug 6 17:40:05 UTC 2021 build cmd: ./configure && make -j and the output of `./python -m test.pythoninfo`: test_socket.HAVE_SOCKET_ALG: True test_socket.HAVE_SOCKET_BLUETOOTH: False test_socket.HAVE_SOCKET_CAN: True test_socket.HAVE_SOCKET_CAN_ISOTP: False test_socket.HAVE_SOCKET_CAN_J1939: False test_socket.HAVE_SOCKET_QIPCRTR: False test_socket.HAVE_SOCKET_RDS: False test_socket.HAVE_SOCKET_UDPLITE: True test_socket.HAVE_SOCKET_VSOCK: False test_support._is_gui_available: False I checked the `test_socket.HAVE_SOCKET_QIPCRTR` and haven't find the correlation with test_concurrent_futures.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:28:55 2021 From: report at bugs.python.org (paul j3) Date: Tue, 02 Nov 2021 17:28:55 +0000 Subject: [issue45656] argparse bug: prefix_chars argument to add_argument_group doesn't really work In-Reply-To: <1635445632.13.0.297943907791.issue45656@roundup.psfhosted.org> Message-ID: <1635874135.05.0.85289414299.issue45656@roundup.psfhosted.org> paul j3 added the comment: Use of 'prefix_chars' as a argument_group parameter is not documented, nor intended. If it does appear to work in the help formatting, it is probably the result of inheritance, since both ArgumentParser and Argument_group subclass a _Actions_Container class. I'd have to examine the code to see what's happening. Argument_groups are used only for help formatting, not for parsing. In any case, I don't think anything needs to be changed or fixed. ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 13:32:33 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Nov 2021 17:32:33 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635874353.02.0.552467676354.issue45692@roundup.psfhosted.org> Serhiy Storchaka added the comment: This in an interesting problem. I am going to work on it at the next weekends. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:01:39 2021 From: report at bugs.python.org (Marc Culler) Date: Tue, 02 Nov 2021 18:01:39 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635876099.83.0.993064769042.issue44828@roundup.psfhosted.org> Marc Culler added the comment: Yes that is what I meant. So I guess everything may be OK now. I did verify that the Tk demo can repeatedly open file save dialogs. When you press Command-S on a non-new edit window you do see the flash of the Save menu, so it would appear that a dialog was meant to appear, and there is no indication of why it did not. But that is an IDLE UX issue and in any case it sounds like Tk is not doing anything wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:10:54 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 02 Nov 2021 18:10:54 +0000 Subject: [issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489) In-Reply-To: <1602963425.44.0.576962569847.issue42064@roundup.psfhosted.org> Message-ID: <1635876654.7.0.20691398364.issue42064@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:12:25 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 18:12:25 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635876745.51.0.0316423406875.issue44828@roundup.psfhosted.org> Ned Deily added the comment: > When you press Command-S on a non-new edit window you do see the flash of the Save menu, so it would appear that a dialog was meant to appear, and there is no indication of why it did not. Yes, that is long-standing behavior of IDLE on macOS; I just verified that the Save menu flash also happens with the legacy 8.6.8 Tk. I have never noticed it as a problem before and I'm not aware of any user reports of it so I think we can live with that :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:15:42 2021 From: report at bugs.python.org (Marc Culler) Date: Tue, 02 Nov 2021 18:15:42 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635876942.12.0.788169609675.issue44828@roundup.psfhosted.org> Marc Culler added the comment: OK. Shift-Command-S works. I will attach the fossil diff which should have enough context to indicate where to add the one new line. Then I will merge this change into the 8.6.12 release candidate ---------- Added file: https://bugs.python.org/file50420/endsheet.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:32:35 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 02 Nov 2021 18:32:35 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 Message-ID: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> New submission from Jim Crist-Harif : To create a new server with `loop.create_server` that listens on all interfaces and a random port, I'd expect passing in `host=""`, `port=0` to work (per the documentation). However, as written this results in 2 different ports being used - one for ipv4 and one for ipv6. Instead I'd expect a single random port be determined once, and reused for all other interfaces. Running the example test code (attached) results in: ``` $ python test.py listening on 0.0.0.0:38023 listening on :::40899 Traceback (most recent call last): File "/home/jcristharif/Code/distributed/test.py", line 36, in asyncio.run(main()) File "/home/jcristharif/miniconda3/envs/dask/lib/python3.9/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/jcristharif/miniconda3/envs/dask/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/home/jcristharif/Code/distributed/test.py", line 30, in main assert len(ports) == 1, "Only 1 port expected!" AssertionError: Only 1 port expected! ``` This behavior can be worked around by manually handling `port=0` outside of asyncio, but as it stands naive use can result in accidentally listening on multiple ports. ---------- components: asyncio files: test.py messages: 405530 nosy: asvetlov, jcristharif, yselivanov priority: normal severity: normal status: open title: `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file50421/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:42:57 2021 From: report at bugs.python.org (paul j3) Date: Tue, 02 Nov 2021 18:42:57 +0000 Subject: [issue45690] Argparse exclusive group inside required exclusive group displays incorrectly In-Reply-To: <1635860360.92.0.910770346728.issue45690@roundup.psfhosted.org> Message-ID: <1635878577.79.0.0854696242605.issue45690@roundup.psfhosted.org> paul j3 added the comment: https://bugs.python.org/issue29553 Argparser does not display closing parentheses in nested mutex groups supposedly fixed the parentheses for nested groups. You can read its discussion and patches to see why it does not handle your case. I don't see any examples have required groups. [] is used for un-required, () for required. This patch did not change how the usage was generated. It just refined how excess [()] were removed. Proper handling of groups requires a major rewrite of the usage formatter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:48:27 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 02 Nov 2021 18:48:27 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635878907.37.0.841159770396.issue45693@roundup.psfhosted.org> Change by Jim Crist-Harif : ---------- versions: +Python 3.10, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 14:49:14 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 18:49:14 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635878954.01.0.575788361492.issue45692@roundup.psfhosted.org> Terry J. Reedy added the comment: I checked for other possible ascii only problems and only found config_key.py: 14: ALPHANUM_KEYS = tuple(string.ascii_lowercase + string.digits) config_key.py: 39: if 'Shift' in modifiers and key in string.ascii_lowercase: config_key.py: 15: PUNCTUATION_KEYS = tuple('~!@#%^&*()_-+={}[]|;:,.<>/?') config_key.py: 20: AVAILABLE_KEYS = (ALPHANUM_KEYS + PUNCTUATION_KEYS + FUNCTION_KEYS + ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:01:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 02 Nov 2021 19:01:34 +0000 Subject: [issue45694] Limit the number of chained exceptions included in formatted traceback Message-ID: <1635879694.7.0.702941754246.issue45694@roundup.psfhosted.org> New submission from Irit Katriel : There is currently a limit on the number of frames in each traceback, but not on the number of chained exceptions displayed. This is why traceback.py avoids recursion (making the code more complex). A limit should probably be added. ---------- components: Interpreter Core, Library (Lib) messages: 405533 nosy: iritkatriel priority: normal severity: normal status: open title: Limit the number of chained exceptions included in formatted traceback type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:05:13 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 02 Nov 2021 19:05:13 +0000 Subject: [issue45589] webbrowser does not handle opens under Windows WSL properly In-Reply-To: <1635010402.44.0.770979979986.issue45589@roundup.psfhosted.org> Message-ID: <1635879913.21.0.970665255799.issue45589@roundup.psfhosted.org> Steve Dower added the comment: We don't formally support it yet. We probably need somebody to develop expertise in the emulation layer so that they can work with the Linux distro experts to make sure their distros are doing things properly. It has no relation at all to our Windows support (right now) - all versions of Python running in WSL 100% believe they are running on whichever Linux distro the user is running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:09:35 2021 From: report at bugs.python.org (Guido F) Date: Tue, 02 Nov 2021 19:09:35 +0000 Subject: [issue45589] webbrowser does not handle opens under Windows WSL properly In-Reply-To: <1635879913.21.0.970665255799.issue45589@roundup.psfhosted.org> Message-ID: Guido F added the comment: My code patch uses ?wslview?, which is a binary that is injected into every WSL distro and forwards file open commands to windows. I detect WSL inspecting the kernel version, which includes WSL tagging. On Tue, Nov 2, 2021 at 3:05 PM Steve Dower wrote: > > Steve Dower added the comment: > > We don't formally support it yet. We probably need somebody to develop > expertise in the emulation layer so that they can work with the Linux > distro experts to make sure their distros are doing things properly. > > It has no relation at all to our Windows support (right now) - all > versions of Python running in WSL 100% believe they are running on > whichever Linux distro the user is running. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:20:07 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 19:20:07 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635880807.89.0.885383075599.issue45692@roundup.psfhosted.org> Terry J. Reedy added the comment: There have been occasional discussions about IDLE not being properly unicode aware in some of its functions. Discussions have foundered on these facts and no fix made. 1. The direct replacement string, your 'identcontchars', seems too big. We have always assumed that O(n) linear scans would be too slow. 2. A frozen set should give O(1) lookup, like fast enough, but would be even bigger. 3. The string methods operate on and scan through multiple chars, whereas IDLE wants to test 1 char at a time. 4. Even if the O(n*n) behavior of multiple calls is acceptible, there is no function for unicode continuation chars. s.idchars requires that the first character be a start char, which is to say, not a digit. s.alnum is false for '_'. (Otherwise, it would work.) I would like to better this time. Possible responses to the blockers: 1. Correct; reject. 2. Maybe adding an elephant is better than keeping multiple IDLE features disabled for non-ascii users. How big? >>> import sys >>> fz = frozenset(c for c in map(chr, range(0x110000)) if ('a'+c).isidentifier) >>> sys.getsizeof(fz) 33554648 Whoops, each 2 or 4 byte slice of the underlying array becomes 76 bytes + 8 bytes * size of hash array. Not practical either. 3. For at least some of the uses, the repeated calls may be fast enough. 4. We can synthesize s.isidcontinue with "c.isalnum() or c == '_'". "c.isidentifier() or c.isdigit()" would also work but should be slower. Any other ideas? I will look at the use cases next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:28:31 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 02 Nov 2021 19:28:31 +0000 Subject: [issue45589] webbrowser does not handle opens under Windows WSL properly In-Reply-To: Message-ID: <37fcac8b-e275-f72d-7f1e-cb5f3cc0d3d4@python.org> Steve Dower added the comment: FWIW, I don't have wslview in the Debian distro I'm currently using. It does have wslpath though. Consistent detection and integration throughout CPython's standard library (unless we believe we need special build options too) is probably worth a python-dev discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:32:19 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 19:32:19 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635881539.2.0.754612420807.issue45692@roundup.psfhosted.org> Terry J. Reedy added the comment: autoexpand.py, line 20, wordchars 'wordchars' is correct here since words beginning with digits can be expanded. >>> s = '0x4f334' >>> 0x4f334 # Hit alt-/ after 0 and enter 324404 Used in line 89 in method getprevword while i > 0 and line[i-1] in self.wordchars: i = i-1 Proposed replacement seems to work. >>> i = len(s) ... while i > 0 and (c := s[i-1] or c == '_'): ... i -= 1 ... >>> i,c (0, '0') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:34:22 2021 From: report at bugs.python.org (Guido F) Date: Tue, 02 Nov 2021 19:34:22 +0000 Subject: [issue45589] webbrowser does not handle opens under Windows WSL properly In-Reply-To: <37fcac8b-e275-f72d-7f1e-cb5f3cc0d3d4@python.org> Message-ID: Guido F added the comment: Understood, my mistake. I wonder if explorer.exe or any other general purpose open command is guaranteed to be available in all WSL distros. There?s also a consideration to be made on WSL1 vs WSL2 (only v2 ships an actual Linux kernel). For detection, there?re some other projects that have done this for some time. Not sure they?re up to python-core standards, but I put an example for the fish shell in my original description. Might be worth looking into. On Tue, Nov 2, 2021 at 3:28 PM Steve Dower wrote: > > Steve Dower added the comment: > > FWIW, I don't have wslview in the Debian distro I'm currently using. It > does have wslpath though. > > Consistent detection and integration throughout CPython's standard > library (unless we believe we need special build options too) is > probably worth a python-dev discussion. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 15:44:21 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Nov 2021 19:44:21 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635882261.12.0.634160394269.issue45693@roundup.psfhosted.org> Eric V. Smith added the comment: Is there an OS interface to ensure the same port on both stacks? I don't know of one (although of course one might exist), in which case I don't know how you'd ensure they're both the same. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:01:08 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 20:01:08 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635883268.66.0.868174510563.issue45692@roundup.psfhosted.org> Terry J. Reedy added the comment: autocomplete.py, line 33, ID_CHARS is only used on line 137 to find the prefix of an identifier when completions have been explicitly requested. while i and (curline[i-1] in ID_CHARS or ord(curline[i-1]) > 127): i -= 1 comp_start = curline[i:j] The completion is for a name or attribute depending on whether the preceding char, if any, is '.'. Here, the unicode fix was to accept all non-ascii as possible id chars. There is no harm as the completion box only has valid completions, and if the prefix given does not match anything, nothing is highlighted. ID_CHARS could be moved to utils if the same ascii string is used in another module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:19:39 2021 From: report at bugs.python.org (paul j3) Date: Tue, 02 Nov 2021 20:19:39 +0000 Subject: [issue45656] argparse bug: prefix_chars argument to add_argument_group doesn't really work In-Reply-To: <1635445632.13.0.297943907791.issue45656@roundup.psfhosted.org> Message-ID: <1635884379.42.0.638390955508.issue45656@roundup.psfhosted.org> paul j3 added the comment: prefix_chars is a parameter of the parent _ActionsContainer class _ActionsContainer(object): def __init__(self, description, prefix_chars, argument_default, conflict_handler): super(_ActionsContainer, self).__init__() self.description = description self.argument_default = argument_default self.prefix_chars = prefix_chars self.conflict_handler = conflict_handler add_argument is also a method in this class. It uses its own prefix_chars to categorize arguments as optional/positional chars = self.prefix_chars if not args or len(args) == 1 and args[0][0] not in chars: see also _get_optional_kwargs method. class _ArgumentGroup(_ActionsContainer): inherits from _ActionsContainer, and usually gets the prefix_chars from its container (the parser) update('prefix_chars', container.prefix_chars) The parser is created with class ArgumentParser(_AttributeHolder, _ActionsContainer): and documents the use of prefix_chars. In addition to passing prefix_chars to its Super, it uses default_prefix = '-' if '-' in prefix_chars else prefix_chars[0] to define the -h help argument. Early in parsing, args strings are categorized as 'O' or 'A'. That is done in, which uses: def _parse_optional(self, arg_string): # if it doesn't start with a prefix, it was meant to be positional if not arg_string[0] in self.prefix_chars: return None def _get_option_tuples(self, option_string): also uses the parser's own prefix_chars. During parsing (several layers down) def consume_optional(start_index): # if the action is a single-dash option and takes no # arguments, try to parse more single-dash options out # of the tail of the option string chars = self.prefix_chars if arg_count == 0 and option_string[1] not in chars: Here, the parser's own prefix_chars is used to handle the chained short-dash options. --- In sum, while Argument_Group can have its own prefix_chars, that is only used for help formatting. It's the parser's prefix_chars that is used when parsing. The group's chars is ignored. The _ArgumentGroup__init__ suggests something more than simple inheritance may have been intended for prefix_chars, but in practice all it affects is the help. I haven't seen this issue raised before, and since this group parameter is not documented, I think it's safe to ignore it. An alternative is to have add_argument_group (or _ArgumentGroup__init__) explicitly reject the prefix_chars parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:23:05 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 20:23:05 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635884585.93.0.29196106834.issue45692@roundup.psfhosted.org> Terry J. Reedy added the comment: undo.py, line 254, alphanumeric Used in immediately following lines to classify chars as 'alphanumeric', 'newline', or 'punctuation' (the default). I believe I have only ever looked at this module to add the test code at the bottom. In any case, I don't know the effect of calling non-ascii chars punctuation, but suspect it is not the best thing. So I suspect that the autoexpand fix would be the best. The classify method is only used on line 248 in the merge method above. self.classify(self.chars[-1]) != self.classify(cmd.chars) merge() is only used on l.124 in addcmd. To figure out more, I would experiment identifiers without and with non-ascii and undo and redo and see what difference there is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:24:07 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 02 Nov 2021 20:24:07 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635884647.29.0.980129463667.issue45693@roundup.psfhosted.org> Jim Crist-Harif added the comment: > Is there an OS interface to ensure the same port on both stacks? I don't think this is needed? Right now the code processes as: - Expand host + port + family + flags into a list of one or more tuples of socket options (https://github.com/python/cpython/blob/401272e6e660445d6556d5cd4db88ed4267a50b3/Lib/asyncio/base_events.py#L1432-L1436) - Iterate through this list, creating a new socket for each option tuple, and bind to the corresponding host + port (https://github.com/python/cpython/blob/401272e6e660445d6556d5cd4db88ed4267a50b3/Lib/asyncio/base_events.py#L1441-L1464) In this case, each call to `socket.bind` gets a 0 port, thus binding to a new random open port number each time. What I'm asking for is that if the user passes in `port=0`, then the port is extracted in the first call to `socket.bind` when looping and used for all subsequent `socket.bind` calls in the loop. This way we only ever choose a single random open port rather than 1 for each interface. FWIW, this is also what tornado does when `port=0` is provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:30:09 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Nov 2021 20:30:09 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635885009.14.0.681044253119.issue45693@roundup.psfhosted.org> Eric V. Smith added the comment: What do you do if a port is bound for IPv4, but is in use for IPv6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:38:01 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 20:38:01 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635885481.77.0.804856208177.issue45692@roundup.psfhosted.org> Terry J. Reedy added the comment: editor.py, line 809, IDENTCHARS Used in the immediately following def colorize_syntax_error on line 814. if char and char in self.IDENTCHARS: text.tag_add("ERROR", pos + " wordstart", pos) I believe the intent is to color the part of an identifier that precedes the character marked. At the moment, I cannot think of how to trigger such a situation. I would have to add some console prints to investigate. Maybe this should get the autoexpand fix, but maybe it is dead code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:40:04 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 02 Nov 2021 20:40:04 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635885604.2.0.166374437879.issue45693@roundup.psfhosted.org> Jim Crist-Harif added the comment: Hmmm, I'd find that situation a bit surprising, but I suppose it could happen. Looks like tornado just errors, and that seems to work fine for them in practice (https://github.com/tornadoweb/tornado/blob/790715ae0f0a30b9ee830bfee75bb7fa4c4ec2f6/tornado/netutil.py#L153-L182). Binding IPv4 first might help reduce the chance of a collision, since I suspect there are more IPv4-only applications than IPv6-only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:39:47 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 20:39:47 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635885587.07.0.198153841329.issue44828@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +27627 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:42:33 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 20:42:33 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635885753.03.0.607971425478.issue44828@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +27628 pull_request: https://github.com/python/cpython/pull/29371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:44:18 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 20:44:18 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635885858.93.0.264368488485.issue44828@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +27629 pull_request: https://github.com/python/cpython/pull/29372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:46:49 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 20:46:49 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635886009.32.0.738406247413.issue44828@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +27630 pull_request: https://github.com/python/cpython/pull/29367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 16:48:04 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Nov 2021 20:48:04 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635886084.83.0.484562018393.issue45692@roundup.psfhosted.org> Terry J. Reedy added the comment: hyperparser.py, line 13, _ASCII_ID_CHARS line 15, _ASCII_ID_FIRST_CHARS, frozenset(string.ascii_letters + "_") Only used on line 18 and 21 to create 128 item lookup tables. The point is to be fast as hyperparser scans multiple chars when invoked. The expandword fix and c.isidentifier() could replace the lookup. But would they bog down response time? We need to look at hyperparser use cases and do some testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:01:41 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 21:01:41 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635886901.04.0.850104137559.issue44828@roundup.psfhosted.org> Ned Deily added the comment: New changeset 4a8b4051734fd2ce46e15e6369811132ac3a5697 by Ned Deily in branch 'main': bpo-44828: macOS installer: avoid leaving a zombie Save panel in Tk 8.6.12rc1 (GH-29367) https://github.com/python/cpython/commit/4a8b4051734fd2ce46e15e6369811132ac3a5697 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:01:54 2021 From: report at bugs.python.org (Marc Culler) Date: Tue, 02 Nov 2021 21:01:54 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635886914.41.0.381565980886.issue44828@roundup.psfhosted.org> Marc Culler added the comment: A (hypothetical) explanation: I think that each NSWindow maintains a queue of attached sheets. Failing to call the [parent endSheet] method left the file dialogue NSPanel in the queue, although it had been ordered offscreen and so was not visible. Opening the NSAlert added it to the top of the queue. Closing the alert caused it to be removed from the queue. But, since the queue was not empty, the window manager was supposed to orderFront the next sheet in the queue. That sheet was the file dialog, which had not been destroyed since adding it to the queue had incremented its reference count, and failing to remove it had not decremented its reference count. But the separate process that handles events for the file dialog had exited long ago. So that made the newly re-opened file dialog NSPanel into a zombie. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:03:02 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 21:03:02 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635886982.68.0.897409164367.issue44828@roundup.psfhosted.org> Ned Deily added the comment: New changeset 6681a77c52df41636feb213d63ba27a759c7e5f4 by Ned Deily in branch '3.10': bpo-44828: Avoid leaving a zombie Save panel. (GH-29369) https://github.com/python/cpython/commit/6681a77c52df41636feb213d63ba27a759c7e5f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:05:23 2021 From: report at bugs.python.org (Fahim Faisal) Date: Tue, 02 Nov 2021 21:05:23 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635887123.02.0.664151156019.issue44828@roundup.psfhosted.org> Change by Fahim Faisal : ---------- nosy: -i3p9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:06:22 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 02 Nov 2021 21:06:22 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635887182.32.0.461748908546.issue44828@roundup.psfhosted.org> Ned Deily added the comment: New changeset d53d9e7f4f1656a13b030b17baca743455e511fd by Ned Deily in branch '3.9': bpo-44828: Avoid leaving a zombie Save panel. (GH-29371) https://github.com/python/cpython/commit/d53d9e7f4f1656a13b030b17baca743455e511fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:27:52 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 21:27:52 +0000 Subject: [issue22449] SSLContext.load_verify_locations behavior on Windows and OSX In-Reply-To: <1411209339.34.0.91149685596.issue22449@psf.upfronthosting.co.za> Message-ID: <1635888472.51.0.795023088919.issue22449@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 11.0 -> 12.0 pull_requests: +27632 pull_request: https://github.com/python/cpython/pull/29373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:27:59 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:27:59 +0000 Subject: [issue22449] SSLContext.load_verify_locations behavior on Windows and OSX In-Reply-To: <1411209339.34.0.91149685596.issue22449@psf.upfronthosting.co.za> Message-ID: <1635888479.98.0.888267473792.issue22449@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 3551bf16ee5c25b6349209dd30e032f0f3b9ace3 by LincolnPuzey in branch 'main': bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) https://github.com/python/cpython/commit/3551bf16ee5c25b6349209dd30e032f0f3b9ace3 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:27:52 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 21:27:52 +0000 Subject: [issue45457] Documentation for ssl.load_default_certs is outdated In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org> Message-ID: <1635888472.36.0.385050819716.issue45457@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27631 pull_request: https://github.com/python/cpython/pull/29373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:27:56 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 21:27:56 +0000 Subject: [issue45457] Documentation for ssl.load_default_certs is outdated In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org> Message-ID: <1635888476.02.0.455688863471.issue45457@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27633 pull_request: https://github.com/python/cpython/pull/29374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:27:56 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 21:27:56 +0000 Subject: [issue22449] SSLContext.load_verify_locations behavior on Windows and OSX In-Reply-To: <1411209339.34.0.91149685596.issue22449@psf.upfronthosting.co.za> Message-ID: <1635888476.1.0.38485711285.issue22449@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27634 pull_request: https://github.com/python/cpython/pull/29374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:28:00 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:28:00 +0000 Subject: [issue45457] Documentation for ssl.load_default_certs is outdated In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org> Message-ID: <1635888480.12.0.796365732567.issue45457@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 3551bf16ee5c25b6349209dd30e032f0f3b9ace3 by LincolnPuzey in branch 'main': bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) https://github.com/python/cpython/commit/3551bf16ee5c25b6349209dd30e032f0f3b9ace3 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:48:00 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:48:00 +0000 Subject: [issue22449] SSLContext.load_verify_locations behavior on Windows and OSX In-Reply-To: <1411209339.34.0.91149685596.issue22449@psf.upfronthosting.co.za> Message-ID: <1635889680.47.0.585894044825.issue22449@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 71f602b54c9c5346d22a542e186746b06cccfc8e by Miss Islington (bot) in branch '3.10': bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) (GH-29373) https://github.com/python/cpython/commit/71f602b54c9c5346d22a542e186746b06cccfc8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:48:00 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:48:00 +0000 Subject: [issue45457] Documentation for ssl.load_default_certs is outdated In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org> Message-ID: <1635889680.69.0.76953551571.issue45457@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 71f602b54c9c5346d22a542e186746b06cccfc8e by Miss Islington (bot) in branch '3.10': bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) (GH-29373) https://github.com/python/cpython/commit/71f602b54c9c5346d22a542e186746b06cccfc8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:53:51 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:53:51 +0000 Subject: [issue45457] Documentation for ssl.load_default_certs is outdated In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org> Message-ID: <1635890031.76.0.804961195998.issue45457@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 4ab6e524abd2d7f21c2d7a6eaee5be1f93baf140 by Miss Islington (bot) in branch '3.9': bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) (GH-29374) https://github.com/python/cpython/commit/4ab6e524abd2d7f21c2d7a6eaee5be1f93baf140 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:53:50 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:53:50 +0000 Subject: [issue22449] SSLContext.load_verify_locations behavior on Windows and OSX In-Reply-To: <1411209339.34.0.91149685596.issue22449@psf.upfronthosting.co.za> Message-ID: <1635890030.67.0.377380707076.issue22449@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 4ab6e524abd2d7f21c2d7a6eaee5be1f93baf140 by Miss Islington (bot) in branch '3.9': bpo-45457: Minor fix to documentation for SSLContext.load_default_certs. (GH-28947) (GH-29374) https://github.com/python/cpython/commit/4ab6e524abd2d7f21c2d7a6eaee5be1f93baf140 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:54:17 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:54:17 +0000 Subject: [issue45457] Documentation for ssl.load_default_certs is outdated In-Reply-To: <1634108477.44.0.93503538382.issue45457@roundup.psfhosted.org> Message-ID: <1635890057.74.0.929370355385.issue45457@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Lincoln! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:55:55 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 02 Nov 2021 21:55:55 +0000 Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not exists In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org> Message-ID: <1635890155.35.0.520051427972.issue45406@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset a459a81530de700b3d3faeb827b22ed1c9985812 by Irit Katriel in branch 'main': bpo-45406: make inspect.getmodule() return None when getabsfile() raises FileNotFoundError (GH-28824) https://github.com/python/cpython/commit/a459a81530de700b3d3faeb827b22ed1c9985812 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:55:59 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 21:55:59 +0000 Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not exists In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org> Message-ID: <1635890159.52.0.162727215892.issue45406@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +27635 pull_request: https://github.com/python/cpython/pull/29377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:56:05 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 21:56:05 +0000 Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not exists In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org> Message-ID: <1635890165.22.0.716342790704.issue45406@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27636 pull_request: https://github.com/python/cpython/pull/29378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 17:56:27 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 02 Nov 2021 21:56:27 +0000 Subject: [issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse. In-Reply-To: <1635869089.92.0.280577291297.issue45691@roundup.psfhosted.org> Message-ID: <1635890187.75.0.107346932314.issue45691@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:09:14 2021 From: report at bugs.python.org (paul j3) Date: Tue, 02 Nov 2021 22:09:14 +0000 Subject: [issue45673] argparse error with option with optional value In-Reply-To: <1635527165.05.0.842141756958.issue45673@roundup.psfhosted.org> Message-ID: <1635890954.51.0.0777395958973.issue45673@roundup.psfhosted.org> paul j3 added the comment: https://bugs.python.org/issue9338 argparse optionals with nargs='?', '*' or '+' can't be followed by positionals As you can see this is an old issue, but still too big for a quick fix. As a general rule, don't use `nargs` like this where there's ambiguity as to how many values will be allocated to the argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:11:18 2021 From: report at bugs.python.org (Paolo Benvenuto) Date: Tue, 02 Nov 2021 22:11:18 +0000 Subject: [issue45673] argparse error with option with optional value In-Reply-To: <1635527165.05.0.842141756958.issue45673@roundup.psfhosted.org> Message-ID: <1635891078.75.0.48003694566.issue45673@roundup.psfhosted.org> Paolo Benvenuto added the comment: > As a general rule, don't use `nargs` like this where there's ambiguity as to how many values will be allocated to the argument. What could I use instead of nargs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:26:44 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 22:26:44 +0000 Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not exists In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org> Message-ID: <1635892004.06.0.235856820599.issue45406@roundup.psfhosted.org> miss-islington added the comment: New changeset 5f527caf15c52acc3f6e865721cdf781209f11ca by Miss Islington (bot) in branch '3.9': bpo-45406: make inspect.getmodule() return None when getabsfile() raises FileNotFoundError (GH-28824) https://github.com/python/cpython/commit/5f527caf15c52acc3f6e865721cdf781209f11ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:25:15 2021 From: report at bugs.python.org (paul j3) Date: Tue, 02 Nov 2021 22:25:15 +0000 Subject: [issue45673] argparse error with option with optional value In-Reply-To: <1635527165.05.0.842141756958.issue45673@roundup.psfhosted.org> Message-ID: <1635891915.78.0.725646980009.issue45673@roundup.psfhosted.org> paul j3 added the comment: Put the required positional first $ myapp myfile -s or one of the store_true arguments $ myapp -s -j myfile I think $ myapp -s -- myfile will work as well, but that needs to be tested. The '-s' has to be followed by something won't be confused for an argument, such as nothing, or a flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:23:57 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 02 Nov 2021 22:23:57 +0000 Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not exists In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org> Message-ID: <1635891837.93.0.649381666849.issue45406@roundup.psfhosted.org> miss-islington added the comment: New changeset cfdd7d26a72e7ae523039e40c11001c2d7ef36ba by Miss Islington (bot) in branch '3.10': bpo-45406: make inspect.getmodule() return None when getabsfile() raises FileNotFoundError (GH-28824) https://github.com/python/cpython/commit/cfdd7d26a72e7ae523039e40c11001c2d7ef36ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 18:28:00 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 02 Nov 2021 22:28:00 +0000 Subject: [issue45243] [sqlite3] add support for changing connection limits In-Reply-To: <1632090954.41.0.8887678667.issue45243@roundup.psfhosted.org> Message-ID: <1635892080.52.0.48325640103.issue45243@roundup.psfhosted.org> Erlend E. Aasland added the comment: Steve, do you think it is worth it adding an audit hook for setting connection limits? Most of the limits are harmless, but limits that control recursion are more interesting. SQLITE_LIMIT_EXPR_DEPTH: Maximum Depth Of An Expression Tree SQLite parses expressions into a tree for processing. During code generation, SQLite walks this tree recursively. The depth of expression trees is therefore limited in order to avoid using too much stack space. [...] If the value is 0, then no limit is enforced. SQLITE_LIMIT_TRIGGER_DEPTH: Maximum Depth Of Trigger Recursion SQLite limits the depth of recursion of triggers in order to prevent a statement involving recursive triggers from using an unbounded amount of memory. Note also, how the SQLite docs talk about SQLITE_LIMIT_LENGTH: Maximum length of a string or BLOB [...] In security-sensitive applications it is best not to try to increase the maximum string and blob length. In fact, you might do well to lower the maximum string and blob length to something more in the range of a few million if that is possible. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 19:15:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 02 Nov 2021 23:15:32 +0000 Subject: [issue45406] inspect.getouterframes() tracebacks when $CWD does not exists In-Reply-To: <1633615069.33.0.311671101448.issue45406@roundup.psfhosted.org> Message-ID: <1635894932.44.0.462891994885.issue45406@roundup.psfhosted.org> Irit Katriel added the comment: Thanks Lukasz. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 19:29:45 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 02 Nov 2021 23:29:45 +0000 Subject: [issue45695] Out-of-tree builds are not tested. Message-ID: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> New submission from Eric Snow : Currently we don't test builds done outside the source tree, neither on GitHub nor the buildbots. [1] As a result, such builds get broken occasionally. I've certainly broken then a couple times, inadvertently. It would be helpful if we tested out-of-tree builds on GitHub, or at least on a stable buildbot. FTR, to do an out-of-tree build locally and test it: mkdir ../build cd ../build ../cpython/configure make ./python -m test [1] Actually I recently added test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script which happens to do an out-of-tree build incidentally. However, we should be testing out-of-tree builds explicitly. ---------- components: Build messages: 405568 nosy: christian.heimes, eric.snow, gregory.p.smith, gvanrossum, steve.dower priority: normal severity: normal stage: test needed status: open title: Out-of-tree builds are not tested. versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 19:49:46 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Nov 2021 23:49:46 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1635896986.02.0.176185030558.issue24139@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 456e27ac0ac6bc1cfd6da0191bd7802d8667457b by Erlend Egeberg Aasland in branch 'main': bpo-24139: Add support for SQLite extended result codes (GH-28076) https://github.com/python/cpython/commit/456e27ac0ac6bc1cfd6da0191bd7802d8667457b ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 19:52:46 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 02 Nov 2021 23:52:46 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1635897166.45.0.719897405628.issue24139@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:16:36 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Nov 2021 00:16:36 +0000 Subject: [issue45696] "Deep-freeze": skip the marshal step by generating C code Message-ID: <1635898596.2.0.043840127306.issue45696@roundup.psfhosted.org> New submission from Guido van Rossum : See https://github.com/faster-cpython/ideas/issues/84 This appears to improve startup time by another 10% or more compared to main. ---------- assignee: gvanrossum components: Interpreter Core messages: 405570 nosy: gvanrossum priority: normal severity: normal status: open title: "Deep-freeze": skip the marshal step by generating C code versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:17:04 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Nov 2021 00:17:04 +0000 Subject: [issue45696] "Deep-freeze": skip the marshal step by generating C code In-Reply-To: <1635898596.2.0.043840127306.issue45696@roundup.psfhosted.org> Message-ID: <1635898624.2.0.151998806219.issue45696@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +27637 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:37:10 2021 From: report at bugs.python.org (Arthur Milchior) Date: Wed, 03 Nov 2021 00:37:10 +0000 Subject: [issue45646] Star expression in comprehension wrongly indicates to use or_expression after the star In-Reply-To: <1635432142.42.0.274045830946.issue45646@roundup.psfhosted.org> Message-ID: <1635899830.81.0.737188598441.issue45646@roundup.psfhosted.org> Arthur Milchior added the comment: Thank you very much Dennis. For two reasons. First, because I like a lot what you wrote. I suspect that it would have saved me time and make things less confusing. That's not certain, because at the time I was reading the documentation of or_expr, I may have skipped or forgotten the part about BNF. A solution - that would require a bigger change - is that the various blocks containing rules have a small link back to the text you wrote, so that if a reader reads the rule directly, they can find out the meta information they need to know about rules. I guess that it's technically possible to do it with an extra sphinx rule, but may not be trivial to do, and it's not clear how such a link and text should look like in practice, as it must be noticeable the first time and easy to ignore next time. Thanks also because I'm happy, and slightly relieved, that my concerns are taken seriously. I admit that I feared that I would get as answer something such as: > actually, if you knew BNF, it should be clear that the actual meaning of or_expr is .... And the fact that the answer I got tries to actually clarify the documentation for people wanting to learn or review Python without being expert in programming language theory is really great. Do you open a PR with your suggested test or do I update mine? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:39:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Nov 2021 00:39:34 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1635899974.14.0.716407408649.issue45695@roundup.psfhosted.org> Steve Dower added the comment: FTR, I used to run all Windows builds out of tree on Azure Pipelines, but too many tests broke so I reverted it: https://github.com/python/cpython/blob/456e27ac0ac6bc1cfd6da0191bd7802d8667457b/.azure-pipelines/windows-steps.yml#L7-L10 Setting $env:Py_OutDir before building is the easiest way to change it. You can also pass "/p:Py_OutDir=" to build.bat, but you'll run into quoting issues almost immediately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:47:34 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 03 Nov 2021 00:47:34 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1635900454.98.0.754706574771.issue45695@roundup.psfhosted.org> Gregory P. Smith added the comment: I always do out of tree builds _(I find people who build anything in tree to be very weird - it makes a mess)_. I intend to look into making sure a Linux buildbot runs this way but don't let that stop anyone else from doing so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:47:54 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 03 Nov 2021 00:47:54 +0000 Subject: [issue45695] Out-of-tree builds are not tested. In-Reply-To: <1635895785.09.0.174517598815.issue45695@roundup.psfhosted.org> Message-ID: <1635900474.46.0.155598456676.issue45695@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 20:54:20 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 03 Nov 2021 00:54:20 +0000 Subject: [issue45696] "Deep-freeze": skip the marshal step by generating C code In-Reply-To: <1635898596.2.0.043840127306.issue45696@roundup.psfhosted.org> Message-ID: <1635900860.03.0.776557901621.issue45696@roundup.psfhosted.org> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:05:41 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 03 Nov 2021 01:05:41 +0000 Subject: [issue45646] Star expression in comprehension wrongly indicates to use or_expression after the star In-Reply-To: <1635432142.42.0.274045830946.issue45646@roundup.psfhosted.org> Message-ID: <1635901541.75.0.313106333463.issue45646@roundup.psfhosted.org> Dennis Sweeney added the comment: Feel free to use anything I wrote in a PR and make any revisions/edits you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:12:41 2021 From: report at bugs.python.org (Itamar Ostricher) Date: Wed, 03 Nov 2021 01:12:41 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case Message-ID: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> New submission from Itamar Ostricher : Based on real world profiling data we collected, a vast amount of `PyType_IsSubtype` calls are coming from `type_call`, when it decides whether `__init__` should run or not. In the common case, the arguments to this call are identical, but the implementation still walks the MRO. By returning early for identical types, the common case can be optimized with a non-trivial performance gain. ---------- components: Interpreter Core messages: 405575 nosy: itamaro priority: normal severity: normal status: open title: PyType_IsSubtype is doing excessive work in the common case type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 21:17:36 2021 From: report at bugs.python.org (Itamar Ostricher) Date: Wed, 03 Nov 2021 01:17:36 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635902256.69.0.299723430695.issue45697@roundup.psfhosted.org> Change by Itamar Ostricher : ---------- keywords: +patch pull_requests: +27638 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:05:00 2021 From: report at bugs.python.org (swgmma) Date: Wed, 03 Nov 2021 02:05:00 +0000 Subject: [issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows In-Reply-To: <1492363586.51.0.498152844874.issue30082@psf.upfronthosting.co.za> Message-ID: <1635905100.05.0.87158891987.issue30082@roundup.psfhosted.org> swgmma added the comment: Anything else left to do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:05:10 2021 From: report at bugs.python.org (swgmma) Date: Wed, 03 Nov 2021 02:05:10 +0000 Subject: [issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows In-Reply-To: <1492363586.51.0.498152844874.issue30082@psf.upfronthosting.co.za> Message-ID: <1635905110.36.0.366879459297.issue30082@roundup.psfhosted.org> Change by swgmma : ---------- versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 22:14:13 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 03 Nov 2021 02:14:13 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635905652.99.0.367634578287.issue45697@roundup.psfhosted.org> Dennis Sweeney added the comment: Interesting. It seems like several call sites already check the equality case: ---- setobject.h: ---- #define PyFrozenSet_Check(ob) \ (Py_IS_TYPE(ob, &PyFrozenSet_Type) || \ PyType_IsSubtype(Py_TYPE(ob), &PyFrozenSet_Type)) ---- object.h: ---- static inline int _PyObject_TypeCheck(PyObject *ob, PyTypeObject *type) { return Py_IS_TYPE(ob, type) || PyType_IsSubtype(Py_TYPE(ob), type); } #define PyObject_TypeCheck(ob, type) _PyObject_TypeCheck(_PyObject_CAST(ob), type) Perhaps it would be better to use PyObject_TypeCheck where applicable (such as in the type_call function you mention, and in abstract.c's binary_op1()). ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:00:02 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2021 03:00:02 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635908402.76.0.399963957127.issue44828@roundup.psfhosted.org> Ned Deily added the comment: OK, thanks to Marc's quick response, it looks like we have conquered the elusive zombie dialog window. So let's try again. Note that the download file name has changed to avoid any confusion: As of 2021-11-03, the macOS installer file on python.org for the 3.10.0 release has been updated to include an updated Tk library that includes this fix. All other files installed by the installer are the same as in the original 3.10.0 installer, other than the Tk libraries and the installer ReadMe file. This updated installer pkg, at https://www.python.org/ftp/python/3.10.0/python-3.10.0post2-macos11.pkg, is now the default download for macOS from python.org and appears on the 3.10.0 release page (https://www.python.org/downloads/release/python-3100/). If you have already installed the original 3.10.0 universal2 installer pkg from python.org and are encountering this problem with file dialog windows on macOS 12 Monterey, you can download and run the updated installer pkg to obtain the updated Tk libraries. The updated Tk will also be included in the macOS installers provided with the next Python releases: 3.9.8 (expected to be released this week) and 3.10.1 (planned for 2021-12-06), as well as the 3.11.0a2 development preview. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:06:25 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2021 03:06:25 +0000 Subject: [issue45641] Error In opening a file through tkinter on macOS Monterey In-Reply-To: <1635403092.77.0.425701800447.issue45641@roundup.psfhosted.org> Message-ID: <1635908785.23.0.626630801939.issue45641@roundup.psfhosted.org> Ned Deily added the comment: An update: we believe that the problem with the Save dialog window not closing has been fixed in a revised updated macOS installer for 3.10.0 which is now available as the default download from python.org. See Issue44828 for more details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:37:49 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2021 03:37:49 +0000 Subject: [issue45598] setup.py grep_headers_for() is broken by design In-Reply-To: <1635077101.64.0.462136707743.issue45598@roundup.psfhosted.org> Message-ID: <1635910669.62.0.273198665935.issue45598@roundup.psfhosted.org> Ned Deily added the comment: > Ned, what about USING_APPLE_OS_LIBFFI? Is it still relevant? It was just added a year ago as part of the support for macOS 11 Big Sur and Apple Silicon systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 2 23:43:04 2021 From: report at bugs.python.org (Itamar Ostricher) Date: Wed, 03 Nov 2021 03:43:04 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635910984.61.0.526257408932.issue45697@roundup.psfhosted.org> Itamar Ostricher added the comment: Dennis, you mean something like this? https://github.com/itamaro/cpython/commit/92d46b260cf6ccce1a47003f539294530138e488 sure, that would preempt the `PyType_IsSubtype` calls coming from these specific callsites, but the early return in `PyType_IsSubtype` would cover those as well as any other path, wouldn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 02:00:18 2021 From: report at bugs.python.org (Mgs M Rizqi Fadhlurrahman) Date: Wed, 03 Nov 2021 06:00:18 +0000 Subject: [issue45698] Error on importing getopt Message-ID: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> New submission from Mgs M Rizqi Fadhlurrahman : It looks like there is a breaking change related to python 3.10.0 implementation that impacted getopt package. https://docs.python.org/3/library/getopt.html https://github.com/python/cpython/blob/3.10/Lib/getopt.py Steps to reproduce: 1. Run python 3.10.0 2. Type `import getopt` 3. The error shows up I already tried python 3.9.7 and it's still working as expected. ---------- components: Library (Lib) files: OnPaste.20211103-125049.png messages: 405582 nosy: rizqirizqi23 priority: normal severity: normal status: open title: Error on importing getopt type: crash versions: Python 3.10 Added file: https://bugs.python.org/file50422/OnPaste.20211103-125049.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 02:22:43 2021 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 03 Nov 2021 06:22:43 +0000 Subject: [issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489) In-Reply-To: <1602963425.44.0.576962569847.issue42064@roundup.psfhosted.org> Message-ID: <1635920563.65.0.164078138619.issue42064@roundup.psfhosted.org> Petr Viktorin added the comment: Hooray! Congratulations, and thanks for your work and determination to get this done :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 02:46:25 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Wed, 03 Nov 2021 06:46:25 +0000 Subject: [issue45689] Custom Name for ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1635921985.03.0.750336707643.issue45689@roundup.psfhosted.org> Change by Tangellapalli Sai Hanuma Rahul : ---------- versions: -Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 03:49:03 2021 From: report at bugs.python.org (Kishor Pawar) Date: Wed, 03 Nov 2021 07:49:03 +0000 Subject: [issue45699] AttributeError: 'list' object has no attribute 'find' Message-ID: <1635925743.59.0.349899416416.issue45699@roundup.psfhosted.org> New submission from Kishor Pawar : ``` Traceback (most recent call last): File "gpgcheck.py", line 33, in if config.get(repoName, 'gpgcheck', fallback='1') != "1": File "/usr/lib64/python3.6/configparser.py", line 802, in get d) File "/usr/lib64/python3.6/configparser.py", line 394, in before_get self._interpolate_some(parser, option, L, value, section, defaults, 1) File "/usr/lib64/python3.6/configparser.py", line 413, in _interpolate_some p = rest.find("%") AttributeError: 'list' object has no attribute 'find' ``` I checked all the calls made to `_interpolate_some`, and each call seems to pass the `list` type argument in the 4th position, but then function calling a `find` method on that 4th `list` type argument. Which is causing above error. ---------- components: Parser messages: 405584 nosy: krisp1506, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: AttributeError: 'list' object has no attribute 'find' type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:11:18 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 08:11:18 +0000 Subject: [issue45699] AttributeError: 'list' object has no attribute 'find' In-Reply-To: <1635925743.59.0.349899416416.issue45699@roundup.psfhosted.org> Message-ID: <1635927078.03.0.920736631782.issue45699@roundup.psfhosted.org> Alex Waygood added the comment: Hi! It's very hard to work out what the problem might be here if you don't show us the code that caused the error. Also, this site is for reporting bugs in the Python programming language itself, and this doesn't look like a bug in Python to me. You might be better off posting this question on Discuss (https://discuss.python.org/c/users/7), reddit, or StackOverflow. Having said all that, it looks like you're passing in a list where a string is expected ? `list` objects don't have a `find` method (https://docs.python.org/3/tutorial/datastructures.html), but `str` objects do (https://docs.python.org/3/library/stdtypes.html#str.find). Good luck solving your problem :) ---------- nosy: +AlexWaygood type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:15:33 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Wed, 03 Nov 2021 08:15:33 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635927333.92.0.832234925914.issue45697@roundup.psfhosted.org> Oleg Iarygin added the comment: Dennis, can PyFrozenSet_Check and _PyObject_TypeCheck get rid of Py_IS_TYPE invocation then, so PyType_IsSubtype becomes the only source of truth here? ---------- nosy: +arhadthedev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:21:30 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 08:21:30 +0000 Subject: [issue45689] Custom Name for ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1635927690.03.0.312030055909.issue45689@roundup.psfhosted.org> Alex Waygood added the comment: Feature requests are only considered for Python versions that have not yet been released, so only 3.11 should be listed in the "versions" for this ticket. ---------- nosy: +AlexWaygood versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:21:43 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 08:21:43 +0000 Subject: [issue45689] Custom Name for ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1635927703.6.0.904223614834.issue45689@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: -AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:41:00 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 08:41:00 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635928860.86.0.807741593547.issue45692@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +27639 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:48:45 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 03 Nov 2021 08:48:45 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1635929325.79.0.0423637784563.issue24139@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27640 pull_request: https://github.com/python/cpython/pull/29382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 04:54:55 2021 From: report at bugs.python.org (Nojima Takahide) Date: Wed, 03 Nov 2021 08:54:55 +0000 Subject: [issue45700] Got SEGV in compilation python3.6 with GCC-11, and please renewal python3.6. Message-ID: <1635929695.24.0.420047257674.issue45700@roundup.psfhosted.org> New submission from Nojima Takahide : I found python3.6.15(latest) caused SEGV while installing it using pyenv with GCC-11 on Debian sid. I show the Error below, ---------------here----------------------- $ pyenv install -k 3.6.15 Downloading Python-3.6.15.tar.xz... -> https://www.python.org/ftp/python/3.6.15/Python-3.6.15.tar.xz Installing Python-3.6.15... BUILD FAILED (Debian unstable using python-build 2.1.0-12-g5963dc4f) Inspect or clean up the working tree at ~/.anyenv/envs/pyenv/sources/3.6.15 Results logged to /tmp/python-build.20211103135942.18999.log Last 10 log lines: if test "xupgrade" != "xno" ; then \ case upgrade in \ upgrade) ensurepip="--upgrade" ;; \ install|*) ensurepip="" ;; \ esac; \ ./python -E -m ensurepip \ $ensurepip --root=/ ; \ fi Segmentation fault make: *** [Makefile:1102: install] Error 139 $ gcc -v ...snip... gcc version 11.2.0 (Debian 11.2.0-10) --------------Here------------------------ This root cause is the same as bpo-27987. In the case of python 3.6.15, the "gcc-11 -O3" applies "movaps" against the non-16bytes alignment address of "PyObject." I show this clue as below, --------------Here----------------------- $ gdb --args ./python -m ensurepip (gdb) run Program received signal SIGSEGV, Segmentation fault. 0x00007ffff6be957e in PyCFuncPtr_new (type=0x555555c3cde8, args=0x7ffff6c6c630, kwds=0x0) at ~/.anyenv/envs/pyenv/sources/3.6.15/Python-3.6.15/Modules/_ctypes/_ctypes.c:3557 3557 self->thunk = thunk; (gdb) disas PyCFuncPtr_new ...snip 0x00007ffff6be955d <+221>: je 0x7ffff6be98a0 0x00007ffff6be9563 <+227>: mov 0x78(%rsp),%rax 0x00007ffff6be9568 <+232>: movq %r15,%xmm0 0x00007ffff6be956d <+237>: movq %rax,%xmm1 0x00007ffff6be9572 <+242>: addq $0x1,(%rax) 0x00007ffff6be9576 <+246>: mov 0x10(%r13),%rax 0x00007ffff6be957a <+250>: punpcklqdq %xmm1,%xmm0 0x00007ffff6be957e <+254>: movaps %xmm0,0x60(%r13) ;<- cause SEGV 0x00007ffff6be9583 <+259>: mov 0x20(%r15),%rdx 0x00007ffff6be9587 <+263>: mov %rdx,(%rax) Checking %r13 at "movaps",it has non-16bytes alignment address as its value. ------------------Here------------------ Then, I would much appriciate if someone does ``cherry-pick`` the following 2 commits of github.com/python/cpython to its branch 3.6, - 8766cb74e186d3820db0a855ccd780d6d84461f7 - f0be4bbb9b3cee876249c23f2ae6f38f43fa7495 and please releases the newer python3.6. I already apply and tested this in my Debian box and I confirmed it to solve this problem. Thanks. Note: For someone who met the same problem, I show two tiny workarounds as below, if no one can release the newer python3.6 with this remedy, because of near the end of life of 3.6. Workaround1: Use GCC version 10. The GCC-10 seems not to have this problem. command: env CC=gcc-10 pyenv install 3.6.15 Workaround2: Use -O2 level with GCC-11. The "-O2" seems to skip the vectorize optimization so that GCC doesn't apply "movaps" at all. As a result, it can avoid this problem. command: env CFLAGS=-O2 pyenv install 3.6.15 --- Takahide Nojima ---------- components: Installation messages: 405588 nosy: Nojima Takahide priority: normal severity: normal status: open title: Got SEGV in compilation python3.6 with GCC-11, and please renewal python3.6. type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:01:16 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 09:01:16 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635930076.31.0.507371365182.issue45697@roundup.psfhosted.org> Serhiy Storchaka added the comment: The PyObject_TypeCheck() macro is used in performance critical cases. If it is not the case the PyType_IsSubtype() function can be used. Adding yet check in PyType_IsSubtype() will slow down more performance sensitive cases in which PyObject_TypeCheck() is used and speed up less performance sensitive cases. So there is no reason to add it. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:09:11 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 09:09:11 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635930551.83.0.141416998323.issue45698@roundup.psfhosted.org> Serhiy Storchaka added the comment: What error? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:14:09 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Nov 2021 09:14:09 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635930849.73.0.850598228037.issue45693@roundup.psfhosted.org> Andrew Svetlov added the comment: Tornado solution sounds weak; it can fail the server start if free ports are available. I concur with Eric, I'm not aware of an OS API call that binds both IPv4 and IPv6 to the same random port. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:29:23 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 03 Nov 2021 09:29:23 +0000 Subject: [issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1] In-Reply-To: <1635608006.78.0.966278676499.issue45679@roundup.psfhosted.org> Message-ID: <1635931763.64.0.623672028689.issue45679@roundup.psfhosted.org> Ken Jin added the comment: New changeset bbcf06bf95b448810f1b6f4f119c32e871bfb84c by Serhiy Storchaka in branch '3.9': [3.9] bpo-45679: Fix caching of multi-value typing.Literal (GH-29334) (GH-29342) https://github.com/python/cpython/commit/bbcf06bf95b448810f1b6f4f119c32e871bfb84c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:30:06 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 03 Nov 2021 09:30:06 +0000 Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst In-Reply-To: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org> Message-ID: <1635931806.64.0.563765740244.issue45633@roundup.psfhosted.org> Ken Jin added the comment: New changeset 06247061798a1ac402940d6ec04604ffa0be6c7a by Miss Islington (bot) in branch '3.10': bpo-45633: Fix newtypes doc typo (GH-29318) (GH-29364) https://github.com/python/cpython/commit/06247061798a1ac402940d6ec04604ffa0be6c7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:31:03 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 03 Nov 2021 09:31:03 +0000 Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst In-Reply-To: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org> Message-ID: <1635931863.06.0.189397971392.issue45633@roundup.psfhosted.org> Ken Jin added the comment: New changeset 3a93c669f50f090a227e964eb26ce8a3d1dc1202 by Miss Islington (bot) in branch '3.9': bpo-45633: Fix newtypes doc typo (GH-29318) (GH-29365) https://github.com/python/cpython/commit/3a93c669f50f090a227e964eb26ce8a3d1dc1202 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:35:46 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 03 Nov 2021 09:35:46 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1635932146.4.0.608350576924.issue24139@roundup.psfhosted.org> Ken Jin added the comment: New changeset 0dfb8c4afee65f9e185882efd57f7012120da74c by Erlend Egeberg Aasland in branch 'main': bpo-24139: Fix test_sqlite3 `test_extended_error_code_on_exception()` on s390x RHEL buildbots (GH-29382) https://github.com/python/cpython/commit/0dfb8c4afee65f9e185882efd57f7012120da74c ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:39:56 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 03 Nov 2021 09:39:56 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635932396.19.0.678244264467.issue45697@roundup.psfhosted.org> Ken Jin added the comment: > Dennis, you mean something like this? https://github.com/itamaro/cpython/commit/92d46b260cf6ccce1a47003f539294530138e488 Not Dennis, but these changes looks good. As Serhiy mentioned, we can replace the hot callsites with PyObject_TypeCheck without slowing down PyType_IsSubtype. ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:41:11 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 03 Nov 2021 09:41:11 +0000 Subject: [issue45633] Py_GT listed twice in Doc/extending/newtypes.rst In-Reply-To: <1635359291.67.0.00111122399866.issue45633@roundup.psfhosted.org> Message-ID: <1635932471.32.0.316140223516.issue45633@roundup.psfhosted.org> Ken Jin added the comment: @Dmitry Smirnov, Thank you for your fix, and welcome to the CPython project! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:45:01 2021 From: report at bugs.python.org (Ken Jin) Date: Wed, 03 Nov 2021 09:45:01 +0000 Subject: [issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1] In-Reply-To: <1635608006.78.0.966278676499.issue45679@roundup.psfhosted.org> Message-ID: <1635932701.81.0.390653512384.issue45679@roundup.psfhosted.org> Ken Jin added the comment: Closing this issue as the bug has been solved. @Nikita could you please open a new issue for your tests PR and link to that instead? It seems like an enhancement over the current test suite for lru_cache. Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 05:45:34 2021 From: report at bugs.python.org (Mgs M Rizqi Fadhlurrahman) Date: Wed, 03 Nov 2021 09:45:34 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635932734.86.0.0646915363769.issue45698@roundup.psfhosted.org> Mgs M Rizqi Fadhlurrahman added the comment: Screenshot attached https://bugs.python.org/file50422/OnPaste.20211103-125049.png ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 06:19:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 10:19:17 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635934757.98.0.233461998849.issue45698@roundup.psfhosted.org> Serhiy Storchaka added the comment: Could you please provide an output as a text? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 06:47:29 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Wed, 03 Nov 2021 10:47:29 +0000 Subject: [issue45701] Add tuple tests to `functools.lru_cache` Message-ID: <1635936448.66.0.888386290275.issue45701@roundup.psfhosted.org> New submission from Nikita Sobolev : Context: https://bugs.python.org/issue45679 We need to add tests that `tuple` works as expected with `functools.lru_cache`, including `1` / `1.0` / `True` and `0` / `0.0` / `False` special cases. PR: https://github.com/python/cpython/pull/29339 ---------- components: Tests messages: 405601 nosy: sobolevn priority: normal severity: normal status: open title: Add tuple tests to `functools.lru_cache` type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 06:51:05 2021 From: report at bugs.python.org (Mgs M Rizqi Fadhlurrahman) Date: Wed, 03 Nov 2021 10:51:05 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635936665.11.0.323311807278.issue45698@roundup.psfhosted.org> Mgs M Rizqi Fadhlurrahman added the comment: Here: ``` Python 3.10.0 (default, Oct 30 2021, 15:16:25) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import getopt Traceback (most recent call last): File "", line 1, in File "/home/mgsrizqi/.pyenv/versions/3.10.0/lib/python3.10/getopt.py", line 4 function (including the special meanings of arguments of the form `-' ^ SyntaxError: unterminated string literal (detected at line 4) >>> ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:08:04 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Wed, 03 Nov 2021 11:08:04 +0000 Subject: [issue45701] Add tuple tests to `functools.lru_cache` In-Reply-To: <1635936448.66.0.888386290275.issue45701@roundup.psfhosted.org> Message-ID: <1635937684.79.0.0671000602889.issue45701@roundup.psfhosted.org> Change by Nikita Sobolev : ---------- keywords: +patch pull_requests: +27641 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:13:47 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Wed, 03 Nov 2021 11:13:47 +0000 Subject: [issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64 Message-ID: <1635938026.99.0.538390017253.issue45702@roundup.psfhosted.org> New submission from Oleg Iarygin : File configure.ac:4617 states the following: > # The short float repr introduced in Python 3.1 requires the > # correctly-rounded string <-> double conversion functions from > # Python/dtoa.c, which in turn require that the FPU uses 53-bit > # rounding; this is a problem on x86, where the x87 FPU has a default > # rounding precision of 64 bits. For gcc/x86, we can fix this by > # using inline assembler to get and set the x87 FPU control word. However, x64 programs use xmm0-7 SIMD registers instead of a FPU stack, so the requirement of hardware 56 bit rounding gets violated. _Py_SET_53BIT_PRECISION_* is unable to do anything here because SSE neither respects the FPU control word, nor provides its own. Considering that SSE is supported since Pentium III (1999), we can safely enforce its usage for x32 code via compiler flags as well, getting consistent behavior across builds. However, it requires revision of the requirement. We need to decide what to do with dtoa.c that supposedly relies on the requirement (providing short floats? It looks like _Py_dg_dtoa just stringifies as many digits as specified in ndigits argument. I didn't collect enough courage on this stage to analyze 484 uncommented lines (2370-2854) of bit manipulation over two-letter variables to find and fix the dependency). By the way, the only place that uses _Py_dg_dtoa is Objects/floatobject.c:949 doing it with an argument mode=3. I can resolve the issue, but I need some educated opinion on this 13-years old stuff (see git blame for configure.ac:4617) to not break things. Note: I initially added Mark Dickinson into the notifications as a person who created and maintained Python/dtoa.c until 2013. ---------- components: Interpreter Core messages: 405603 nosy: arhadthedev, mark.dickinson priority: normal severity: normal status: open title: Python/dtoa.c requires 53 bit hardware rounding unavalable on x64 type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:14:18 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 03 Nov 2021 11:14:18 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635936665.11.0.323311807278.issue45698@roundup.psfhosted.org> Message-ID: <14b4d43d-3dcc-00b0-8e8d-c22f2bf9d446@egenix.com> Marc-Andre Lemburg added the comment: Could you please provide more details regarding the OS, whether you compiled Python yourself and the env settings you used ? Thanks, -- Marc-Andre Lemburg eGenix.com ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:16:59 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 11:16:59 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635938219.85.0.669733056072.issue45698@roundup.psfhosted.org> Serhiy Storchaka added the comment: It looks strange. The line containing "function (including the special meanings of arguments of the form `-'" is a part of a multiline string literal, so there should not be such error. And it is line 4, not line 3 as in your traceback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:21:56 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Nov 2021 11:21:56 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache Message-ID: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> New submission from Miro Hron?ok : Recently, when debugging a weird problem (see https://bugzilla.redhat.com/show_bug.cgi?id=2018551 for details if interested, but not important for this issue), I've realized that the _NamespacePath class (from importlib/_bootstrap_external.py) has a cache that (in some cases) uses tuple(sys.path) as the key. I was expecting importlib.invalidate_caches() to invalidate this cache, but it doesn't. Consider the following directory structure: . ??? PATH1 ??? ??? namespace ??? ??? sub1 ??? ??? __init__.py ??? PATH2 ??? namespace ??? sub2 ??? __init__.py Here is a helper to create it (on Linux-ish): $ mkdir -p PATH1/namespace/sub1 $ mkdir -p PATH2/namespace/sub2 $ touch PATH1/namespace/sub1/__init__.py $ touch PATH2/namespace/sub2/__init__.py Run Python with PYTHONPATH=PATH1:PATH2 (output slightly formatted for readability): $ PYTHONPATH=PATH1:PATH2 python3.11 >>> import namespace >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace', '.../namespace_path_cache/PATH2/namespace']) >>> import namespace.sub1 # works >>> import namespace.sub2 # works >>> exit() The namespace packages seem to work as expected. Now move PATH2/namespace out of the way: $ mv PATH2/namespace PATH2/cant-import-this Run Python again: $ PYTHONPATH=PATH1:PATH2 python3.11 >>> import namespace >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> ... While this interpreter still runs, move the PATH2/namespace module back in: $ mv PATH2/cant-import-this PATH2/namespace >>> ... >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> import namespace.sub2 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'namespace.sub2' >>> import importlib >>> importlib.invalidate_caches() # invalidate the cache, not helpful >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> import namespace.sub2 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'namespace.sub2' >>> import sys >>> sys.path.remove('') # changing sys.path solves this >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace']) >>> import namespace.sub2 >>> namespace.__path__ _NamespacePath(['.../namespace_path_cache/PATH1/namespace', '.../namespace_path_cache/PATH2/namespace']) importlib.invalidate_caches() documentation says: > This function should be called if any modules are created/installed while your program is running to guarantee all finders will notice the new module?s existence. That makes me think calling importlib.invalidate_caches() should also invalidate the cache of _NamespacePaths. (This also affects older Pythons, but since it is a behavior change, I've only marked 3.11). ---------- messages: 405606 nosy: hroncok, petr.viktorin priority: normal severity: normal status: open title: importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:28:17 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Nov 2021 11:28:17 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1635938897.08.0.600910572507.issue45703@roundup.psfhosted.org> Miro Hron?ok added the comment: I have a fix in mind, will submit a draft pull request without tests shortly, continue with the tests later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:37:16 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Nov 2021 11:37:16 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1635939436.23.0.185828347766.issue45703@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- keywords: +patch pull_requests: +27642 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:41:19 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 11:41:19 +0000 Subject: [issue45692] IDLE: define word/id chars in one place. In-Reply-To: <1635871521.54.0.926952310508.issue45692@roundup.psfhosted.org> Message-ID: <1635939679.5.0.971664829867.issue45692@roundup.psfhosted.org> Alex Waygood added the comment: The PR that proposes creating a new utility.py file is mine, linked to https://bugs.python.org/issue45447. Would it make things easier if I split it into two PRs: one adding an empty util.py file, and the other making my proposed changes to support syntax highlighting for .pyi files? ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:51:24 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 03 Nov 2021 11:51:24 +0000 Subject: [issue42064] Convert sqlite3 to multi-phase initialisation (PEP 489) In-Reply-To: <1602963425.44.0.576962569847.issue42064@roundup.psfhosted.org> Message-ID: <1635940284.1.0.0854350761423.issue42064@roundup.psfhosted.org> Erlend E. Aasland added the comment: > Congratulations, and thanks for your work and determination to get this done :) Thanks, and thank you for helping out, Petr :) Also a big thanks to Dong-hee, Berker, Serhiy, Pablo, and Victor for reviews and guidance with this "project". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:55:47 2021 From: report at bugs.python.org (Sascha Desch) Date: Wed, 03 Nov 2021 11:55:47 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields Message-ID: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> New submission from Sascha Desch : It appears when adding auto-numbered positional fields in python 3.1 `Formatter.parse` was not updated to handle them and currently returns an empty string as the field name. ``` list(Formatter().parse('hello {}')) # [('hello ', '', '', None)] ``` This does not align with `Formatter.get_field` which according to the docs: "Given field_name as returned by parse() (see above), convert it to an object to be formatted." When supplying an empty string to `.get_field()` you get a KeyError ``` Formatter().get_field("", [1, 2, 3], {}). # raises KeyError ``` ---------- messages: 405610 nosy: SDesch priority: normal severity: normal status: open title: string.Formatter.parse does not handle auto-numbered positional fields type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:55:51 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Nov 2021 11:55:51 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635940551.32.0.986233417848.issue45698@roundup.psfhosted.org> Eric V. Smith added the comment: I'm guessing the first line of getopt.py got deleted somehow. @rizqirizqi23: what do the first 10 lines of /home/mgsrizqi/.pyenv/versions/3.10.0/lib/python3.10/getopt.py look like? How did you install python? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 07:57:09 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Wed, 03 Nov 2021 11:57:09 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635940629.57.0.345549634473.issue45693@roundup.psfhosted.org> Jim Crist-Harif added the comment: > I'm not aware of an OS API call that binds both IPv4 and IPv6 to the same random port. Sure, but `loop.create_server` is already higher-level than a single OS API call. By default `create_server` will already bind multiple sockets if `host=""`, `host=None`, or if `host` is a list. I'm arguing that the current behavior with `port=0` in these situations is unexpected. Other libraries (like tornado) have come to the same conclusion, and have implemented logic to handle this that seems to work well in practice (though can fail, as you've pointed out). Is there a use case where the current behavior (binding to multiple random ports) is desired? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 08:00:09 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Wed, 03 Nov 2021 12:00:09 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635940809.78.0.180348065404.issue45693@roundup.psfhosted.org> Jim Crist-Harif added the comment: If you decline that a change is needed here, at the very least the current behavior of `port=0` should be documented. I'd be happy to push up a fix if so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:37:59 2021 From: report at bugs.python.org (Mgs M Rizqi Fadhlurrahman) Date: Wed, 03 Nov 2021 13:37:59 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635946679.37.0.244970973254.issue45698@roundup.psfhosted.org> Mgs M Rizqi Fadhlurrahman added the comment: @eric.smith Wow you're right! Somehow the """ got deleted. (screenshot attached) It can run normally now after I added the """ back. More details: I'm using Ubuntu 18.04.2. I installed python 3.10.0 using pyenv by running: `pyenv install 3.10.0` ---------- Added file: https://bugs.python.org/file50423/OnPaste.20211103-202914.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:39:08 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Nov 2021 13:39:08 +0000 Subject: [issue44496] string.Formatter class not allowing {.field} In-Reply-To: <1624433164.24.0.876705812645.issue44496@roundup.psfhosted.org> Message-ID: <1635946748.56.0.508348406289.issue44496@roundup.psfhosted.org> Eric V. Smith added the comment: I think this is a dupe of issue 27307. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:40:30 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Nov 2021 13:40:30 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635946830.91.0.459394341968.issue45698@roundup.psfhosted.org> Eric V. Smith added the comment: I'm going to close this, since I don't think it's a bug in python, but rather in the user's setup. ---------- resolution: -> works for me stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:44:36 2021 From: report at bugs.python.org (Mgs M Rizqi Fadhlurrahman) Date: Wed, 03 Nov 2021 13:44:36 +0000 Subject: [issue45698] Error on importing getopt In-Reply-To: <1635919218.86.0.867470836468.issue45698@roundup.psfhosted.org> Message-ID: <1635947076.32.0.428388544229.issue45698@roundup.psfhosted.org> Mgs M Rizqi Fadhlurrahman added the comment: OK, thank you for the answers. Sorry for the false alarm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 09:55:47 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 03 Nov 2021 13:55:47 +0000 Subject: [issue45578] Missing tests for the dis module In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org> Message-ID: <1635947747.44.0.649820969153.issue45578@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e346f196819aeb02a8a94205ce3e1536c4c2f105 by Nikita Sobolev in branch 'main': bpo-45578: add tests for `dis.distb` (GH-29332) https://github.com/python/cpython/commit/e346f196819aeb02a8a94205ce3e1536c4c2f105 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:00:28 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Nov 2021 14:00:28 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1635948028.34.0.666859829184.issue45704@roundup.psfhosted.org> Eric V. Smith added the comment: For reference, the documentation is at https://docs.python.org/3/library/string.html#custom-string-formatting I guess in your example it should return: [('hello ', '0', '', None)] ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:10:47 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 03 Nov 2021 14:10:47 +0000 Subject: [issue45578] Missing tests for the dis module In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org> Message-ID: <1635948647.68.0.366208918018.issue45578@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +27643 pull_request: https://github.com/python/cpython/pull/29385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:14:45 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 03 Nov 2021 14:14:45 +0000 Subject: [issue45578] Missing tests for the dis module In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org> Message-ID: <1635948885.19.0.0871570060938.issue45578@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +27644 pull_request: https://github.com/python/cpython/pull/29386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:25:24 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Nov 2021 14:25:24 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1635949524.45.0.263818648515.issue45703@roundup.psfhosted.org> Miro Hron?ok added the comment: The PR is now ready for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:25:43 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Nov 2021 14:25:43 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1635949543.97.0.0840194049953.issue45703@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:29:38 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 14:29:38 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1635949778.06.0.37514745945.issue45680@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: Documentation on `GenericAlias` objects could be improved -> Documentation on `GenericAlias` objects and `__class_getitem__` could be improved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:34:20 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Nov 2021 14:34:20 +0000 Subject: [issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64 In-Reply-To: <1635938026.99.0.538390017253.issue45702@roundup.psfhosted.org> Message-ID: <1635950060.97.0.560599124907.issue45702@roundup.psfhosted.org> Mark Dickinson added the comment: I'm not sure I understand the problem that you're reporting - what issues are you seeing in practice? x64 should be fine here. In normal circumstances, the compiled version of dtoa.c will be using SSE2 instructions and will already be doing floating-point arithmetic at 53-bit precision (not 56-bit), following IEEE 754. It's mainly the ancient x86/x87 hardware that's problematic. This code has been working well on many different x64 platforms for around a decade now. Can you describe the issue that you're seeing in more detail? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:54:00 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 14:54:00 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1635951240.69.0.88851862772.issue45680@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +27645 pull_request: https://github.com/python/cpython/pull/29387 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:54:18 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 14:54:18 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1635951258.73.0.77293543523.issue45680@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +27646 pull_request: https://github.com/python/cpython/pull/29388 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 10:56:05 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 14:56:05 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1635951365.76.0.59600739548.issue45680@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +27647 pull_request: https://github.com/python/cpython/pull/29389 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 11:07:08 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Wed, 03 Nov 2021 15:07:08 +0000 Subject: [issue45578] Missing tests for the dis module In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org> Message-ID: <1635952028.07.0.493396038601.issue45578@roundup.psfhosted.org> Nikita Sobolev added the comment: Only `findlabels` tests are left! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 11:15:05 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Wed, 03 Nov 2021 15:15:05 +0000 Subject: [issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64 In-Reply-To: <1635938026.99.0.538390017253.issue45702@roundup.psfhosted.org> Message-ID: <1635952505.63.0.274372559268.issue45702@roundup.psfhosted.org> Oleg Iarygin added the comment: When I first saw "default rounding precision of 64 bits", I've thought it's about "64 bit precision", aka binary64, aka double. So I suggested that the code expects some hardly known Intel FPU-specific binary56 instead. Now, after a second paragraph of your reply I see that in reality it's about significand precision (so rounding precision of 64 bits is for binary80, and 53 is for binary64). > at 53-bit precision (not 56-bit) You're right. That was a typo. Thank you for clarification, I'm closing the issue as not-a-bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 11:39:46 2021 From: report at bugs.python.org (Sascha Desch) Date: Wed, 03 Nov 2021 15:39:46 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1635953986.64.0.0265233730927.issue45704@roundup.psfhosted.org> Sascha Desch added the comment: Yes it should return a string containing the index of the positional argument i.e. `"0"` so that it is compatible with `.get_field()`. Side note: It's a somewhat weird that `.get_field` expects a string while `.get_value` expects an int for positional arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 11:53:53 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 03 Nov 2021 15:53:53 +0000 Subject: [issue45578] Missing tests for the dis module In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org> Message-ID: <1635954833.96.0.888566767999.issue45578@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset fd6b70d6b715c2403a194a2b3eae3210e2e81742 by ?ukasz Langa in branch '3.10': [3.10] bpo-45578: add tests for `dis.distb` (GH-29332) (GH-29385) https://github.com/python/cpython/commit/fd6b70d6b715c2403a194a2b3eae3210e2e81742 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:12:10 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 03 Nov 2021 16:12:10 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1635955930.41.0.887474549758.issue45678@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 5a14929a6e4fab672e2f83a86773618e973b22a6 by Alex Waygood in branch 'main': bpo-45678: Add ``functools.singledispatchmethod`` tests (GH-29328) https://github.com/python/cpython/commit/5a14929a6e4fab672e2f83a86773618e973b22a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:12:12 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Nov 2021 16:12:12 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1635955932.23.0.0779453727681.issue45678@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27648 pull_request: https://github.com/python/cpython/pull/29390 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:12:17 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Nov 2021 16:12:17 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1635955937.21.0.294417236822.issue45678@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27649 pull_request: https://github.com/python/cpython/pull/29391 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:12:53 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 03 Nov 2021 16:12:53 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1635955973.29.0.68480917894.issue45704@roundup.psfhosted.org> Eric V. Smith added the comment: > Side note: It's a somewhat weird that `.get_field` expects a string while `.get_value` expects an int for positional arguments. .parse is just concerned with parsing, so it works on and returns strings. .get_field takes strings because it is the thing that's trying to determine whether or not a field name looks like an integer or not. At least that's how I remember it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:22:41 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 03 Nov 2021 16:22:41 +0000 Subject: [issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse. In-Reply-To: <1635869089.92.0.280577291297.issue45691@roundup.psfhosted.org> Message-ID: <1635956561.57.0.858522272445.issue45691@roundup.psfhosted.org> Mark Shannon added the comment: New changeset acc89db9233abf4d903af9a7595a2ed7478fe7d3 by Mark Shannon in branch 'main': bpo-45691: Make array of small ints static to fix use-after-free error. (GH-29366) https://github.com/python/cpython/commit/acc89db9233abf4d903af9a7595a2ed7478fe7d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:28:08 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 16:28:08 +0000 Subject: [issue45672] Mutation tests results of typing.py In-Reply-To: <1635526354.62.0.519981897591.issue45672@roundup.psfhosted.org> Message-ID: <1635956888.58.0.783335066014.issue45672@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is the problem actually? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:45:39 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 03 Nov 2021 16:45:39 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1635957939.73.0.203770357558.issue45678@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset f1918385cccf3ef51d339dfa1f3654005508f307 by Miss Islington (bot) in branch '3.10': bpo-45678: Add ``functools.singledispatchmethod`` tests (GH-29328) (GH-29390) https://github.com/python/cpython/commit/f1918385cccf3ef51d339dfa1f3654005508f307 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 12:47:12 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 03 Nov 2021 16:47:12 +0000 Subject: [issue45578] Missing tests for the dis module In-Reply-To: <1634926558.7.0.911953252083.issue45578@roundup.psfhosted.org> Message-ID: <1635958032.7.0.956008889973.issue45578@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 8198617bcce885c280ba5f8acd066c71b311b1ac by ?ukasz Langa in branch '3.9': [3.9] bpo-45578: add tests for `dis.distb` (GH-29332) (#29386) https://github.com/python/cpython/commit/8198617bcce885c280ba5f8acd066c71b311b1ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:34:43 2021 From: report at bugs.python.org (Itamar Ostricher) Date: Wed, 03 Nov 2021 17:34:43 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635960883.51.0.485361678263.issue45697@roundup.psfhosted.org> Change by Itamar Ostricher : ---------- pull_requests: +27650 pull_request: https://github.com/python/cpython/pull/29392 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:47:25 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 03 Nov 2021 17:47:25 +0000 Subject: [issue45506] Out of source tree builds failing on main - test_importlib others unreliable In-Reply-To: <1634543628.08.0.540033030663.issue45506@roundup.psfhosted.org> Message-ID: <1635961645.83.0.517224353956.issue45506@roundup.psfhosted.org> Eric Snow added the comment: New changeset 7b438282d39e742b2628a32e7c6699a140ff4cfb by Eric Snow in branch 'main': bpo-45506: Stop skipping test_embed. (gh-29300) https://github.com/python/cpython/commit/7b438282d39e742b2628a32e7c6699a140ff4cfb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:50:49 2021 From: report at bugs.python.org (Itamar Ostricher) Date: Wed, 03 Nov 2021 17:50:49 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635961849.28.0.190066004906.issue45697@roundup.psfhosted.org> Itamar Ostricher added the comment: thanks for the feedback & discussion, I submitted a new PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:51:08 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 03 Nov 2021 17:51:08 +0000 Subject: [issue45404] Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module In-Reply-To: <1633607848.34.0.992499900554.issue45404@roundup.psfhosted.org> Message-ID: <1635961868.78.0.505356526614.issue45404@roundup.psfhosted.org> Andrei Kulakov added the comment: Duplicate of #41105 , where two more people ran into this issue. ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 13:54:16 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 03 Nov 2021 17:54:16 +0000 Subject: [issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc In-Reply-To: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> Message-ID: <1635962056.72.0.0158946326111.issue41105@roundup.psfhosted.org> Andrei Kulakov added the comment: I think adding this code in the `configure` script may fix it: as_ac_Header=`$as_echo "ac_cv_header_stropts.h" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "stropts.h" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes" && [ -s stropts.h ]; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_stropts.h" | $as_tr_cpp` 1 _ACEOF fi here: https://github.com/akulakov/cpython/blob/8f24b7dbcbd83311dad510863d8cb41f0e91b464/configure#L8144 .. but I wasn't able to test it. I have a MacOS system and for me even with a non-empty stropts.h, configure does not pick it up. ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:00:37 2021 From: report at bugs.python.org (Sascha Desch) Date: Wed, 03 Nov 2021 18:00:37 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1635962437.99.0.568823943875.issue45704@roundup.psfhosted.org> Sascha Desch added the comment: Another thing that occurred to me is the question of what `.parse()` should do when a mix of auto-numbered and manually numbered fields is supplied e.g. `{}{1}`. As of now `.parse()` happily processes such inputs and some other piece of code deals with this and ultimately raises an exception that mixing manual with automatic numbering is not allowed. If `.parse()` supported automatic numbering it would have to be aware of this too I guess? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:20:26 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Nov 2021 18:20:26 +0000 Subject: [issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc In-Reply-To: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> Message-ID: <1635963626.55.0.598367885814.issue41105@roundup.psfhosted.org> Christian Heimes added the comment: The configure script is auto-generated from configure.ac. Any chance must be applied to configure.ac. We could replace the AC_CHECK_HEADERS() for stropt.h with a more elaborate AC_COMPILE_IFELSE() block that checks for presence of I_PUSH. Could you please report the issue to your Linux vendor, too? The empty file seems to break Open Group Unix 98 standard. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:24:28 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2021 18:24:28 +0000 Subject: [issue45700] Got SEGV in compilation python3.6 with GCC-11, and please renewal python3.6. In-Reply-To: <1635929695.24.0.420047257674.issue45700@roundup.psfhosted.org> Message-ID: <1635963868.83.0.106175307896.issue45700@roundup.psfhosted.org> Ned Deily added the comment: As you note, Python 3.6 is almost at end-of-life, in fewer than two months from now. And, in any case, it is in the security-fix-only phase of its life cycle so changes just to support OS platform or build tool updates are out-of-scope in general, not to mention anything that might cause an ABI or API change. Thanks for the suggestion and documenting workarounds, though! ---------- nosy: +ned.deily resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 14:32:16 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 18:32:16 +0000 Subject: [issue41105] Add some extra content check in configure process for some empty header file who has been deprecated by glibc In-Reply-To: <1593011818.28.0.182724458451.issue41105@roundup.psfhosted.org> Message-ID: <1635964336.45.0.350652813288.issue41105@roundup.psfhosted.org> Serhiy Storchaka added the comment: Rather of using AC_COMPILE_IFELSE() in configure.ac, would not be easier to use #ifdef in the C file? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:18:08 2021 From: report at bugs.python.org (wim glenn) Date: Wed, 03 Nov 2021 19:18:08 +0000 Subject: [issue44257] typo and verbous grammar in the grammar spec In-Reply-To: <1622172368.56.0.587828284396.issue44257@roundup.psfhosted.org> Message-ID: <1635967088.24.0.600117904162.issue44257@roundup.psfhosted.org> Change by wim glenn : ---------- nosy: +wim.glenn nosy_count: 2.0 -> 3.0 pull_requests: +27651 pull_request: https://github.com/python/cpython/pull/29393 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:21:29 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Nov 2021 19:21:29 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1635967289.29.0.297393566714.issue45582@roundup.psfhosted.org> Steve Dower added the comment: Last remaining test failure is one that I can't figure out on my own - the freeze test is rerunning a CPython build (on Linux) and is apparently building getpath.c with the ".c.o" rule rather than the "Modules/getpath.o" rule. Any tips as to what I should be looking at to figure this one out? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:32:37 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 19:32:37 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1635967957.09.0.90437377915.issue45678@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +27652 pull_request: https://github.com/python/cpython/pull/29394 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 15:38:07 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 19:38:07 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1635968287.53.0.8420878498.issue45678@roundup.psfhosted.org> Change by Alex Waygood : ---------- components: +Library (Lib) title: `functools.singledispatchmethod` is missing tests -> `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:15:04 2021 From: report at bugs.python.org (Eric Snow) Date: Wed, 03 Nov 2021 20:15:04 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1635967289.29.0.297393566714.issue45582@roundup.psfhosted.org> Message-ID: Eric Snow added the comment: On Wed, Nov 3, 2021 at 1:21 PM Steve Dower wrote: > Last remaining test failure is one that I can't figure out on my own - the freeze test is rerunning a CPython build (on Linux) and is apparently building getpath.c with the ".c.o" rule rather than the "Modules/getpath.o" rule. > > Any tips as to what I should be looking at to figure this one out? That test does an out-of-tree build. Might that be related? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:20:59 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Nov 2021 20:20:59 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635970859.45.0.742244885737.issue45697@roundup.psfhosted.org> Serhiy Storchaka added the comment: Creating a new type takes microseconds, and using PyObject_TypeCheck() instead of PyType_IsSubtype() can save nanoseconds. So, while this replacement looks harmless, its effect can hardly be measured even in microbenchmarks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:24:40 2021 From: report at bugs.python.org (James Bowery) Date: Wed, 03 Nov 2021 20:24:40 +0000 Subject: [issue45705] |= set update scoping Message-ID: <1635971080.35.0.70243315955.issue45705@roundup.psfhosted.org> New submission from James Bowery : Comment out the |= line and it prints "{'b':2}" as expected. $ cat t.py scoped_dict = {'b':2} def scoped_def(): print(scoped_dict) scoped_dict |= {'a',1} scoped_def() $ p t.py Traceback (most recent call last): File "/home/jabowery/dev/t.py", line 5, in scoped_def() File "/home/jabowery/dev/t.py", line 3, in scoped_def print(scoped_dict) UnboundLocalError: local variable 'scoped_dict' referenced before assignment $ python --version Python 3.10.0 ---------- components: Parser messages: 405643 nosy: jabowery2, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: |= set update scoping versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:24:44 2021 From: report at bugs.python.org (Zack McCauley) Date: Wed, 03 Nov 2021 20:24:44 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635971084.95.0.487289781541.issue44828@roundup.psfhosted.org> Zack McCauley added the comment: Could this be bumped to a version update to like 3.10.1 or just replace the old package with this updated one? The package name and format now break automations that relied on matching version names in the url. This pattern has worked since 2.7 releases. For example: https://www.python.org/ftp/python/3.10.0/python-3.10.0-macos11.pkg no longer works https://www.python.org/ftp/python/3.9.7/python-3.9.7-macos11.pkg works ---------- nosy: +WardsParadox status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:33:04 2021 From: report at bugs.python.org (James Bowery) Date: Wed, 03 Nov 2021 20:33:04 +0000 Subject: [issue45705] |= set update scoping In-Reply-To: <1635971080.35.0.70243315955.issue45705@roundup.psfhosted.org> Message-ID: <1635971584.36.0.639905213826.issue45705@roundup.psfhosted.org> James Bowery added the comment: My mistake. Disregard. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:34:29 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Nov 2021 20:34:29 +0000 Subject: [issue45705] |= set update scoping In-Reply-To: <1635971080.35.0.70243315955.issue45705@roundup.psfhosted.org> Message-ID: <1635971669.49.0.704516769753.issue45705@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is not a bug. You are getting an UnboundLocalError because in the scope of scoped_def function, scoped_dict is marked as local (because you assign to it in the function) but you are reading it before that. Please, take a look at: https://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value and possibly at https://docs.python.org/3.3/tutorial/classes.html#python-scopes-and-namespaces https://docs.python.org/3/library/exceptions.html#UnboundLocalError ---------- resolution: -> not a bug stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:41:21 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 03 Nov 2021 20:41:21 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635972081.78.0.162149425535.issue45693@roundup.psfhosted.org> Andrew Svetlov added the comment: PR for documentation fix is appreciated. Random fails to bind the same port if free ports are available is kind of regression. Is tornado the only example or you are aware of other libraries with such behavior? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 16:57:53 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Nov 2021 20:57:53 +0000 Subject: [issue44257] typo and verbous grammar in the grammar spec In-Reply-To: <1622172368.56.0.587828284396.issue44257@roundup.psfhosted.org> Message-ID: <1635973073.71.0.0131520657673.issue44257@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 762173c6709f5cf3b59cbbe47d4e6fafbfe7ec2a by wim glenn in branch 'main': bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393) https://github.com/python/cpython/commit/762173c6709f5cf3b59cbbe47d4e6fafbfe7ec2a ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:01:46 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Nov 2021 21:01:46 +0000 Subject: [issue45613] [sqlite3] set threadsafety attribute based on default SQLite threaded mode In-Reply-To: <1635249866.52.0.876924087674.issue45613@roundup.psfhosted.org> Message-ID: <1635973306.54.0.85192912715.issue45613@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c2739867113a2b650db300c03ef06cf18dcee3f4 by Erlend Egeberg Aasland in branch 'main': bpo-45613: Set `sqlite3.threadsafety` dynamically (GH-29227) https://github.com/python/cpython/commit/c2739867113a2b650db300c03ef06cf18dcee3f4 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:04:21 2021 From: report at bugs.python.org (Ethan Furman) Date: Wed, 03 Nov 2021 21:04:21 +0000 Subject: [issue45546] Unable to pickle enum with nested frozen dataclass? In-Reply-To: <1634771570.81.0.651443279732.issue45546@roundup.psfhosted.org> Message-ID: <1635973461.13.0.813047033822.issue45546@roundup.psfhosted.org> Ethan Furman added the comment: Eric, I'm already aware of the nested class issue; what I was hoping for was your actual use-case? You're pickling and sending an entire enum (and all its members) to another system/process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:05:21 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Nov 2021 21:05:21 +0000 Subject: [issue44257] typo and verbous grammar in the grammar spec In-Reply-To: <1622172368.56.0.587828284396.issue44257@roundup.psfhosted.org> Message-ID: <1635973521.46.0.274719944663.issue44257@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27653 pull_request: https://github.com/python/cpython/pull/29395 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:06:43 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Nov 2021 21:06:43 +0000 Subject: [issue44257] typo and verbous grammar in the grammar spec In-Reply-To: <1622172368.56.0.587828284396.issue44257@roundup.psfhosted.org> Message-ID: <1635973603.54.0.418524289951.issue44257@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:07:02 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 03 Nov 2021 21:07:02 +0000 Subject: [issue45613] [sqlite3] set threadsafety attribute based on default SQLite threaded mode In-Reply-To: <1635249866.52.0.876924087674.issue45613@roundup.psfhosted.org> Message-ID: <1635973622.63.0.77339572322.issue45613@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:42:00 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Wed, 03 Nov 2021 21:42:00 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1635975720.69.0.87602220848.issue45693@roundup.psfhosted.org> Jim Crist-Harif added the comment: > Is tornado the only example or you are aware of other libraries with such behavior? A quick survey of other language network stacks didn't turn anything up, *But* I also didn't find any implementations (other than asyncio & tornado) that bind multiple sockets with a single api call (as `create_server` does). I think part of the issue here is that dual IPV6 & IPV4 support is intentionally disabled in asyncio (and tornado), so two sockets are needed (one to support each interface). Other TCP implementations (e.g. both go and rust) don't disable this, so one listener == one socket. This makes comparing API designs across stacks harder - with e.g. Go it's straightforward to listen on a random port on IPV4 & IPV6 with a single TCPListener, since both can be handled by a single socket. Since this is disabled (by default) in asyncio we end up using 2 sockets and run into the issue described above. Also note that this issue will trigger for any address that resolves to multiple interfaces (not just `host=""`). For example, on osx `localhost` will resolve to `::1` and `127.0.0.1` by default, meaning that the following fairly straightforward asyncio code has a bug in it: ```python # Start a server on localhost with a random port server = await loop.create_server( EchoServerProtocol, host="localhost", port=0 ) # Retrieve and log the port port = server.sockets[0].getsockname()[1] print(f"listening at tcp://localhost:{port}") ``` As written, this looks correct enough, but on systems where localhost resolves to multiple interfaces this will accidentally listen on multiple ports (instead of one). This can be fixed with some additional logic external to asyncio, but it makes for a much less straightforward asyncio example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 17:57:56 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 03 Nov 2021 21:57:56 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1635976676.22.0.738442366944.issue45678@roundup.psfhosted.org> Alex Waygood added the comment: Backporting these tests to 3.9 revealed a bug in the 3.9 branch; PR 29394 is an attempt at fixing this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:20:57 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Nov 2021 22:20:57 +0000 Subject: [issue45635] Tidy up error handling in traceback.c / python run.c In-Reply-To: <1635370026.46.0.0220648873339.issue45635@roundup.psfhosted.org> Message-ID: <1635978057.34.0.72671472274.issue45635@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:21:16 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Nov 2021 22:21:16 +0000 Subject: [issue45694] Limit the number of chained exceptions included in formatted traceback In-Reply-To: <1635879694.7.0.702941754246.issue45694@roundup.psfhosted.org> Message-ID: <1635978076.47.0.0963530238419.issue45694@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:21:58 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Nov 2021 22:21:58 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1635978118.08.0.614328116676.issue45614@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:22:31 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 03 Nov 2021 22:22:31 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1635978151.98.0.248239038955.issue45615@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:25:35 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Nov 2021 22:25:35 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1635978335.83.0.0192516419523.issue45582@roundup.psfhosted.org> Steve Dower added the comment: I'm betting the out-of-tree (actually just deeper within the same tree) bit is related, but I just can't see how. Modules/getbuildinfo.c takes extra parameters and they seem to be being used, so I can't tell why getpath.c's are not (those rules are listed right next to each other, but well above the .c.o rule). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 18:42:17 2021 From: report at bugs.python.org (Itamar Ostricher) Date: Wed, 03 Nov 2021 22:42:17 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1635979337.61.0.332160959049.issue45697@roundup.psfhosted.org> Itamar Ostricher added the comment: thanks for the feedback Serhiy! repeating my response from the PR here as well (not sure what's the proper etiquette.. :-) ) note that this code path is not for creating new types (which is slow as you say), but for creating new instances (which is quite fast). I ran some synthetic benchmarks with this change and without it (on an opt build with PGO and LTO), and the gain is measurable: build from main (commit acc89db9233abf4d903af9a7595a2ed7478fe7d3 which is the base commit for this PR): ``` >for _ in {1..10}; do ./main-opt/python -m timeit -n 10000 -s 'class Spam: pass' -- 'ten_k_spams = [Spam() for _ in range(10000)]'; done 10000 loops, best of 5: 896 usec per loop 10000 loops, best of 5: 887 usec per loop 10000 loops, best of 5: 857 usec per loop 10000 loops, best of 5: 838 usec per loop 10000 loops, best of 5: 847 usec per loop 10000 loops, best of 5: 863 usec per loop 10000 loops, best of 5: 845 usec per loop 10000 loops, best of 5: 902 usec per loop 10000 loops, best of 5: 890 usec per loop 10000 loops, best of 5: 875 usec per loop ``` build with this change applied (commit 2362bf67e8acee49c6f97ea754d59dfd8982e07c): ``` >for _ in {1..10}; do ./test-opt/python -m timeit -n 10000 -s 'class Spam: pass' -- 'ten_k_spams = [Spam() for _ in range(10000)]'; done 10000 loops, best of 5: 833 usec per loop 10000 loops, best of 5: 885 usec per loop 10000 loops, best of 5: 845 usec per loop 10000 loops, best of 5: 838 usec per loop 10000 loops, best of 5: 833 usec per loop 10000 loops, best of 5: 827 usec per loop 10000 loops, best of 5: 858 usec per loop 10000 loops, best of 5: 811 usec per loop 10000 loops, best of 5: 843 usec per loop 10000 loops, best of 5: 845 usec per loop ``` also worth noting that the previous approach (GH-29380) was implemented on the Instagram Server production workload in Meta/Facebook/Instagram (choose your favorite) and resulted measurable perf gain of around 0.2% ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:05:58 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2021 23:05:58 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635980758.78.0.530685107459.issue44828@roundup.psfhosted.org> Ned Deily added the comment: > Could this be bumped to a version update to like 3.10.1 or just replace the old package with this updated one? I'm sorry that this caused problems for you. We rarely update the artifacts for a release but, in this case, 3.10.1 was not scheduled for release until the beginning of December (the normal 2-month release cycle) and there have been no problems identified so far with 3.10.0 that warrant expediting 3.10.1, something that would affect all platforms and downstream users and suppliers. On the other hand, this issue was a critical one but only for IDLE and tkinter users of the python.org macOS installer who have upgraded to macOS 12 Monterey, a very much smaller group and there was no easy workaround for those users. Simply replacing the installer without changing the URL file name, a so-called stealth update, is, in general, a very bad practice; it leads to even more confusion and we also want to make sure that the obsoleted installer is no longer being downloaded. As far as I know, we have never made any guarantees about the format of the URL of our download files; and, in fact, the file name format for the default python.org macOS installers *has* changed over the years as we have introduced new installer variants, stopped producing old ones, and changed the default variant, something that is planned to happen again in the upcoming 3.9.8 release. So the only reliable way to automatically find file names is from one of the python.org web pages, like for the release or for the platform (i.e. https://www.python.org/downloads/macos/). It would be better to fully support a REST API to provide access to release file data. There is an open website issue about that: https://github.com/python/pythondotorg/issues/1352 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:07:27 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 03 Nov 2021 23:07:27 +0000 Subject: [issue45705] |= set update scoping In-Reply-To: <1635971080.35.0.70243315955.issue45705@roundup.psfhosted.org> Message-ID: <1635980847.92.0.497650138489.issue45705@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:19:34 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Nov 2021 23:19:34 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1635981574.18.0.88457516305.issue44828@roundup.psfhosted.org> Ned Deily added the comment: After I posted the previous reply, I saw that there have been other users affected by this, so I have now also made the updated installer available under the old URL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 19:21:49 2021 From: report at bugs.python.org (Zack McCauley) Date: Wed, 03 Nov 2021 23:21:49 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1635981574.18.0.88457516305.issue44828@roundup.psfhosted.org> Message-ID: Zack McCauley added the comment: Awesome, thanks for the clear update reason. Makes more sense now. I was able to get our software to patch around. An API to get the installer urls would be super helpful. Thanks Ned! On Wed, Nov 3, 2021 at 4:19 PM Ned Deily wrote: > > Ned Deily added the comment: > > After I posted the previous reply, I saw that there have been other users > affected by this, so I have now also made the updated installer available > under the old URL. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:18:49 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 00:18:49 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1635985129.64.0.574998742925.issue45220@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27654 pull_request: https://github.com/python/cpython/pull/29396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:24:59 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 00:24:59 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1635985499.81.0.118940389717.issue45582@roundup.psfhosted.org> Steve Dower added the comment: Unsurprisingly, it was a bad edit that I made to the Makefile myself. The commit that undoes it is https://github.com/python/cpython/pull/29041/commits/aedebcc45a638f5cf65d17046ae09b5cac97cebf but since I made the initial change as part of this PR, it was never merged in. Now to find out why the old getpath could somehow locate the stdlib but new getpath cannot... (I'm guessing it is finding the "original" stdlib rather than the fresh clone, since AFAICT there's no reference at all to the original source dir) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:29:59 2021 From: report at bugs.python.org (Prem Buczkowski) Date: Thu, 04 Nov 2021 00:29:59 +0000 Subject: [issue45706] Add IMAP4.login_plain to imaplib Message-ID: <1635985799.82.0.278344713307.issue45706@roundup.psfhosted.org> New submission from Prem Buczkowski : Hi everyone and nice to meet you! I would like to propose adding a method login_plain to Python IMAP4 standard library client. Currently, one can use login, login_cram_md5 or add their own authentication method using authenticate. While login works great for plain text authentication for English users, it does not support characters out of ASCII, causing errors for users with non-ASCII passwords. I personally hit that with radicale-imap. It has been reported in issue34577, and its SMTP counterpart in issue29750. RFC6855 recommends using AUTHENTICATE for such cases, and so this patch adds login_plain in a manner similar to login_cram_md5. Adding this to a standard library will improve the experience for non-English users not only when programming but also when using other programs written in Python. AUTHENTICATE PLAIN is on by default in Dovecot and most e-mail providers, like Gmail and Outlook, making it more common than, already supported, AUTHENTICATE CRAM-MD5. Since this is my first patch, let me know if I could change something up - I did my best to RTFM! ---------- components: Library (Lib), email files: 0107-Add-imaplib.IMAP4.login_plain.patch keywords: patch messages: 405659 nosy: barry, przemub, r.david.murray priority: normal severity: normal status: open title: Add IMAP4.login_plain to imaplib Added file: https://bugs.python.org/file50424/0107-Add-imaplib.IMAP4.login_plain.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:30:19 2021 From: report at bugs.python.org (Prem Buczkowski) Date: Thu, 04 Nov 2021 00:30:19 +0000 Subject: [issue45706] Add IMAP4.login_plain to imaplib In-Reply-To: <1635985799.82.0.278344713307.issue45706@roundup.psfhosted.org> Message-ID: <1635985819.53.0.627651365322.issue45706@roundup.psfhosted.org> Change by Prem Buczkowski : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:43:25 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 00:43:25 +0000 Subject: [issue43652] Upgrade Windows tcl/tk to 8.6.11 In-Reply-To: <1617001631.71.0.115330422511.issue43652@roundup.psfhosted.org> Message-ID: <1635986605.65.0.841145019553.issue43652@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27655 pull_request: https://github.com/python/cpython/pull/29397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 20:44:53 2021 From: report at bugs.python.org (Prem Buczkowski) Date: Thu, 04 Nov 2021 00:44:53 +0000 Subject: [issue45706] Add IMAP4.login_plain to imaplib In-Reply-To: <1635985799.82.0.278344713307.issue45706@roundup.psfhosted.org> Message-ID: <1635986693.95.0.462704431999.issue45706@roundup.psfhosted.org> Change by Prem Buczkowski : ---------- pull_requests: +27656 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29398 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 23:24:22 2021 From: report at bugs.python.org (Xinmeng Xia) Date: Thu, 04 Nov 2021 03:24:22 +0000 Subject: [issue45707] Variable reassginment triggers incorrect behaviors of locals() Message-ID: <1635996262.23.0.981239272273.issue45707@roundup.psfhosted.org> New submission from Xinmeng Xia : Normally after executing a piece of code in a function, locals() should contain the local variables and these variables can be reassigned next. In the following code, "attr" should be found in locals(). Actually, it can not be found in either locals() or globals() after executing code "attr = 1". This program triggers a keyError. I think something wrong during handling locals(). ================================ def foo(): exec("attr = 1") a = locals()['attr'] attr = 2 foo() ================================ Reported Error: Traceback (most recent call last): File "", line 1, in File "", line 3, in foo KeyError: 'attr' Expected output: This test program should work well. The value of a is 1 and the value of attr is 2 after execution. No error is reported. Python version: python3.10, Ubuntu 16.04 ---------- components: Interpreter Core messages: 405660 nosy: xxm priority: normal severity: normal status: open title: Variable reassginment triggers incorrect behaviors of locals() type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 3 23:49:56 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 04 Nov 2021 03:49:56 +0000 Subject: [issue45707] Variable reassginment triggers incorrect behaviors of locals() In-Reply-To: <1635996262.23.0.981239272273.issue45707@roundup.psfhosted.org> Message-ID: <1635997796.89.0.459996436225.issue45707@roundup.psfhosted.org> Dennis Sweeney added the comment: >From https://docs.python.org/3/library/functions.html#exec : "modifications to the default locals dictionary should not be attempted. Pass an explicit locals dictionary if you need to see effects of the code on locals after function exec() returns." There was also some discussion about potentially clarifying the locals() semantics in this PEP: https://www.python.org/dev/peps/pep-0558/ ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:06:42 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 04 Nov 2021 04:06:42 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1635998802.58.0.392248220474.issue45680@roundup.psfhosted.org> Ken Jin added the comment: New changeset e03e50377d6f8f212af60fed4ae405ebeb73237d by Alex Waygood in branch 'main': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) https://github.com/python/cpython/commit/e03e50377d6f8f212af60fed4ae405ebeb73237d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:06:52 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 04:06:52 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1635998812.39.0.855673874048.issue45680@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27658 pull_request: https://github.com/python/cpython/pull/29399 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:07:14 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 04:07:14 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1635998834.45.0.399439032217.issue45680@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27659 pull_request: https://github.com/python/cpython/pull/29400 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:26:18 2021 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 04 Nov 2021 04:26:18 +0000 Subject: [issue45707] Variable reassginment triggers incorrect behaviors of locals() In-Reply-To: <1635996262.23.0.981239272273.issue45707@roundup.psfhosted.org> Message-ID: <1635999978.03.0.854946431759.issue45707@roundup.psfhosted.org> Josh Rosenberg added the comment: This is a documented feature of locals() (it's definitionally impossible to auto-vivify *real* locals, because real locals are statically assigned to specific indices in a fixed size array at function compile time, and the locals() function is returning a copy of said bindings, not a live view of them). ---------- nosy: +josh.r resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:27:55 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 04:27:55 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636000075.92.0.782716703761.issue45680@roundup.psfhosted.org> miss-islington added the comment: New changeset c10896696f47a8348e6d9ea3c1d96fa6ba131a31 by Miss Islington (bot) in branch '3.10': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) https://github.com/python/cpython/commit/c10896696f47a8348e6d9ea3c1d96fa6ba131a31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:34:40 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 04:34:40 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636000480.12.0.393378785104.issue45680@roundup.psfhosted.org> miss-islington added the comment: New changeset e813dd4d7bb0ecfabc7dae75e13f58164bcf8da6 by Miss Islington (bot) in branch '3.9': bpo-45680: ``typing`` docs: improve links to docs on ``GenericAlias``/``__class_getitem__`` (GH-29387) https://github.com/python/cpython/commit/e813dd4d7bb0ecfabc7dae75e13f58164bcf8da6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 00:37:08 2021 From: report at bugs.python.org (Ethan Furman) Date: Thu, 04 Nov 2021 04:37:08 +0000 Subject: [issue45546] Unable to pickle enum with nested frozen dataclass? In-Reply-To: <1634771570.81.0.651443279732.issue45546@roundup.psfhosted.org> Message-ID: <1636000628.99.0.104306289555.issue45546@roundup.psfhosted.org> Change by Ethan Furman : ---------- Removed message: https://bugs.python.org/msg405650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 03:58:26 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 04 Nov 2021 07:58:26 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1636012706.0.0.0393875343833.issue44828@roundup.psfhosted.org> Ronald Oussoren added the comment: > Heads up! A strange Apple quirk has been identified which could affect the file dialog behavior if the Tk library is compiled on macOS 10.XX and used on macOS 11 or 12. (I am not sure if this applies here.) I'm pretty sure that's a documented feature. Any code compiled with a 10.15 or earlier SDK will never see version 11.0 or later when using regular in process APIs (and IIRC that includes usage of @available/__builtin_available) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 05:01:14 2021 From: report at bugs.python.org (Sander Bollen) Date: Thu, 04 Nov 2021 09:01:14 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal Message-ID: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> New submission from Sander Bollen : Hello, It appears that Decimal does not support PEP-515 style formatting with underscores as thousands separators. ``` >>> from decimal import Decimal >>> f"{Decimal('5000'):,}" '5,000' >>> f"{Decimal('5000'):_}" Traceback (most recent call last): File "", line 1, in ValueError: invalid format string ``` This does work for all the other types mentioned in PEP515 ``` >>> f"{5000:_}" '5_000' >>> f"{5000.0:_}" '5_000.0' >>> f"{complex(5000, 1):_}" '(5_000+1j)' ``` I have tried this on python 3.8, 3.9 and 3.10 on a Mac. ---------- components: Library (Lib) messages: 405667 nosy: sndrtj priority: normal severity: normal status: open title: PEP 515-style formatting with underscores does not seem to work for Decimal versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:08:51 2021 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 04 Nov 2021 10:08:51 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block Message-ID: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> New submission from Ned Batchelder : Python 3.11 seems to have reverted a behavior that was new in 3.10.0b1: exiting a with-statement re-visits the with line on the way out. --- %< bug2.py ---------------------- import linecache, sys def trace(frame, event, arg): # The weird globals here is to avoid a NameError on shutdown... if frame.f_code.co_filename == globals().get("__file__"): lineno = frame.f_lineno print("{} {}: {}".format(event[:4], lineno, linecache.getline(__file__, lineno).rstrip())) return trace print(sys.version) sys.settrace(trace) import contextlib def f(): with contextlib.nullcontext(): 1/0 f() ------------------------------------- Running with 3.10 shows re-visiting the with: $ python3.10 bug2.py 3.10.0 (default, Oct 4 2021, 17:22:29) [Clang 12.0.0 (clang-1200.0.32.29)] call 15: def f(): line 16: with contextlib.nullcontext(): line 17: 1/0 exce 17: 1/0 line 16: with contextlib.nullcontext(): retu 17: 1/0 Traceback (most recent call last): File "/System/Volumes/Data/root/src/foo/bug1270/bug2.py", line 19, in f() File "/System/Volumes/Data/root/src/foo/bug1270/bug2.py", line 17, in f 1/0 ZeroDivisionError: division by zero 3.11 does not: $ python3.11 bug2.py 3.11.0a1 (default, Oct 6 2021, 07:21:05) [Clang 12.0.0 (clang-1200.0.32.29)] call 15: def f(): line 16: with contextlib.nullcontext(): line 17: 1/0 exce 17: 1/0 retu 17: 1/0 Traceback (most recent call last): File "/System/Volumes/Data/root/src/foo/bug1270/bug2.py", line 19, in f() ^^^ File "/System/Volumes/Data/root/src/foo/bug1270/bug2.py", line 17, in f 1/0 ~^~ ZeroDivisionError: division by zero Versions before 3.10 also do not visit the with statement: $ python3.9 bug2.py 3.9.7 (default, Sep 7 2021, 22:16:49) [Clang 12.0.0 (clang-1200.0.32.29)] call 15: def f(): line 16: with contextlib.nullcontext(): line 17: 1/0 exce 17: 1/0 line 17: 1/0 retu 17: 1/0 Traceback (most recent call last): File "/System/Volumes/Data/root/src/foo/bug1270/bug2.py", line 19, in f() File "/System/Volumes/Data/root/src/foo/bug1270/bug2.py", line 17, in f 1/0 ZeroDivisionError: division by zero Is this a bug in 3.11, or an intentional return to previous behavior? (BTW: there is no 3.11regression keyword available) ---------- components: Interpreter Core messages: 405668 nosy: Mark.Shannon, nedbat priority: normal severity: normal status: open title: 3.11 regression: tracing with-statement on exit from block versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:10:55 2021 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 04 Nov 2021 10:10:55 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1636020655.51.0.768746239889.issue45709@roundup.psfhosted.org> Ned Batchelder added the comment: BTW, this is the coverage.py issue: https://github.com/nedbat/coveragepy/issues/1270 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:11:18 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Thu, 04 Nov 2021 10:11:18 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1636020678.84.0.909529296953.issue45615@roundup.psfhosted.org> Nikita Sobolev added the comment: For me something different happens now: ``` Python 3.11.0a1+ (heads/main-dirty:e03e50377d, Nov 4 2021, 13:09:20) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import traceback >>> traceback.print_exception(12) Traceback (most recent call last): File "", line 1, in File "/Users/sobolev/Desktop/cpython/Lib/traceback.py", line 118, in print_exception value, tb = _parse_value_tb(exc, value, tb) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/sobolev/Desktop/cpython/Lib/traceback.py", line 100, in _parse_value_tb return exc, exc.__traceback__ ^^^^^^^^^^^^^^^^^ AttributeError: 'int' object has no attribute '__traceback__' ``` ---------- nosy: +sobolevn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:21:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 04 Nov 2021 10:21:31 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1636021291.87.0.0421432583105.issue45615@roundup.psfhosted.org> Irit Katriel added the comment: You're right Nikita, that's what main currently does. My output was from a branch where I started fixing it. Sorry about the confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:33:32 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Thu, 04 Nov 2021 10:33:32 +0000 Subject: [issue45672] Mutation tests results of typing.py In-Reply-To: <1635526354.62.0.519981897591.issue45672@roundup.psfhosted.org> Message-ID: <1636022012.89.0.125023751884.issue45672@roundup.psfhosted.org> Oleg Iarygin added the comment: > What is the problem actually? I guess, Lib/test/test_typing.py has gaps in test coverage. The report provided by the OP is a list of random modifications that corrupt logic of Lib/typing.py but still pass all test cases. Mutation testing is validation of tests themselves. A mutation framework takes code that the validated test actually tests, makes some random but syntactically correct change, and runs the test that should fail some assertion here. If so, the code is rolled back and another mutation attempt is done. If the validated test catches all thousands of such attempts, we can consider it a reliable safety net for any refactoring. Otherwise, we open the report and start to supplement tests and probably package documentation to cover missed scenarios. Actually, something like cosmic-ray may be added into a CI pipeline, but I suspect that preliminary fixing of test coverage will be a task of the OP themselves. There are no people with enough free time to sit down and sort all tests out, being overwhelmed with new language features, bug fixing and already pending epics of, for example, closing Python internals from extension modules to stop constantly breaking backward compatibility, or fixing startup modules to properly freeze them for speedup of Python launching. ---------- nosy: +arhadthedev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:37:53 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 04 Nov 2021 10:37:53 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1636022273.97.0.692081282388.issue45709@roundup.psfhosted.org> Mark Shannon added the comment: Probably an oversight when converting to zero-overhead exceptions. ---------- assignee: -> Mark.Shannon type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:40:21 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Nov 2021 10:40:21 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1636022421.85.0.0858680277865.issue45697@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2c045bd5673d56c3fdde7536da9df1c7d6f270f0 by Itamar Ostricher in branch 'main': bpo-45697: Use PyObject_TypeCheck in type_call (GH-29392) https://github.com/python/cpython/commit/2c045bd5673d56c3fdde7536da9df1c7d6f270f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:41:48 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Nov 2021 10:41:48 +0000 Subject: [issue45697] PyType_IsSubtype is doing excessive work in the common case In-Reply-To: <1635901961.22.0.404899300991.issue45697@roundup.psfhosted.org> Message-ID: <1636022508.12.0.650778997117.issue45697@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your contribution Itamar. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:50:16 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Nov 2021 10:50:16 +0000 Subject: [issue45672] Mutation tests results of typing.py In-Reply-To: <1635526354.62.0.519981897591.issue45672@roundup.psfhosted.org> Message-ID: <1636023016.73.0.148886977765.issue45672@roundup.psfhosted.org> Serhiy Storchaka added the comment: The tests are passed because this modification does not affect behavior, it just makes the code slightly less efficient. Replacing i+1 with i just adds one iteration: b = bases[i] # == self if isinstance(b, _BaseGenericAlias) and b is not self: return () Since b is self, the condition is always false. It is impossible to catch this change in tests because both codes are equivalent. ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 06:57:57 2021 From: report at bugs.python.org (Fabio Storino) Date: Thu, 04 Nov 2021 10:57:57 +0000 Subject: [issue45710] Junction/symbolic folder access error on Windows 11 Message-ID: <1636023477.57.0.826365620965.issue45710@roundup.psfhosted.org> New submission from Fabio Storino : After upgrading to Windows 11 I can't run Python scripts from a junction folder anymore. Everything else works as before on that folder. Background: I have Minecraft installed on a second volume (E:\Games\Minecraft). I created a junction folder at %appdata%\.minecraft pointing to that folder. When I try to run a Python script from that folder I get this error: --- python: can't open file 'C:\Users\xxxxx\AppData\Roaming\.minecraft\test.py': [Errno 22] Invalid argument --- When trying to debug in VS Code, I get a more detailed error: --- Traceback (most recent call last): File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64 __qbz5n2kfra8p0\lib\ntpath.py", line 647, in realpath path = _getfinalpathname(path) OSError: [WinError 649] The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached: 'c:\\Users\\xxxxx\\AppData\\Roaming\\.minecraft' --- When trying to open that junction folder in Python's IDLE I get the following error message: --- [Window Title] Location is not available [Content] C:\Users\xxxxx\AppData\Roaming\.minecraft is not accessible. The create operation failed because the name contained at least one mount point which resolves to a volume to which the specified device object is not attached. --- I tried creating a symbolic directory link instead of a junction, but got the same message. I can run the same scripts directly from the target folder (E:\Games\Minecraft). I can also run them from the junction folder from an Ubuntu terminal on WSL2 (Windows Subsystem for Linux). I tried this with Python 3.9 and 3.10 (WSL2 uses Python 3.8). ---------- components: Windows messages: 405677 nosy: fstorino, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Junction/symbolic folder access error on Windows 11 type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:01:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 04 Nov 2021 11:01:55 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1636023715.69.0.391555958742.issue45615@roundup.psfhosted.org> Irit Katriel added the comment: Nikita, if you want to work on this go head, but I would wait until PR 29207 is merged. I think in the C code what we need to do is remove the check in _testcapi - this is a test utility, it doesn't need to verify input types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:23:29 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Thu, 04 Nov 2021 11:23:29 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636025009.62.0.211676227321.issue45708@roundup.psfhosted.org> Nikita Sobolev added the comment: It is not hard to fix (https://github.com/python/cpython/blob/2c045bd5673d56c3fdde7536da9df1c7d6f270f0/Modules/_decimal/libmpdec/io.c#L857-L863): ```c /* thousands separator */ if (*cp == ',' || *cp == '_') { spec->dot = "."; if (*cp == ',') { spec->sep = ","; } else { spec->sep = "_"; } spec->grouping = "\003\003"; cp++; } ``` But, there's some context to it: https://bugs.python.org/issue44267 / https://mail.python.org/pipermail/python-dev/2016-March/143556.html I am going to research this further. ---------- nosy: +sobolevn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:27:21 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Thu, 04 Nov 2021 11:27:21 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1636023715.69.0.391555958742.issue45615@roundup.psfhosted.org> Message-ID: Nikita Sobolev added the comment: Yes, I would love to! Thanks :) I will wait for GH-29207 to be merged first. ??, 4 ????. 2021 ?. ? 14:02, Irit Katriel : > > Irit Katriel added the comment: > > Nikita, if you want to work on this go head, but I would wait until PR > 29207 is merged. > > I think in the C code what we need to do is remove the check in _testcapi > - this is a test utility, it doesn't need to verify input types. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:29:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 04 Nov 2021 11:29:47 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation Message-ID: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> New submission from Irit Katriel : Exceptions are represented in the interpreter as (type, val, tb) triplets which most of the time contain redundant information (the type is the type of val and the tb is also on the exception). This complicates the code and is inefficient as opcodes that manage exceptions push and pop 3 items for each exception. We will change the internal representation to be (1) just the exception value if it is normalised and (2) a tuple of the 3 values for the uncommon case where they are all needed. See also https://github.com/faster-cpython/ideas/issues/106. ---------- components: Interpreter Core messages: 405681 nosy: Mark.Shannon, gvanrossum, iritkatriel priority: normal severity: normal status: open title: Simplify the interpreter's (type, val, tb) exception representation versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:50:39 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 04 Nov 2021 11:50:39 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636026639.05.0.557316157115.issue45708@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +eric.smith, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:53:01 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Thu, 04 Nov 2021 11:53:01 +0000 Subject: [issue45672] Mutation tests results of typing.py In-Reply-To: <1635526354.62.0.519981897591.issue45672@roundup.psfhosted.org> Message-ID: <1636026781.86.0.870568493349.issue45672@roundup.psfhosted.org> Oleg Iarygin added the comment: > because this modification does not affect behavior Unfortunately, this one (that I missed by not reading the report thoroughly) makes the framework totally unsuitable for CI. However, looking at such false positives allows to muse about reasons behind design choises. For example (in a snippet you cited), why Python runtime stores bases as a tuple, not as a linked list. Anyway, application of the method resolution order scans them sequentially, they are not of a primitive type (so tuples give no optimization), a call of bases.index() may be replaced with a reference property inside class internals, etc. Though, I perfectly understand that such treatment leads to immense amount of refactoring with no performance gain, probably counterweighted with removal of couple of internal packages that will become unused after it. That's why I wrote about "a task of the OP themselves". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 07:58:12 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 04 Nov 2021 11:58:12 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636027092.23.0.149172157268.issue45708@roundup.psfhosted.org> Mark Dickinson added the comment: I think the two main reasons that applied to not implementing the parsing part of PEP 515 for the Decimal type (speed, compliance with the IBM specification) don't apply to the formatting side. We do need to think about the implications of making local changes to our copy of the externally-maintained libmpdec library, though. Changing Python versions: this is a new feature, so could only go into Python 3.11. ---------- type: -> enhancement versions: +Python 3.11 -Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:03:12 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Nov 2021 12:03:12 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636027392.03.0.869917474554.issue45708@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with Mark. Also, if we're going to change the C implementation, the Python implementation should agree with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:04:47 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Thu, 04 Nov 2021 12:04:47 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636027487.19.0.888484845735.issue45708@roundup.psfhosted.org> Nikita Sobolev added the comment: More context ------------ Original commit with `_` format: https://github.com/python/cpython/commit/89e1b1aae0775341735de6bc5e97b3c1e9cea0fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:08:29 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:08:29 +0000 Subject: [issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1636027709.39.0.0547398599106.issue39573@roundup.psfhosted.org> Ahmed Sayeed added the comment: no longer builds on aarch64 (native build) after updating to glibc-2.33. http://www-look-4.com/services/usb-type-a/ Due to a glibc 2.33 header file change, the file http://the-hunters.org/category/computers/ nat/aarch64-linux-hw-point.c no longer builds on OSes using this version of glibc. https://komiya-dental.com/services/huawei-service/ An enum for PTRACE_SYSEMU is now provided by . In the past, PTRACE_SYSEMU was defined only in . This is http://www.iu-bloomington.com/property/properties-in-turkey/ what it looks like... In : https://waytowhatsnext.com/crypto/cryptocurrency-taxes/ #define PTRACE_SYSEMU 31 http://www.wearelondonmade.com/health/check-ups/ In : http://www.jopspeech.com/services/surface-duo/ enum __ptrace_request { http://joerg.li/services/kia-rio-price/ ... PTRACE_SYSEMU = 31, #define PT_SYSEMU PTRACE_SYSEMU ... http://connstr.net/services/mobile-games/ } When and are both included in a source http://fishingnewsletters.co.uk/category/computers/ file, we run into the following build problem when the former is included before the latter: http://embermanchester.uk/tech/google-drive/ In file included from nat/aarch64-linux-hw-point.c:26: http://www.go-mk-websites.co.uk/category/computers/ /usr/include/sys/ptrace.h:86:3: error: expected identifier before numeric constant 86 | PTRACE_SYSEMU = 31, http://www.slipstone.co.uk/technology/cars-interior/ | ^~~~~~~~~~~~~ (There are more errors after this one too.) http://www.logoarts.co.uk/technology/robot-vacuums/ The file builds without error when is included after http://www.mconstantine.co.uk/category/computers/ . I found that this is already done in http://www.acpirateradio.co.uk/health/transportation-security/ nat/aarch64-sve-linux-ptrace.h (which is included by nat/aarch64-linux-ptrace.c). http://www.compilatori.com/health/premium-subscription/ A commit for this bug is already on the trunk: https://www.webb-dev.co.uk/computers/crypto-apps/ ---------- nosy: +ahmedsayeed1982 -BTaskaya, WildCard65, ZackerySpytz, corona10, erlendaasland, hroncok, kj, nascheme, pablogsal, ronaldoussoren, serhiy.storchaka, shihai1991, steve.dower, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:08:07 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:08:07 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1636027687.58.0.0280198257401.issue17239@roundup.psfhosted.org> Ahmed Sayeed added the comment: /gdb/arch/arc.c:117:43: required from here http://www.compilatori.com/ /usr/include/c++/4.8.2/bits/hashtable_policy.h:195:39: error: no matching https://www.mktrade.fi/ function for call to ?std::pair >::pair(const arc_arch_features&, target_desc*&)? : _M_v(std::forward<_Args>(__args)...) { } http://www.acpirateradio.co.uk/ ^ /usr/include/c++/4.8.2/bits/hashtable_policy.h:195:39: note: candidates are: https://www.webb-dev.co.uk/ In file included from /usr/include/c++/4.8.2/utility:70:0, from /usr/include/c++/4.8.2/tuple:38, http://www.logoarts.co.uk/ from /usr/include/c++/4.8.2/functional:55, from ../../gdb/../gdbsupport/ptid.h:35, https://komiya-dental.com/ from ../../gdb/../gdbsupport/common-defs.h:123, from ../../gdb/arch/arc.c:19: http://www.slipstone.co.uk/ /usr/include/c++/4.8.2/bits/stl_pair.h:206:9: note: template std::pair<_T1, http://embermanchester.uk/ _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple http://fishingnewsletters.co.uk/ <_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>) pair(tuple<_Args1...>&, tuple<_Args2...>&, http://connstr.net/ ^ -------->8--------- http://joerg.li/ Thanks to Tome de Vries' investigation, same fix applies in ARC's case as well: --------8<--------- http://www.jopspeech.com/ diff --git a/gdb/arch/arc.c b/gdb/arch/arc.c index 3808f9f..a5385ce 100644 http://www.go-mk-websites.co.uk/ --- a/gdb/arch/arc.c +++ b/gdb/arch/arc.c http://www.wearelondonmade.com/ @@ -114,7 +114,7 @@ struct arc_arch_features_hasher target_desc *tdesc = arc_create_target_description (features); https://waytowhatsnext.com/ /* Add the newly created target description to the repertoire. */ http://www.mconstantine.co.uk/ - arc_tdesc_cache.emplace (features, tdesc); http://www.iu-bloomington.com/ + arc_tdesc_cache.emplace (features, target_desc_up (tdesc)); ---------- components: -Extension Modules, Library (Lib) nosy: +ahmedsayeed1982 -Arfrever, barry, benjamin.peterson, christian.heimes, eli.bendersky, ezio.melotti, franck, georg.brandl, jwilk, larry, martin.panter, mcepl, miss-islington, mitar, ned.deily, pitrou, rhettinger, rsandwick3, scoder, serhiy.storchaka, steve.dower, vstinner versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:08:57 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:08:57 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1636027737.37.0.704428552134.issue17239@roundup.psfhosted.org> Ahmed Sayeed added the comment: #0 0x000055befa524260 in execute_cfa_program (fde=0x621000f84c90, http://www-look-4.com/technology/peugeot-208/ insn_ptr=0x7fab8d86da86 , http://the-hunters.org/category/tech/ insn_end=0x7fab8d86da90 , gdbarch=0x621000be3d10, https://komiya-dental.com/computers/huawei-technology/ pc=0xffffffff81b3318e, fs=0x7ffe0a288d10, text_offset=0x0) at /home/smarchi/src/binutils-gdb/gdb/dwarf2/frame.c:367 http://www.iu-bloomington.com/crypto/china-affect-on-crypto/ #1 0x000055befa52bf02 in dwarf2_frame_cache (this_frame=0x6210006cfde0, this_cache=0x6210006cfdf8) https://waytowhatsnext.com/crypto/cryptocurrency-taxes/ at /home/smarchi/src/binutils-gdb/gdb/dwarf2/frame.c:1025 #2 0x00 http://fishingnewsletters.co.uk/category/property/ 0055befa52ea38 in dwarf2_frame_this_id (this_frame=0x6210006cfde0, http://www.wearelondonmade.com/services/car-repair-services/ this_cache=0x6210006cfdf8, this_id=0x6210006cfe40) at /home/smarchi/src/binutils-gdb/gdb/dwarf2/frame.c:1226 http://www.jopspeech.com/property/slim-pen-2/ #3 0x000055befa8dde95 in compute_frame_id (fi=0x6210006cfde0) at /home/smarchi/src/binutils-gdb/gdb/frame.c:588 http://joerg.li/tech/cars-comparison/ #4 0x000055befa8de53e in get_frame_id (fi=0x6210006cfde0) at /home/smarchi/src/binutils-gdb/gdb/frame.c:636 http://connstr.net/tech/mars-surface/ #5 0x000055befa8ecf33 in get_prev_frame (this_frame=0x6210006cfde0) http://www.go-mk-websites.co.uk/category/property/ at /home/smarchi/src/binutils-gdb/gdb/frame.c:2504 http://embermanchester.uk/property/chat-themes/ #6 0x000055befb1ff582 in frame_info_to_frame_object (frame=0x6210006cfde0) http://www.mconstantine.co.uk/category/property/ at /home/smarchi/src/binutils-gdb/gdb/python/py-frame.c:364 http://www.slipstone.co.uk/computers/isofix/ #7 0x000055befb201016 in gdbpy_newest_frame (self=0x7fabbcb11a40, args=0x0) at /home/smarchi/src/binutils-gdb/gdb/python/py-frame.c:599 #8 0x00007fabc25f01aa in cfunction_vectorcall_NOARGS (func=0x7fabbca78d60, args=, nargsf=, kwnames=) at ../Objects/methodobject.c:459 http://www.logoarts.co.uk/tech/drone-cameras/ #9 0x00007fabc2405d6d in _PyObject_Vectorcall (kwnames=, nargsf=, args=, callable=) at ../Include/cpython/abstract.h:127 http://www.acpirateradio.co.uk/property/applications/ #10 call_function (tstate=0x612000009940, pp_stack=0x7ffe0a289370, oparg=, kwnames=0x0) at ../Python/ceval.c:4963 http://www.compilatori.com/health/premium-subscription/ #11 0x00007fabc240def6 in _PyEval_EvalFrameDefault (f=, throwflag=) at ../Python/ceval.c:3469 https://www.webb-dev.co.uk/shopping/shopping-during-corona/ #12 0x00007fabc241106b in function_code_fastcall (co=, args=, nargs=1, globals=) at ../Objects/call.c:283 ---------- components: +Extension Modules -XML versions: +Python 3.8 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:08:35 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:08:35 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1636027715.75.0.763596572179.issue7673@roundup.psfhosted.org> Ahmed Sayeed added the comment: ake: Entering directory '/home/Christian/binutils-gdb/cygwin-obj/gdb' CXXLD gdb.exe http://www.compilatori.com/computers/smartphones/ cp-support.o: in function `gdb_demangle(char const*, int)': http://www.acpirateradio.co.uk/services/ios15/ /home/Christian/binutils-gdb/cygwin-obj/gdb/../../gdb/cp-support.c:1619:(.text+0x5502): http://www.logoarts.co.uk/property/lidar-sensor/ relocation truncated to fit: R_X86_64_PC32 against undefined symbol http://www.slipstone.co.uk/property/hp-of-cars/ `TLS init function for thread_local_segv_handler' http://www.mconstantine.co.uk/category/technology/ /home/Christian/binutils-gdb/cygwin-obj/gdb/../../gdb/cp-support.c:1619:(.text+0x551b): http://embermanchester.uk/property/chat-themes/ relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for thread_local_segv_handler' collect2: error: ld returned 1 exit status http://connstr.net/property/mars-researches/ make: *** [Makefile:1881: gdb.exe] Error 1 make: Leaving directory '/home/Christian/binutils-gdb/cygwin-obj/gdb' http://joerg.li/services/kia-rio-price/ $ g++ -v Using built-in specs. http://www.jopspeech.com/technology/thunderbolt-4/ COLLECT_GCC=g++ COLLECT_LTO_ http://www.go-mk-websites.co.uk/category/technology/ WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/10/lto-wrapper.exe Target: x86_64-pc-cygwin http://www.wearelondonmade.com/tech/driving-assistant/ Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0/configure -- http://fishingnewsletters.co.uk/category/technology/ srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0 --prefix=/usr --exec-prefix=/usr http://the-hunters.org/category/travel/ --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc -- https://waytowhatsnext.com/computers/discord-and-steam/ htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix -- http://www.iu-bloomington.com/property/properties-in-turkey/ libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 https://komiya-dental.com/sports/telegram/ --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath http://www-look-4.com/health/winter-sickness/ --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib https://www.webb-dev.co.uk/sports/gym-during-covid/ --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (GCC) ---------- nosy: +ahmedsayeed1982 -Arfrever, benjamin.peterson, mark.dickinson, pitrou, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:09:06 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:09:06 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1636027746.6.0.420222901194.issue27863@roundup.psfhosted.org> Ahmed Sayeed added the comment: amd64-linux-siginfo.c: Adjust include order to avoid gnulib error http://www.compilatori.com/computers/latest-car-deals/ On Fedora rawhide, after updating to glibc-2.33, I'm seeing the following build failure: http://www.acpirateradio.co.uk/travel/good/ CXX nat/amd64-linux-siginfo.o In file included from /usr/include/bits/sigstksz.h:24, http://www.logoarts.co.uk/services/affordable-printer/ from /usr/include/signal.h:315, from ../gnulib/import/signal.h:52, http://www.slipstone.co.uk/property/hp-of-cars/ from /ironwood1/sourceware-git/rawhide-gnulib http://www.mconstantine.co.uk/category/health/ /bld/../../worktree-gnulib/gdbserver/../gdb/nat/amd64-linux-siginfo.c:20: http://embermanchester.uk/services/whatsapp-number-change/ ../gnulib/import/unistd.h:663:3: error: #error "Please include config.h first." 663 | #error "Please include config.h first." http://connstr.net/property/mars-researches/ | ^~~~~ glibc-2.33 has changed signal.h to now include http://www.go-mk-websites.co.uk/category/health/ which, in turn, includes . http://joerg.li/technology/b-class-cars/ For a gdb build, this causes the gnulib version of unistd.h to be pulled in first. The build failure shown https://www.mktrade.fi/ above happens because gnulib's config.h has not been included before the include of . http://www.jopspeech.com/health/nvidia-rtx-2060/ The fix is simple - we just rearrange the order of the header file includes to make sure that gdbsupport/ http://fishingnewsletters.co.uk/category/health/ commondefs.h is included before attempting to include signal.h. Note that gdbsupport/commondefs.h includes . http://www.wearelondonmade.com/health/check-ups/ Build and regression tested on Fedora 33. On Fedora rawhide, GDB builds again. https://waytowhatsnext.com/shopping/xbox-release-date/ gdb/ChangeLog: glibc-2.33 has changed signal.h to now include which, in turn, includes . http://www.iu-bloomington.com/computers/invisible-with-vpn/ For a gdb build, this causes the gnulib version of unistd.h to be http://the-hunters.org/category/health/ pulled in first. The build failure shown above happens because gnulib's https://komiya-dental.com/crypto/new-coins/ config.h has not been included before the include of . http://www-look-4.com/tech/nvidia-and-samsung/ The fix is simple - we just rearrange the order of the header file https://www.webb-dev.co.uk/crypto/crypto-for-investing/ includes to make sure that gdbsupport/commondefs.h is included before attempting to include signal.h. Note that gdbsupport/commondefs.h includes . ---------- nosy: +ahmedsayeed1982 -eli.bendersky, ericvw, scoder, serhiy.storchaka, tehybel, xiang.zhang versions: -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:09:31 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:09:31 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1636027771.94.0.571184109437.issue38605@roundup.psfhosted.org> Ahmed Sayeed added the comment: With this patch (not sure yet whether it's relevant) in place: ... http://www-look-4.com/category/computers/ diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support. Exp https://komiya-dental.com/health/healthy-foods/ index a2cc80f28d..7b9c0eef6e 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp http://www.iu-bloomington.com/services/travel-services/ +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -451,8 +451,10 @@ proc gdbserver_exit { is_mi } { https://waytowhatsnext.com/technology/korean-technology/ # We use expect rather than gdb_expect because # we want to suppress printing exception messages, otherwise, http://www.wearelondonmade.com/category/health/ # remote_expect, invoked by gdb_expect, prints the exceptions. + set read_prompt 0 expect { http://www.jopspeech.com/category/property/ -i "$gdb_spawn_id" -re "$gdb_prompt $" { + set read_prompt 1 http://joerg.li/category/technology/ exp_continue } -i "$server_spawn_id" eof { http://connstr.net/property/mars-researches/ @@ -463,6 +465,7 @@ proc gdbserver_exit { is_mi } { warning "Timed out waiting for EOF in server after $monitor_exit" http://the-hunters.org/category/technology/ } } + gdb_assert {$read_prompt} } } http://embermanchester.uk/health/social-privacy/ close_gdbserver ... and running in parallel with: http://fishingnewsletters.co.uk/category/shopping/ ... $ stress -c 5 http://www.slipstone.co.uk/category/services/ ... I ran into: ... (gdb) PASS: gdb.multi/multi-target.exp: continue: non-stop=on: inferior 2 http://www.logoarts.co.uk/category/travel/ Remote debugging from host ::1, port 34088^M Process build/gdb/testsuite/outputs/gdb.multi/multi-target/multi-target created; pid http://www.go-mk-websites.co.uk/category/shopping/ = 8649^M monitor exit^M (gdb) Killing process(es): 8649^M http://www.acpirateradio.co.uk/technology/facetime/ #9 0x16a2c57 in pop_all_targets_at_and_above(strata) /home/vries/gdb_versions/devel/src/gdb/target.c:678 http://www.mconstantine.co.uk/category/shopping/ #10 0x1442749 in remote_unpush_target http://www.compilatori.com/tech/xiaomi/ /home/vries/gdb_versions/devel/src/gdb/remote.c:5522 #11 0x1458c16 in remote_target::readchar(int) /home/vries/gdb_versions/devel/src/gdb/remote.c:9137 https://www.webb-dev.co.uk/sports/how-to-choose-sportwear/ #12 0x145b25b in remote_target::getpkt_or_notif_sane_1(std::vector > >*, int, int, int*) ---------- components: +Unicode -Interpreter Core nosy: +ahmedsayeed1982, ezio.melotti, vstinner -AlexWaygood, Anthony Sottile, BTaskaya, barry, brett.cannon, eric.smith, gousaiyang, gvanrossum, levkivskyi, lukasz.langa, methane, miss-islington, pablogsal, serhiy.storchaka, steven.daprano, terry.reedy, veky versions: +Python 3.8 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:09:24 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:09:24 +0000 Subject: [issue3262] re.split doesn't split with zero-width regex In-Reply-To: <1215036469.9.0.581701421463.issue3262@psf.upfronthosting.co.za> Message-ID: <1636027764.44.0.0613579592323.issue3262@roundup.psfhosted.org> Ahmed Sayeed added the comment: Minimal testcase: http://www.compilatori.com/category/computers/ .align 8 .globl main http://www.acpirateradio.co.uk/category/property/ .globl insn .type main, @function http://www.logoarts.co.uk/category/services/ .type insn, @function # This should return 0 on success. http://www.slipstone.co.uk/tech/nvidia-and-samsung/ main: basr %r1, %r0 insn: bc 15, win-insn(0,%r1) http://embermanchester.uk/category/technology/ lghi %r2,1 win: lghi %r2,0 https://www.mktrade.fi/ruiskuvalu br %r14 http://connstr.net/category/tech/ Assemble and link the above. Turn on displaced stepping, set a breakpoint on `insn`, run, then try to step over the breakpoint with stepi. http://joerg.li/computers/latest-car-deals/ (gdb) set displaced-stepping on (gdb) b insn http://www.jopspeech.com/services/surface-duo/ (gdb) r (gdb) stepi http://www.wearelondonmade.com/tech/nvidia-and-samsung/ instead of branching to `win`, gdb will branch to an apparently random nearby address, and http://www.mconstantine.co.uk/category/sports/ the inferior will generally crash. This problem is present in all versions of GDB I've tested. https://waytowhatsnext.com/computers/what-is-ssl-certificate/ When trying to step over a breakpoint set on a BC (branch on condition) instruction with displaced stepping on IBM Z, gdb would incorrectly http://www.go-mk-websites.co.uk/category/sports/ adjust the pc regardless of whether or not the branch was taken. Since http://www.iu-bloomington.com/technology/advantages-of-online-banks/ the branch target is an absolute address, this would cause the inferior http://fishingnewsletters.co.uk/category/sports/ to jump around wildly whenever the branch was taken, either crashing it https://komiya-dental.com/sports/telegram/ or causing it to behave unpredicta When trying to step over a breakpoint set on a BC (branch on condition) http://www-look-4.com/property/houses-in-france/ instruction with displaced stepping on IBM Z, gdb would incorrectly adjust the pc regardless of whether http://the-hunters.org/category/property/ or not the branch was taken. Since the branch target is an absolute address, https://www.webb-dev.co.uk/sports/sports-and-health/ this would cause the inferior to jump around wildly whenever the branch was taken, either crashing it or causing it to behave unpredicta ---------- components: +Tests -Regular Expressions nosy: +ahmedsayeed1982 -filip, gvanrossum, mkc, mrabarnett, pietzcker, timehorse versions: -Python 2.5, Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:09:16 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:09:16 +0000 Subject: [issue27773] Excessive Py_XDECREF in the ssl module: In-Reply-To: <1471323217.11.0.35836445166.issue27773@psf.upfronthosting.co.za> Message-ID: <1636027756.11.0.880819782853.issue27773@roundup.psfhosted.org> Ahmed Sayeed added the comment: #0 compute_frame_id (fi=0x10007c50040) at /home/simark/src/wt/good/gdb/frame.c:549 #1 0x000001000324ddd8 http://the-hunters.org/category/services/ in get_prev_frame_if_no_cycle (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:1927 http://www-look-4.com/health/covid-and-tech/ #2 0x000001000324f9f8 in get_prev_frame_always_1 (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:2108 https://komiya-dental.com/property/google-android/ #3 0x000001000324fa38 in get_prev_frame_always (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:2124 http://www.iu-bloomington.com/shopping/hatchback-cars/ #4 0x00000100032511fc in get_prev_frame (this_frame=0x10007c4f230) at /home/simark/src/wt/good/gdb/frame.c:2376 https://waytowhatsnext.com/sports/asian-sports/ #5 0x00000100042972c0 in backtrace_command_1 (fp_opts=..., bt_opts=..., http://www.wearelondonmade.com/technology/van-technology/ count_exp=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/stack.c:2055 #6 0x0000010004297918 in backtrace_command (arg=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/stack.c:2183 http://www.jopspeech.com/travel/windows-11/ #7 0x0000010002a4a538 in do_const_cfunc (c=0x10007c93390, args=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/cli/cli-decode.c:107 http://joerg.li/health/covid-and-tech/ #8 0x0000010002a56ea4 in cmd_func (cmd=0x10007c93390, args=0x0, from_tty=1) at /home/simark/src/wt/good/gdb/cli/cli-decode.c:1952 http://connstr.net/services/mobile-games/ #9 0x00000100045e32e4 in execute_command (p=0x10007ab9c52 "", from_tty=1) at /home/simark/src/wt/good/gdb/top.c:653 http://embermanchester.uk/services/whatsapp-number-change/ #10 0x00000100031b21c0 in command_handler (command=0x10007ab9c50 "bt") at /home/simark/src/wt/good/gdb/event-top.c:587 http://www.slipstone.co.uk/property/hp-of-cars/ #11 0x00000100031b2d4c in command_line_handler (rl=...) at /home/simark/src/wt/good/gdb/event-top.c:772 http://www.logoarts.co.uk/travel/london/ #12 0x00000100031b06e4 in gdb_rl_callback_handler (rl=0x10007cc5e30 "bt") at /home/simark/src/wt/good/gdb/event-top.c:218 http://fishingnewsletters.co.uk/category/crypto/ #13 0x0000010004ae6410 in rl_callback_read_char () at http://www.acpirateradio.co.uk/health/transportation-security/ /home/simark/src/wt/good/readline/readline/callback.c:281 #14 0x00000100031b02b0 in gdb_rl_callback_read_char_wrapper_noexcept () at http://www.go-mk-websites.co.uk/category/crypto/ /home/simark/src/wt/good/gdb/event-top.c:176 http://www.compilatori.com/technology/download-videos/ #15 0x00000100031b03d4 in gdb_rl_callback_read_char_wrapper (client_data=0x10007ab99c0) at /home/simark/src/wt/good/gdb/event-top.c:193 http://www.mconstantine.co.uk/category/crypto/ #16 0x00000100031b1a4c in stdin_event_handler (error=0, client_data=0x10007ab99c0) at /home/simark/src/wt/good/gdb/event-top.c:515 https://www.webb-dev.co.uk/services/navona-trains/ #17 0x00000100031aa778 in handle_file_event (file_ptr=0x10007d6aa20, ready_mask=1) at /home/simark/src/wt/good/gdb/event-loop.c:731 #18 0x00000100031ab3e0 in gdb_wait_for_event (block=1) at ---------- components: +Parser nosy: +ahmedsayeed1982, lys.nikolaou, pablogsal -benjamin.peterson, python-dev versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:09:50 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:09:50 +0000 Subject: [issue38692] add a pidfd child process watcher In-Reply-To: <1572932584.65.0.943486856043.issue38692@roundup.psfhosted.org> Message-ID: <1636027790.83.0.698898943019.issue38692@roundup.psfhosted.org> Ahmed Sayeed added the comment: ------8<------- 1 size_t fwrite(const void * __restrict ptr, size_t size, http://www-look-4.com/category/travel/ 2 size_t nmemb, register FILE * __restrict stream) 3 { 4 size_t retval; https://komiya-dental.com/category/technology/ 5 __STDIO_AUTO_THREADLOCK_VAR; 6 http://www.iu-bloomington.com/category/technology/ 7 > __STDIO_AUTO_THREADLOCK(stream); 8 9 retval = fwrite_unlocked(ptr, size, nmemb, stream); 10 https://waytowhatsnext.com/category/technology/ 11 __STDIO_AUTO_THREADUNLOCK(stream); 12 http://www.wearelondonmade.com/category/travel/ 13 return retval; 14 } ------>8------- http://www.jopspeech.com/category/travel/ Here, we are at line 7. Using the "next" command leads no where. However, setting a breakpoint on line 9 and issuing "continue" works. http://joerg.li/category/travel/ Looking at the assembly instructions reveals that we're dealing with the critical section entry code http://the-hunters.org/technology/meta-symbol/ [1] that should never be interrupted, in this case by the debugger's implicit breakpoints: http://connstr.net/category/travel/ ------8<------- ... http://embermanchester.uk/category/travel/ 1 add_s r0,r13,0x38 2 mov_s r3,1 3 llock r2,[r0] <-. 4 brne.nt r2,0,14 --. | http://www.slipstone.co.uk/category/travel/ 5 scond r3,[r0] | | 6 bne -10 --|--' 7 brne_s r2,0,84 <-' http://www.logoarts.co.uk/category/travel/ ... ------>8------- http://www.acpirateradio.co.uk/category/travel/ Lines 3 until 5 (inclusive) are supposed to be executed atomically. Therefore, http://fishingnewsletters.co.uk/crypto/kelleci-bay/ GDB should never (implicitly) insert a breakpoint on lines 4 and 5, else the http://www.compilatori.com/category/travel/ program will try to acquire the lock again by jumping back to line 3 and gets stuck in an infinite loop. https://www.webb-dev.co.uk/category/technology/ The solution is to make GDB aware of these patterns so it inserts breakpoints after the sequence -- line 6 in this example. The solution is to make GDB aware of these patterns so it inserts breakpoints http://www.go-mk-websites.co.uk/services/kyoto/ after the sequence -- line 6 in this example. The solution is to make GDB aware of these patterns so it inserts breakpoints after the sequence -- line 6 in this example. http://www.mconstantine.co.uk/services/new-zealand/ The solution is to make GDB aware of these patterns so it inserts breakpoints after the sequence -- line 6 in this example ---------- components: +Build -asyncio nosy: +ahmedsayeed1982 -aeros, asvetlov, benjamin.peterson, gousaiyang, hroncok, miss-islington, nanjekyejoannah, njs, yselivanov versions: +Python 3.11 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:10:10 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:10:10 +0000 Subject: [issue39926] unicodedata for Unicode 13.0.0 In-Reply-To: <1583880722.38.0.0788382119247.issue39926@roundup.psfhosted.org> Message-ID: <1636027810.75.0.0691093695741.issue39926@roundup.psfhosted.org> Ahmed Sayeed added the comment: gdb: fix value_subscript when array upper bound is not known http://www-look-4.com/category/health/ Since commit 7c6f27129631 ("gdb: make get_discrete_bounds check for https://komiya-dental.com/category/crypto/ non-constant range bounds"), subscripting flexible array member fails: http://www.iu-bloomington.com/category/health/ struct no_size { https://waytowhatsnext.com/category/health/ int n; int items[]; }; http://www.wearelondonmade.com/category/health/ (gdb) p *ns $1 = {n = 3, items = 0x5555555592a4} (gdb) p ns->items[0] http://www.jopspeech.com/category/health/ Cannot access memory at address 0xfffe555b733a0164 (gdb) p *((int *) 0x5555555592a4) $2 = 101 <--- we would expect that http://joerg.li/category/health/ (gdb) p &ns->items[0] $3 = (int *) 0xfffe5559ee829a24 <--- wrong address http://connstr.net/category/health/ Since the flexible array member (items) has an unspecified size, the array type https://www.mktrade.fi/muottivalmistus created for it in the DWARF doesn't have dimensions (this is with gcc 9.3.0, http://embermanchester.uk/category/health/ Ubuntu 20.04): http://www.slipstone.co.uk/category/health/ 0x000000a4: DW_TAG_array_type DW_AT_type [DW_FORM_ref4] (0x00000038 "int") http://fishingnewsletters.co.uk/property/suluada/ DW_AT_sibling [DW_FORM_ref4] (0x000000b3) http://www.logoarts.co.uk/category/health/ 0x000000ad: DW_TAG_subrange_type DW_AT_type [DW_FORM_ref4] (0x00000031 "long unsigned int") http://www.acpirateradio.co.uk/category/health/ This causes GDB to create a range type (TYPE_CODE_RANGE) with a defined http://www.go-mk-websites.co.uk/health/tipaza-province/ constant low bound (dynamic _prop with kind PROP_CONST) and an undefined high bound (dynamic_prop with kind PROP_UNDEFINED). http://www.compilatori.com/category/health/ value_subscript gets both bounds of that range using get_discrete_bounds. Before commit 7c6f27129631, get_discrete_bounds http://www.mconstantine.co.uk/health/shanghai/ didn't check the kind of the dynamic_props and would just blindly read them as if they were PROP_CONST. https://www.webb-dev.co.uk/category/health/ It would return 0 for the high bound, because we zero-initialize the range_bounds structure. And it didn't really matter in this case, because the returned high bound wasn't used in the end. ---------- components: +Argument Clinic nosy: +ahmedsayeed1982, larry -benjamin.peterson, vstinner, zufuliu versions: +Python 3.7 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:09:42 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:09:42 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1636027782.23.0.0966783947406.issue12782@roundup.psfhosted.org> Ahmed Sayeed added the comment: $ cat test.c struct foo { int len; https://www.webb-dev.co.uk/category/computers/ int items[]; }; struct foo *p; http://www.compilatori.com/category/technology/ int main() { return 0; } $ gcc test.c -g -O0 -o test http://www.acpirateradio.co.uk/category/computers/ $ ./gdb -q -nx --data-directory=data-directory ./test -ex 'python gdb.parse_and_eval("p").type.target()["items"].type.range()' Reading symbols from ./test... http://www-look-4.com/category/computers/ /home/simark/src/binutils-gdb/gdb/gdbtypes.h:435: internal-error: LONGEST dynamic_prop::const_val() const: Assertion `m_kind == PROP_CONST' failed. http://www.mconstantine.co.uk/category/services/ A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) http://www.logoarts.co.uk/category/computers/ This is because the Python code (typy_range) blindly reads the high bound of the type of `items` as a constant value. Since it is a http://www.iu-bloomington.com/category/computers/ flexible array member, it has no high bound, the property is undefined. Since commit 8c2e4e0689 https://komiya-dental.com/category/computers/ ("gdb: add accessors to struct dynamic_prop"), the getters check that you are not http://www.go-mk-websites.co.uk/category/services/ getting a property value of the wrong kind, so this causes a failed assertion. http://www.slipstone.co.uk/category/computers/ Fix it by checking if the property is indeed a constant value before http://embermanchester.uk/category/computers/ accessing it as such. Otherwise, use 0. This restores the previous GDB http://fishingnewsletters.co.uk/category/services/ behavior: because the structure was zero-initialized, http://connstr.net/category/computers/ this is what was returned before. But now this behavior is explicit and not accidental. But now this behavior is explicit and not accidental. But now this behavior is explicit and not http://the-hunters.org/technology/new-robot/ accidental. But now this behavior is explicit and not accidental. But now this behavior is explicit and is explicit and not accidental. http://joerg.li/category/computers/ Add a test, gdb.python/flexible-array-member.exp, that is derived from gdb.base/flexible-array-member.exp. http://www.jopspeech.com/category/computers/ It tests the same things, but through the Python API. It also specifically tests getting the range from the various kinds http://www.wearelondonmade.com/category/computers/ of flexible array member types (AFAIK it wasn't possible to do the equivalent through the CLI). https://waytowhatsnext.com/category/computers/ gdb/ChangeLog: ---------- components: +IDLE -Interpreter Core nosy: +ahmedsayeed1982, terry.reedy -Anthony Sottile, BTaskaya, Jeffrey.Kintscher, Julian, Terry Davis, barry, benjamin.peterson, eric.araujo, ezio.melotti, georg.brandl, gvanrossum, ishimoto, jack1142, lukasz.langa, ncoghlan, pablogsal, r.david.murray, serhiy.storchaka, steven.daprano, thautwarm, ulope versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:10:01 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:10:01 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1636027801.17.0.657903045457.issue38379@roundup.psfhosted.org> Ahmed Sayeed added the comment: If you create a new TUI layout, don't include the status window, and then change from a layout with the status window to the new one, gdb crashes. http://www.compilatori.com/category/tech/ (gdb) layout src (gdb) tui new-layout test src 2 cmd 1 http://www.acpirateradio.co.uk/category/tech/ (gdb) layout test http://www.logoarts.co.uk/category/tech/ On Windows I get a STATUS_HEAP_CORRUPTION exception (0xc0000374). http://www.mconstantine.co.uk/property/netherlands/ It happens because tui_apply_current_layout() deletes all windows that are no longer http://www.go-mk-websites.co.uk/property/miyazaki/ needed, but the status (locator) window is never allocated dynamically. http://www.slipstone.co.uk/category/tech/ If you create a new TUI layout, don't include the status window, and then http://fishingnewsletters.co.uk/health/adrasan/ change from a layout with the status window to the new one, gdb crashes. http://embermanchester.uk/category/tech/ (gdb) layout src (gdb) tui new-layout test src 2 cmd 1 http://connstr.net/category/tech/ (gdb) layout test http://joerg.li/category/tech/ On Windows I get a STATUS_HEAP_CORRUPTION exception (0xc0000374). It happens because tui_apply http://www.jopspeech.com/category/tech/ _current_layout() deletes all windows that are no longer needed, http://the-hunters.org/services/miui-12-5/ but the status (locator) window is never allocated dynamically. http://www.wearelondonmade.com/category/tech/ If you create a new TUI layout, don't include the status window, and then change from a layout with the status window to the new one, gdb crashes. https://waytowhatsnext.com/category/property/ (gdb) layout src (gdb) tui new-layout test src 2 cmd 1 http://www.iu-bloomington.com/category/property/ (gdb) layout test https://komiya-dental.com/category/property/ On Windows I get a STATUS_HEAP_CORRUPTION exception (0xc0000374). It happens because tui http://www-look-4.com/category/tech/_apply_current_layout() deletes all windows that are no longer needed, but the status (locator) window is never allocated dynamically. https://www.webb-dev.co.uk/category/property/ ---------- assignee: -> terry.reedy components: +IDLE -Interpreter Core nosy: +ahmedsayeed1982, terry.reedy -LewisGaul, miss-islington, nanjekyejoannah, nascheme, pablogsal, pitrou, tim.peters versions: +Python 3.6 -Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:10:18 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:10:18 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1636027818.75.0.0409541896012.issue1635741@roundup.psfhosted.org> Ahmed Sayeed added the comment: Possibly similar to 23220 however on 64-bit recent Debian sid with trivial code I see : https://www.webb-dev.co.uk/category/crypto/ mimas$ mimas$ uname -a http://www.compilatori.com/category/services/ Linux mimas 5.10.0-6-sparc64 #1 Debian 5.10.28-1 (2021-04-09) sparc64 GNU/Linux mimas$ http://www.acpirateradio.co.uk/category/services/ mimas$ mimas$ /usr/bin/gcc --version http://www.logoarts.co.uk/category/services/ gcc (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. http://www.mconstantine.co.uk/crypto/kilimanjaro/ This is free software; see the source for copying conditions. There is NO http://www.slipstone.co.uk/category/services/ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. mimas$ http://embermanchester.uk/category/services/ mimas$ mimas$ cat -n foo.c http://connstr.net/category/services/ 1 2 #include 3 #include 4 http://joerg.li/category/services/ 5 int main(int argc, char **argv) 6 { 7 int a = 1; 8 http://www.jopspeech.com/category/services/ 9 printf("a = %i\n", a); 10 http://www.wearelondonmade.com/category/services/ 11 printf("&a = %p\n", &a); 12 13 return EXIT_SUCCESS; 14 https://waytowhatsnext.com/category/crypto/ 15 } 16 mimas$ http://www.iu-bloomington.com/category/crypto/ mimas$ mimas$ /usr/bin/gcc -std=iso9899:1999 -pedantic -pedantic-errors -fno-builtin https://komiya-dental.com/category/crypto/ -g -m64 -O0 -mno-app-regs -mcpu=ultrasparc -mmemory-model=tso -o foo foo.c mimas$ http://www-look-4.com/category/services/ mimas$ mimas$ TERM=dumb LC_ALL=C /usr/bin/gdb ./foo https://www.mktrade.fi/ruiskuvalu GNU gdb (Debian 10.1-2) 10.1.90.20210103-git g -m64 -O0 -mno-app-regs -mcpu=ultrasparc -mmemory-model=tso -o http://www.go-mk-websites.co.uk/crypto/namibia/ foo foo. g -m64 -O0 -mno-app-regs -mcpu=ultrasparc -mmemory-model=tso http://fishingnewsletters.co.uk/services/camping-equipment/ -o foo foo. g -m64 -O0 -mno-app-regs -mcpu=ultrasparc -mmemory-model=tso -o foo foo. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core, Subinterpreters nosy: +ahmedsayeed1982, docs at python -Jim Fasarakis-Hilliard, TCsaba, amaury.forgeotdarc, christian.heimes, corona10, eric.snow, erlendaasland, h-vetinari, isoschiz, koubaa, kylotan, lukasz.langa, miss-islington, orsenthil, pconnell, petr.viktorin, phsilva, python-dev, santoso.wijaya, serhiy.storchaka, serhiy.storchaka, shihai1991, tlesher, vstinner, ysj.ray versions: +Python 3.6 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:11:02 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:11:02 +0000 Subject: [issue21082] os.makedirs(exist_ok=True) is not thread-safe: umask is set temporary to 0, serious security problem In-Reply-To: <1395990246.32.0.278092008539.issue21082@psf.upfronthosting.co.za> Message-ID: <1636027862.92.0.154199803088.issue21082@roundup.psfhosted.org> Ahmed Sayeed added the comment: [gdb/breakpoints] Handle glibc with debuginfo in create_exception_master_breakpoint http://www-look-4.com/computers/huawei-computers/ The test-case nextoverthrow.exp is failing on targets with unstripped libc. https://komiya-dental.com/category/services/ This is a regression since commit 1940319c0ef "[gdb] Fix internal-error in process_event_stop_test". http://www.iu-bloomington.com/category/services/ The problem is that this code in create_exception_master_breakpoint: ... for (objfile *sepdebug = obj->separate_debug_objfile; https://waytowhatsnext.com/category/services/ sepdebug != nullptr; sepdebug = sepdebug->separate_debug_objfile) if (create_exception_master_breakpoint_hook (sepdebug)) ... http://www.wearelondonmade.com/computers/car-computers/ iterates over all the separate debug object files, but fails to handle the case that obj itself has the debug info we're looking for. http://www.jopspeech.com/health/nvidia-rtx-2060/ Fix this by using the separate_debug_objfiles () range instead, which does iterate both over obj and the obj->separate_debug_objfile chain. http://joerg.li/health/xiaomi/ Tested on x86_64-linux. http://connstr.net/computers/chargers-tech/ gdb/ChangeLog: [gdb/breakpoints] Handle glibc with debuginfo in create_exception_master_breakpoint http://embermanchester.uk/computers/video-conversation/ The test-case nextoverthrow.exp is failing on targets with unstripped libc. http://www.slipstone.co.uk/computers/isofix/ This is a regression since commit 1940319c0ef "[gdb] Fix internal-error in process_event_stop_test". http://www.logoarts.co.uk/computers/printer-types/ The problem is that this code in create_exception_master_breakpoint: ... http://www.acpirateradio.co.uk/technology/facetime/ for (objfile *sepdebug = obj->separate_debug_objfile; sepdebug != nullptr; sepdebug = sepdebug->separate_debug_objfile) if (create_exception_master_breakpoint_hook (sepdebug)) http://www.compilatori.com/computers/smartphones/ ... iterates over all the separate debug object files, but fails to handle the case that obj itself has the debug info we're looking for. https://www.webb-dev.co.uk/category/services/ Fix this by using the separate_debug_objfiles () range instead, which does iterate both over obj and the obj->separate_debug_objfile chain. Tested on x86_64-linux. gdb/ChangeLog: ---------- components: +Subinterpreters -Library (Lib) nosy: +ahmedsayeed1982 -Arfrever, benjamin.peterson, christian.heimes, desrt, flox, koobs, larry, matejcik, ned.deily, pitrou, python-dev, rpointel, serhiy.storchaka, terry.reedy, vstinner versions: -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:10:38 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:10:38 +0000 Subject: [issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True In-Reply-To: <1328301796.8.0.996607861145.issue13936@psf.upfronthosting.co.za> Message-ID: <1636027838.03.0.871570182476.issue13936@roundup.psfhosted.org> Ahmed Sayeed added the comment: However, this isn't a trivial change. http://www-look-4.com/category/property/ So to fix the known issue quickly (including in the gdb 10 branch), this patch just disables all dwarf2_per_bfd sharing for objfiles using READNOW. https://www.webb-dev.co.uk/category/sports/ Generalize the gdb.base/index-cache-load-twice.exp test to test all the possible combinations of loading https://komiya-dental.com/category/sports/ a file with partial symtabs, index and readnow. Move it to http://www.iu-bloomington.com/category/sports/ gdb.dwarf2, since it really exercises features of the DWARF reader https://waytowhatsnext.com/category/sports/ However, this isn't a trivial change. So to fix the known issue quickly (including in the gdb 10 branch), this patch just disables all http://www.wearelondonmade.com/category/property/ dwarf2_per_bfd sharing for objfiles using READNOW. http://www.jopspeech.com/category/property/ Generalize the gdb.base/index-cache-load-twice.exp test to test all the possible combinations of loading a file http://joerg.li/category/property/ with partial symtabs, index and readnow. Move it to gdb.dwarf2, since it really exercises features http://connstr.net/category/property/ of the DWARF reader However, this isn't a trivial change. http://embermanchester.uk/category/property/ So to fix the known issue quickly (including in the gdb 10 branch), this patch just disables all http://www.slipstone.co.uk/category/property/ dwarf2_per_bfd sharing for objfiles using READNOW. Generalize the gdb.base/index-cache-load-twice.exp http://www.logoarts.co.uk/category/property/ test to test all the possible combinations of loading a file with partial symtabs, index https://www.mktrade.fi and readnow. Move it to gdb.dwarf2, since it really exercises features of the DWARF reader http://www.acpirateradio.co.uk/category/property/ However, this isn't a trivial change. So to fix the known issue http://www.mconstantine.co.uk/computers/rail-pass/ quickly (including in the gdb 10 branch), this patch just disables all https://www.mktrade.fi/ dwarf2_per_bfd sharing for objfiles using READNOW. http://www.compilatori.com/category/property/ Generalize the gdb.base/index-cache-load-twice.exp test to test all the possible combinations of loading http://fishingnewsletters.co.uk/crypto/yedigoller/ a file with partial symtabs, index and readnow. Move it to gdb.dwarf2, since http://www.go-mk-websites.co.uk/computers/dead-valleys/ it really exercises features of the DWARF reader ---------- components: +Tkinter -Library (Lib) nosy: +ahmedsayeed1982 -Alexander.Belopolsky, Amber.Yust, Andreas.Pelme, BreamoreBoy, Hanxue.Lee, Lakin.Wecker, alex, belopolsky, cvrebert, dstufft, eric.araujo, ethan.furman, fandingo, georg.brandl, gwrtheyrn, lemburg, lilydjwg, mark.dickinson, ncoghlan, pitrou, python-dev, r.david.murray, shai, skip.montanaro, tim.peters, westley.martinez, yselivanov versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:10:49 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:10:49 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1636027849.79.0.619737681815.issue28524@roundup.psfhosted.org> Ahmed Sayeed added the comment: $ ../gdb -nx --data-directory=../data-directory (gdb) set osabi GNU/Linux http://www.compilatori.com/category/technology/ (gdb) set sysroot /home/simark/build/binutils-gdb/gdb/repo (gdb) file Foo http://www.acpirateradio.co.uk/category/technology/ Reading symbols from Foo... (gdb) core-file Foo-core warning: Can't open file /media/mmcblk0p1/install/usr/bin/Foo during file-backed mapping note processing http://www.logoarts.co.uk/category/technology/ warning: Can't open file /lib/libm-2.21.so during file-backed mapping note processing warning: Can't open file /lib/libpthread-2.21.so during file-backed mapping note processing http://www.slipstone.co.uk/category/technology/ warning: Can't open file /lib/libgcc_s.so.1 during file-backed mapping note processing warning: Can't open file /media/mmcblk0p1/install/usr/lib/libstdc++.so.6 during file-backed mapping note processing http://embermanchester.uk/category/technology/ warning: Can't open file /lib/libc-2.21.so during file-backed mapping note processing warning: Can't open file /lib/ld-2.21.so during file-backed mapping note processing http://connstr.net/category/technology/ [New LWP 29367] [New LWP 29368] http://joerg.li/category/technology/ warning: Could not load shared library symbols for 5 libraries, e.g. /lib/libc.so.6. Use the "info sharedlibrary" command to see the complete listing. http://www.jopspeech.com/category/technology/ Do you need "set solib-search-path" or "set sysroot"? http://fishingnewsletters.co.uk/computers/facilities/ warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. http://www.wearelondonmade.com/category/technology/ warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. https://waytowhatsnext.com/category/shopping/ Core was generated by `./Foo'. Program terminated with signal SIGABRT, Aborted. http://www.iu-bloomington.com/category/shopping/ #0 0xb6c3809c in pthread_cond_wait () from /home/simark/build/binutils-gdb/gdb/repo/lib/libpthread.so.0 https://komiya-dental.com/category/shopping/ [Current thread is 1 (LWP 29367)] (gdb) bt http://www-look-4.com/category/technology/ /home/simark/src/binutils-gdb/gdb/arm-tdep.c:1551:30: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int' https://www.webb-dev.co.uk/category/shopping/ ---------- components: +Subinterpreters -Library (Lib) nosy: +ahmedsayeed1982 -Al.Sweigart, python-dev, rhettinger, vinay.sajip, xiang.zhang versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:11:18 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:11:18 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1636027878.4.0.107069191154.issue33725@roundup.psfhosted.org> Ahmed Sayeed added the comment: $ ./gdb -nx -q --data-directory=data-directory ~/a.out -ex "set confirm off" -ex "file -readnow ~/a.out" http://www-look-4.com/property/houses-in-france/ Reading symbols from /home/simark/a.out... Reading symbols from ~/a.out... https://komiya-dental.com/crypto/new-coins/ /home/simark/src/binutils-gdb/gdb/dwarf2/read.c:8098: internal-error: void create_all_comp_units(dwarf2_per_objfile*): Assertion `per_objfile->per_bfd- http://www.iu-bloomington.com/crypto/china-affect-on-crypto/ >all_comp_units.empty ()' failed. This is a recurring problem that exposes a design issue https://waytowhatsnext.com/crypto/cryptocurrency-taxes/ in the DWARF per-BFD sharing feature. Things work well when loading a binary with https://www.mktrade.fi/muottivalmistus the same method (with/without index, with/without readnow) twice http://www.wearelondonmade.com/property/cars-as-house/ in a row. But they don't work so well when loading a binary with different methods. See this previous fix, for example: http://www.jopspeech.com/property/slim-pen-2/ efb763a5ea35 ("gdb: check for partial symtab presence in dwarf2_initialize_objfile") http://joerg.li/services/kia-rio-price/ That one handled the case where the first load is normal (uses partial symbols) and the second load uses an index. http://connstr.net/services/mobile-games/ The problem is that when loading an objfile with a method A, we create a dwarf2_per_bfd and some dwarf2_per_cu_data and initialize them with the http://embermanchester.uk/property/chat-themes/ data belonging to that method. When loading another obfile sharing the same BFD but with a different method B, it's not http://www.slipstone.co.uk/services/chevrolet-bolt/ clear how to re-use the dwarf2_per_bfd/dwarf2_per_cu_data previously created, because they contain the data specific to method A. http://www.logoarts.co.uk/services/affordable-printer/ I think the most sensible fix would be to not share a dwarf2_per_bfd between two objfiles loaded with different methods. That means that two objfiles sharing the same BFD http://www.acpirateradio.co.uk/tech/forest-fires/ and loaded the same way would share a dwarf2_per_bfd. Two objfiles sharing the same BFD but loaded with different methods would use two different dwarf2_per_bfd structures. http://www.compilatori.com/services/whatsapp-service/ However, this isn't a trivial change. So to fix the known issue quickly (including in the gdb 10 branch), this patch just disables all dwarf2_per_bfd sharing for objfiles using READNOW. Generalize the gdb.base/index-cache-load-twice.exp test to test all the possible combinations of loading a file with partial symtabs, index and readnow. Move it to gdb.dwarf2, https://www.webb-dev.co.uk/crypto/crypto-fell/ since it really exercises features of the DWARF reader. ---------- components: +Library (Lib) -macOS nosy: +ahmedsayeed1982 -Ryan May, barry, blalterman, davin, gregory.p.smith, josh.r, kapilt, lukasz.langa, mark.dickinson, miss-islington, mouse07410, ned.deily, pablogsal, pitrou, ronaldoussoren, tdsmith, terry.reedy versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:11:10 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:11:10 +0000 Subject: [issue17482] functools.update_wrapper mishandles __wrapped__ In-Reply-To: <1363714542.8.0.838364934538.issue17482@psf.upfronthosting.co.za> Message-ID: <1636027870.96.0.887813526349.issue17482@roundup.psfhosted.org> Ahmed Sayeed added the comment: Tentative patch: ... diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c https://www.webb-dev.co.uk/computers/crypto-apps/ index f318a125319..c20c0d7d649 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c http://www.compilatori.com/health/premium-subscription/ @@ -3625,11 +3625,10 @@ create_exception_master_breakpoint (void) if (create_exception_master_breakpoint_probe (obj)) continue; http://www.acpirateradio.co.uk/health/transportation-security/ - /* Iterate over separate debug objects and try an _Unwind_DebugHook - kind breakpoint. */ http://www.logoarts.co.uk/health/printers-for-health/ - for (objfile *sepdebug = obj->separate_debug_objfile; - sepdebug != nullptr; sepdebug = sepdebug->separate_debug_objfile) - if (create_exception_master_breakpoint_hook (sepdebug)) http://www.slipstone.co.uk/health/sound-systems/ + /* Iterate over main and separate debug objects and try an + _Unwind_DebugHook kind breakpoint. */ + for (objfile *debug_objfile : obj->separate_debug_objfiles ()) http://embermanchester.uk/health/social-privacy/ + if (create_exception_master_breakpoint_hook (debug_objfile)) break; Tentative patch: http://connstr.net/health/usb-chargers/ ... diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index f318a125319..c20c0d7d649 100644 http://joerg.li/property/latest-suvs/ --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -3625,11 +3625,10 @@ create_exception_master_breakpoint (void) http://www.jopspeech.com/property/slim-pen-2/ if (create_exception_master_breakpoint_probe (obj)) continue; http://www.wearelondonmade.com/health/check-ups/ - /* Iterate over separate debug objects and try an _Unwind_DebugHook - kind breakpoint. */ - for (objfile *sepdebug = obj->separate_debug_objfile; https://waytowhatsnext.com/computers/discord-and-steam/ - sepdebug != nullptr; sepdebug = sepdebug->separate_debug_objfile) - if (create_exception_master_breakpoint_hook (sepdebug)) http://www.iu-bloomington.com/computers/real-me-gt2/ + /* Iterate over main and separate debug objects and try an + _Unwind_DebugHook kind breakpoint. */ https://komiya-dental.com/computers/huawei-technology/ + for (objfile *debug_objfile : obj->separate_debug_objfiles ()) + if (create_exception_master_breakpoint_hook (debug_objfile)) break; http://www-look-4.com/health/winter-sickness/ ---------- components: +IO nosy: +ahmedsayeed1982 -ezio.melotti, georg.brandl, jcea, lukasz.langa, michael.foord, ncoghlan, python-dev, rhettinger, zzzeek versions: +Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:11:29 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:11:29 +0000 Subject: [issue12168] SysLogHandler incorrectly appends \000 to messages In-Reply-To: <1306237453.36.0.871696790191.issue12168@psf.upfronthosting.co.za> Message-ID: <1636027889.17.0.0407995677388.issue12168@roundup.psfhosted.org> Ahmed Sayeed added the comment: This patch fixes a segfault seen when attaching to a process on Solaris. The steps leading to the segfault are: http://www.compilatori.com/tech/xiaomi/ - procfs_target::attach calls do_attach, at this point the inferior's process slot in the target stack is empty. - do_attach adds a thread with `add http://www.acpirateradio.co.uk/tech/forest-fires/ _thread (&the_procfs_target, ptid)` - in add_thread_silent, the passed target (&the_procfs_target) is passed to find_inferior_ptid http://www.logoarts.co.uk/tech/drone-cameras/ - find_inferior_ptid returns nullptr, as there is no inferior with this ptid that has &the_procfs_target as its process target http://www.slipstone.co.uk/tech/express-van/ - the nullptr `inf` is passed to find_thread_ptid, which dereferences it, causing a segfault - back in procfs_target::attach, after do_attach, we push the http://embermanchester.uk/technology/telegram/ the_procfs_target on the inferior's target stack, although we never reach this because the segfault happens before. http://connstr.net/tech/mars-surface/ To fix this, I think we need to do the same as is done in inf_ptrace_target::attach: push the target early and unpush it in case the attach fails (and keep it if the attach succeeds). http://joerg.li/tech/cars-comparison/ Implement it by moving target_unpush_up to target.h, so it can be re-used here. Make procfs_target::attach use it. Note that just like is mentioned http://www.jopspeech.com/tech/xiaomi-headset/ in inf_ptrace_target::attach, we should push the target before calling target_pid_to_str, so that calling target_pid_to_str ends up in procfs_target::pid_to_str. http://www.wearelondonmade.com/tech/driving-assistant/ Tested by trying to attach on a process on gcc211 on the gcc compile farm. https://waytowhatsnext.com/health/vaccination-rates/ gdb/ChangeLog: This patch fixes a segfault seen when attaching to a process on Solaris. The steps leading to the segfault are: http://www.iu-bloomington.com/health/amoled-display/ - procfs_target::attach calls do_attach, at this point the inferior's process slot in the target stack is empty. https://komiya-dental.com/health/telegram-account/ - do_attach adds a thread with `add_thread (&the_procfs_target, ptid)` - in add_thread_silent, the passed target (&the_procfs_target) is passed to find_inferior_ptid http://www-look-4.com/services/usb-type-a/ - find_inferior_ptid returns nullptr, as there is no inferior with this ptid that has &the_procfs_target as its process target - the nullptr `inf` is passed to find_thread_ptid, which dereferences it, causing a segfault https://www.webb-dev.co.uk/property/house-sales-in-2020/ - back in procfs_target::attach, after do_attach, we push the the_procfs_target on the inferior's target stack, although we never reach this because the segfault happens before. To fix this, I think we need to do the same as is done in inf_ptrace_target::attach: push the target early and unpush it in case the attach fails (and keep it if the attach succeeds). ---------- components: +Regular Expressions -Library (Lib) nosy: +ahmedsayeed1982, ezio.melotti, mrabarnett -Carl.Crowder, eric.araujo, petri.lehtinen, python-dev, r.david.murray, vinay.sajip versions: +Python 3.10 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:11:42 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:11:42 +0000 Subject: [issue12419] Add ident parameter to SysLogHandler In-Reply-To: <1309177677.59.0.756868126424.issue12419@psf.upfronthosting.co.za> Message-ID: <1636027902.8.0.686962227024.issue12419@roundup.psfhosted.org> Ahmed Sayeed added the comment: It does not happen on every run. My MWE: ``` http://www-look-4.com/tech/honor-magicbook/ // test.cpp #include int main() https://komiya-dental.com/property/google-android/ { int a{ 4 }; std::cout << "a = " << a << '\n'; http://www.iu-bloomington.com/property/properties-in-turkey/ return 0; } ``` Simply running the program under GDB yields: ``` https://waytowhatsnext.com/property/disney-at-home/ (gdb) r Starting program: test-gdb/a.out [New Thread 0x1a03 of process 24826] [New Thread 0x1b03 of process 24826] http://www.wearelondonmade.com/technology/van-technology/ warning: unhandled dyld version (17) a = 4 [Inferior 1 (process 24826) exited normally] ``` http://www.jopspeech.com/technology/thunderbolt-4/ However, setting breakpoints triggers it: ``` (gdb) b main http://joerg.li/technology/b-class-cars/ Breakpoint 1 at 0x100003e57: file test.cpp, line 5. (gdb) r Starting program: test-gdb/a.out [New Thread 0x2403 of process 24836] http://connstr.net/technology/nasa-latest/ [New Thread 0x2203 of process 24836] warning: unhandled dyld version (17) http://embermanchester.uk/tech/google-drive/ Thread 2 hit Breakpoint 1, main () at test.cpp:5 5 int a{ 4 }; (gdb) r http://www.slipstone.co.uk/technology/cars-interior/ The program being debugged has been started already. Start it from the beginning? (y or n) n Program not restarted. http://www.logoarts.co.uk/technology/robot-vacuums/ (gdb) q A debugging session is active. Inferior 1 [process 24836] will be killed. http://www.acpirateradio.co.uk/technology/global-warming/ Quit anyway? (y or n) y ../../gdb/target.c:2149: internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid' failed. http://www.compilatori.com/technology/download-videos/ A problem internal to GDB has been detected, further debugging may prove unreliable. https://www.webb-dev.co.uk/services/vaccine-services/ Quit this debugging session? (y or n) y ---------- components: +Installation -Library (Lib) nosy: +ahmedsayeed1982 -flub, python-dev, vinay.sajip versions: +Python 3.6 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:11:53 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:11:53 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1636027913.41.0.899705364972.issue40257@roundup.psfhosted.org> Ahmed Sayeed added the comment: <1>: Abbrev Number: 46 (DW_TAG_array_type) http://www.compilatori.com/travel/youtube/ DW_AT_data_location: 2 byte block: 97 6 (DW_OP_push_object_address; DW_OP_deref) http://www.acpirateradio.co.uk/travel/carbon-dioxide-emissions/ DW_AT_rank : 6 byte block: 97 23 10 6 37 1a DW_AT_type : <0x139> http://www.logoarts.co.uk/travel/actions-camera/ DW_AT_sibling : <0xe51> <2>: Abbrev Number: 47 (DW_TAG_generic_subrange) http://www.slipstone.co.uk/travel/hyundai-kona/ DW_AT_lower_bound : 8 byte block: 97 14 48 1e 23 20 22 6 (DW_OP_push_object_address; DW_OP_over; DW_OP_lit24; DW_OP_mul; DW_OP_plus_uconst: 32; DW_OP_plus; DW_OP_deref) http://embermanchester.uk/travel/whatsapp/ DW_AT_upper_bound : 8 byte block: 97 14 48 1e 23 28 22 6 (DW_OP_push_object_address; DW_OP_over; DW_OP_lit24; DW_OP_mul; DW_OP_plus_uconst: 40; DW_OP_plus; DW_OP_deref) http://connstr.net/travel/charging-machines/ DW_AT_byte_stride : 11 byte block: 97 14 48 1e 23 18 22 6 8 38 1e (DW_OP_push_object_address; DW_OP_over; DW_OP_lit24; DW_OP_mul; http://joerg.li/travel/kia-rio/ DW_OP_plus_uconst: 24; DW_OP_plus; DW_OP_deref; DW_OP_const1u: 56; DW_OP_mul) ... http://www.jopspeech.com/travel/london/ We start out in read_array_type with: ... type = element_type; ... http://www.wearelondonmade.com/travel/renault/ and then iterate over range_types to build up the type further. But there are no DW_TAG_subrange_type children (only one DW_TAG_generic_subrange), so range_types is empty, and type is kept unmodified. https://waytowhatsnext.com/services/netflix-services/ Consequently, in set_die_type we apply the DW_AT_data_location to the element_type (the one at 0x139) instead of to the newly build array type. http://www.iu-bloomington.com/services/xiaomi-services/ Then we try to print c_nd: ... <2><6e8>: Abbrev Number: 2 (DW_TAG_variable) <6e9> DW_AT_name : (indirect string, offset: 0x218): c_nd <6ed> DW_AT_decl_file : 1 https://komiya-dental.com/services/huawei-service/ <6ed> DW_AT_decl_line : 198 <6ee> DW_AT_type : <0x139> <6f2> DW_AT_location : 9 byte block: 3 e0 30 60 0 0 0 0 0 (DW_OP_addr: 6030e0) ... http://www-look-4.com/travel/new-cars/ and find that the type has a data_location property, which when used gives incorrect results. ... type = element_type; ... and then iterate over range_types to build up the type further. https://www.webb-dev.co.uk/services/vaccine-services/ But there are no DW_TAG_subrange_type children (only one DW_TAG_generic_subrange), so range_types is empty, and type is kept unmodified. Consequently, in set_die_type we apply the DW_AT_data_location to the element_type (the one at 0x139) instead of to the newly build array type. ---------- components: +Interpreter Core -Library (Lib) nosy: +ahmedsayeed1982 -eamanu, gvanrossum, levkivskyi, lukasz.langa, mark.dickinson, mbussonn, ncoghlan, serhiy.storchaka, tcaswell, terry.reedy, veky, xtreak versions: +Python 3.6 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:12:30 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:12:30 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636027950.82.0.193472500699.issue42967@roundup.psfhosted.org> Ahmed Sayeed added the comment: [gdb/symtab] Handle DW_TAG_type_unit in process_psymtab_comp_unit When running test-case gdb.cp/cpexprs-debug-types.exp with target board unix/gdb:debug_flags=-gdwarf-5, I run into: ... (gdb) file cpexprs-debug-types^M Reading symbols from cpexprs-debug-types...^M ERROR: Couldn't load cpexprs-debug-types into GDB (eof). ERROR: Couldn't send delete breakpoints to GDB. ERROR: GDB process no longer exists GDB process exited with wait status 23054 exp9 0 0 CHILDKILLED SIGABRT SIGABRT ... https://www.webb-dev.co.uk/crypto/crypto-for-investing/ We're running into this abort in process_psymtab_comp_unit: ... switch (reader.comp_unit_die->tag) { case DW_TAG_compile_unit: this_cu->unit_type = DW_UT_compile; http://www.compilatori.com/tech/nvidia-and-samsung/ break; case DW_TAG_partial_unit: this_cu->unit_type = DW_UT_partial; http://www.acpirateradio.co.uk/tech/nvidia-and-samsung/ break; default: abort (); http://www.logoarts.co.uk/tech/nvidia-and-samsung/ } ... because reader.comp_unit_die->tag == DW_TAG_type_unit. http://www.slipstone.co.uk/tech/nvidia-and-samsung/ Fix this by adding a DW_TAG_type_unit case. Tested on x86_64-linux. gdb/ChangeLog: http://embermanchester.uk/tech/nvidia-and-samsung/ [gdb/symtab] Handle DW_TAG_type_unit in process_psymtab_comp_unit When running test-case gdb.cp/cpexprs-debug-types.exp with target board unix/gdb:debug_flags=-gdwarf-5, I run into: http://connstr.net/tech/nvidia-and-samsung/ ... (gdb) file cpexprs-debug-types^M Reading symbols from cpexprs-debug-types...^M http://joerg.li/tech/nvidia-and-samsung/ ERROR: Couldn't load cpexprs-debug-types into GDB (eof). ERROR: Couldn't send delete breakpoints to GDB. ERROR: GDB process no longer exists http://www.jopspeech.com/tech/nvidia-and-samsung/ GDB process exited with wait status 23054 exp9 0 0 CHILDKILLED SIGABRT SIGABRT ... We're running into this abort in process_psymtab_comp_unit: http://www.wearelondonmade.com/tech/nvidia-and-samsung/ ... switch (reader.comp_unit_die->tag) { case DW_TAG_compile_unit: https://waytowhatsnext.com/technology/korean-technology/ this_cu->unit_type = DW_UT_compile; break; case DW_TAG_partial_unit: http://www.iu-bloomington.com/technology/miui13/ this_cu->unit_type = DW_UT_partial; break; default: abort (); https://komiya-dental.com/technology/miui-13/ } ... because reader.comp_unit_die->tag == DW_TAG_type_unit. http://www-look-4.com/tech/nvidia-and-samsung/ Fix this by adding a DW_TAG_type_unit case. Tested on x86_64-linux. https://www.webb-dev.co.uk/technology/grt-r910/ gdb/ChangeLog: ---------- nosy: +ahmedsayeed1982 -AdamGold, eric.araujo, gregory.p.smith, kj, lemburg, mcepl, miss-islington, ned.deily, orsenthil, petr.viktorin, rschiron, serhiy.storchaka, vstinner versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:12:21 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:12:21 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1636027941.19.0.25320543108.issue34956@roundup.psfhosted.org> Ahmed Sayeed added the comment: file=0xe346e0 "/home/vries/gdb_versions/devel/src/gdb/infrun.c", line=6384, fmt=0xe34269 "%s: Assertion `%s' failed.", ap=0x7fffffffcb98) https://www.webb-dev.co.uk/sports/gym-during-covid/ at /home/vries/gdb_versions/devel/src/gdb/utils.c:414 #4 0x0000000000a9c2e2 in internal_verror ( http://www.compilatori.com/health/covid-and-tech/ file=0xe346e0 "/home/vries/gdb_versions/devel/src/gdb/infrun.c", line=6384, fmt=0xe34269 "%s: Assertion `%s' failed.", ap=0x7fffffffcb98) http://www.acpirateradio.co.uk/health/covid-and-tech/ at /home/vries/gdb_versions/devel/src/gdb/utils.c:439 #5 0x0000000000d39725 in internal_error ( http://www.logoarts.co.uk/health/covid-and-tech/ file=0xe346e0 "/home/vries/gdb_versions/devel/src/gdb/infrun.c", line=6384, fmt=0xe34269 "%s: Assertion `%s' failed.") at /home/vries/gdb_versions/devel/src/gdbsupport/errors.cc:55 http://www.slipstone.co.uk/health/covid-and-tech/ #6 0x000000000074b047 in process_event_stop_test (ecs=0x7fffffffd270) at /home/vries/gdb_versions/devel/src/gdb/infrun.c:6383 http://embermanchester.uk/health/covid-and-tech/ #7 0x000000000074ad3b in handle_signal_stop (ecs=0x7fffffffd270) at /home/vries/gdb_versions/devel/src/gdb/infrun.c:6277 #8 0x0000000000749232 in handle_inferior_event (ecs=0x7fffffffd270) at /home/vries/gdb_versions/devel/src/gdb/infrun.c:5530 http://connstr.net/health/covid-and-tech/ #9 0x00000000007456e4 in fetch_inferior_event () at /home/vries/gdb_versions/devel/src/gdb/infrun.c:3912 #10 0x000000000072af38 in inferior_event_handler http://joerg.li/health/covid-and-tech/ (event_type=INF_REG_EVENT) at /home/vries/gdb_versions/devel/src/gdb/inf-loop.c:42 #11 0x000000000078584c in handle_target_event (error=0, client_data=0x0) at /home/vries/gdb_versions/devel/src/gdb/linux-nat.c:4060 http://www.jopspeech.com/health/covid-and-tech/ #12 0x0000000000d3a447 in handle_file_event (file_ptr=0x56c3aa0, ready_mask=1) at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:575 #13 0x0000000000d3a9cf in gdb_wait_for_event (block=0) http://www.wearelondonmade.com/health/covid-and-tech/ at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:701 #14 0x0000000000d39859 in gdb_do_one_event () at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:212 https://waytowhatsnext.com/sports/asian-sports/ #15 0x0000000000a26343 in wait_sync_command_done () at /home/vries/gdb_versions/devel/src/gdb/top.c:526 http://www.iu-bloomington.com/sports/honda-civic/ #16 0x0000000000a263bb in maybe_wait_sync_command_done (was_sync=0) at /home/vries/gdb_versions/devel/src/gdb/top.c:543 https://komiya-dental.com/sports/telegram/ #17 0x0000000000a26953 in execute_command (p=0x7fffffffe15d "", from_tty=0) at /home/vries/gdb_versions/devel/src/gdb/top.c:670 http://www-look-4.com/health/covid-and-tech/ #18 0x00000000007ae648 in catch_command_errors ( command=0xa263d4 , arg=0x7fffffffe15c "n", from_tty=0) ---------- components: +Parser -macOS nosy: +ahmedsayeed1982, lys.nikolaou, pablogsal -anthonypjshaw, dimpase, miss-islington, ned.deily, ronaldoussoren, wordtech versions: -Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:12:04 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:12:04 +0000 Subject: [issue13703] Hash collision security issue In-Reply-To: <1325619410.45.0.862265945379.issue13703@psf.upfronthosting.co.za> Message-ID: <1636027924.93.0.287761815081.issue13703@roundup.psfhosted.org> Ahmed Sayeed added the comment: In collect_register() function of arc-linux-tdep.c, the "eret" http://www-look-4.com/travel/london/ (exception return) register value is not being reported correctly. Background: https://komiya-dental.com/shopping/buy-android/ When asked for the "pc" value, we have to update the "eret" register with GDB's STOP_PC. The "eret" instructs the kernel code where to jump back http://www.iu-bloomington.com/shopping/hatchback-cars/ when an instruction has stopped due to a breakpoint. This is how collect_register() is doing so: https://waytowhatsnext.com/shopping/xbox-release-date/ --------------8<-------------- if (regnum == gdbarch_pc_regnum (gdbarch)) http://www.wearelondonmade.com/travel/london/ regnum = ARC_ERET_REGNUM; regcache->raw_collect (regnum, buf + arc_linux_core_reg_offsets[regnum]); -------------->8-------------- http://www.jopspeech.com/travel/london/ Root cause: Although this is using the correct offset (ERET register's), it is also http://joerg.li/travel/london/ changing the REGNUM itself. Therefore, raw_collect (regnum, ...) is not reading from "pc" anymore. http://connstr.net/travel/london/ Consequence: This bug affects the "native ARC gdb" badly and causes kernel code to jump to addresses after the breakpoint and not executing the "breakpoint"ed http://embermanchester.uk/travel/london/ instructions at all. That "native ARC gdb" feature is not upstream yet and is in review at the time of writing [1]. http://www.slipstone.co.uk/travel/london/ In collect_register() function of arc-linux-tdep.c, the "eret" (exception return) register value is not being reported correctly. http://www.logoarts.co.uk/travel/london/ Background: When asked for the "pc" value, we have to update the "eret" register with GDB's STOP_PC. http://www.acpirateradio.co.uk/travel/good/ The "eret" instructs the kernel code where to jump back when an instruction has stopped due to a breakpoint. This is how collect_register() is doing so: http://www.compilatori.com/travel/london/ --------------8<-------------- if (regnum == gdbarch_pc_regnum (gdbarch)) regnum = ARC_ERET_REGNUM; regcache->raw_collect (regnum, buf + arc_linux_core_reg_offsets[regnum]); -------------->8-------------- Root cause: https://www.webb-dev.co.uk/shopping/shopping-during-corona/ Although this is using the correct offset (ERET register's), it is also changing the REGNUM itself. Therefore, raw_collect (regnum, ...) is not reading from "pc" anymore. Consequence: This bug affects the "native ARC gdb" badly and causes kernel code to jump to addresses after the breakpoint and not executing the "breakpoint"ed instructions at all. That "native ARC gdb" feature is not upstream yet and is in review at the time of writing [1]. ---------- components: +Argument Clinic -Interpreter Core nosy: +ahmedsayeed1982, larry -Arach, Arfrever, Huzaifa.Sidhpurwala, Jim.Jewett, Mark.Shannon, PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, christian.heimes, cvrebert, dmalcolm, eric.araujo, eric.snow, fx5, georg.brandl, grahamd, gregory.p.smith, gvanrossum, gz, jcea, jsvaughan, lemburg, loewis, mark.dickinson, neologix, pitrou, python-dev, roger.serwy, skorgu, skrah, terry.reedy, tim.peters, v+python, vstinner, zbysz versions: +Python 3.11 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:12:43 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:12:43 +0000 Subject: [issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request In-Reply-To: <1329140734.41.0.0376676358855.issue14001@psf.upfronthosting.co.za> Message-ID: <1636027963.53.0.678115316896.issue14001@roundup.psfhosted.org> Ahmed Sayeed added the comment: The glibc regular expression code mishandles regular expressions such as: .*((.)\2){2}$ https://www.webb-dev.co.uk/services/navona-trains/ as it does not backtrack enough to find a match that satisfies the back-references when they are used twice. http://www.compilatori.com/computers/latest-car-deals/ To reproduce the problem, compile and run the attached file backrefbug.c. It will exit with status 2, whereas the correct exit status is 0. http://www.acpirateradio.co.uk/computers/latest-car-deals/ This bug was originally reported against GNU 'grep' here: The glibc regular expression code mishandles regular expressions such as: .*((.)\2){2}$ http://www.logoarts.co.uk/computers/latest-car-deals/ as it does not backtrack enough to find a match that satisfies the back-references when they are used twice. To reproduce the problem, compile and run the attached file backrefbug.c. It will exit with status 2, whereas the correct exit status is 0. http://www.slipstone.co.uk/computers/latest-car-deals/ This bug was originally reported against GNU 'grep' here: The glibc regular expression code mishandles regular expressions such as: http://embermanchester.uk/computers/latest-car-deals/ .*((.)\2){2}$ as it does not backtrack enough to find a match that satisfies the back-references when they are used twice. http://connstr.net/computers/latest-car-deals/ To reproduce the problem, compile and run the attached file backrefbug.c. It will exit with status 2, whereas the correct exit status is 0. http://joerg.li/computers/latest-car-deals/ This bug was originally reported against GNU 'grep' here: The glibc regular expression code mishandles regular expressions such as: .*((.)\2){2}$ http://www.jopspeech.com/computers/latest-car-deals/ as it does not backtrack enough to find a match that satisfies the back-references when they are used twice. http://www.wearelondonmade.com/computers/latest-car-deals/ To reproduce the problem, compile and run the attached file backrefbug.c. It will exit with status 2, whereas the correct exit status is 0. https://waytowhatsnext.com/crypto/crypto-world/ This bug was originally reported against GNU 'grep' here: The glibc regular expression code mishandles regular expressions such as: http://www.iu-bloomington.com/crypto/latest-coins/ .*((.)\2){2}$ as it does not backtrack enough to find a match that satisfies the back-references when they are used twice. https://komiya-dental.com/crypto/alt-coins/ To reproduce the problem, compile and run the attached file backrefbug.c. It will exit with status 2, whereas the correct exit status is 0. http://www-look-4.com/computers/latest-car-deals/ This bug was originally reported against GNU 'grep' here: ---------- components: +email -Library (Lib), XML nosy: +ahmedsayeed1982, barry, r.david.murray -Arfrever, dmalcolm, ezio.melotti, flox, iankko, loewis, neologix, orsenthil, pitrou, python-dev, rosslagerwall, schmir versions: -Python 2.6, Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:12:54 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:12:54 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1636027974.3.0.128187323982.issue18458@roundup.psfhosted.org> Ahmed Sayeed added the comment: "The strncat() function shall append not more than n bytes (a null byte and bytes that follow it are not appended) from the array pointed to by s2 to the end of the string pointed to by s1." http://www-look-4.com/category/technology/ The wording imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), https://komiya-dental.com/health/healthy-foods/ and both source and destination do not overlap (overlapping depends on the source and destination layout, not on the "n" value) http://www.iu-bloomington.com/computers/invisible-with-vpn/ However, it seems that the optimized strncat version of the GLIBC behaves incorrectly, when using this value. https://waytowhatsnext.com/sports/navona/ "The strncat() function shall append not more than n bytes (a null byte and bytes that follow it are not appended) from the array pointed to by s2 to the end of the string pointed to by s1." https://www.webb-dev.co.uk/sports/sports-and-health/ The wording imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both source and destination http://www.wearelondonmade.com/category/tech/ do not overlap (overlapping depends on the source and destination layout, not on the "n" value) However, it seems that the optimized strncat version of the GLIBC behaves incorrectly, when using this value. http://www.jopspeech.com/category/technology/ "The strncat() function shall append not more than n bytes (a null byte and bytes that follow it are not appended) from the array pointed to by s2 to the end of the string pointed to by s1." http://joerg.li/category/technology/ The wording imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both source and destination do not http://connstr.net/category/technology/ overlap (overlapping depends on the source and destination layout, not on the "n" value) However, it seems that the optimized strncat version of the GLIBC behaves incorrectly, when using this value. http://embermanchester.uk/category/technology/ "The strncat() function shall append not more than n bytes (a null byte and bytes that follow it are not appended) from the array pointed to by s2 to the end of the string pointed to by s1." http://www.slipstone.co.uk/category/technology/ The wording imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both source and destination do not overlap http://www.logoarts.co.uk/category/technology/ (overlapping depends on the source and destination layout, not on the "n" value) However, it seems that the optimized strncat version of the GLIBC behaves incorrectly, when using this value. http://www.acpirateradio.co.uk/category/technology/ "The strncat() function shall append not more than n bytes (a null byte and bytes that follow it are not appended) from the array pointed to by s2 to the end of the string pointed to by s1." http://www.compilatori.com/category/technology/ The wording imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both source and destination do not overlap (overlapping depends on the source and destination layout, not on the "n" value) However, it seems that the optimized strncat version of the GLIBC behaves incorrectly, when using this value. ---------- components: +email nosy: +ahmedsayeed1982 -Etienne Le Sueur, Russell.Jurney, jcea, mkleehammer, mrichman, ned.deily, nneonneo, python-dev, ronaldoussoren versions: +Python 3.11 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:13:08 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:13:08 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1636027988.96.0.140885513671.issue26903@roundup.psfhosted.org> Ahmed Sayeed added the comment: imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both source and https://www.webb-dev.co.uk/computers/what-is-ssl-certificate/ destination do not overlap (overlapping depends on the source and destination layout imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not http://www.compilatori.com/category/tech/ implicitly SIZE_MAX), and both source and destination do not overlap (overlapping depends on the source and destination layout imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not http://www.acpirateradio.co.uk/category/services/ implicitly SIZE_MAX), and both source and destination do not overlap (overlapping depends on the source and destination layout imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not http://www.logoarts.co.uk/category/property/ implicitly SIZE_MAX), and both source and destination do not overlap (overlapping depends on the source and destination layout imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination http://www.slipstone.co.uk/category/computers/ buffer is not implicitly SIZE_MAX), and both source and destination do not overlap (overlapping depends on the source and destination layout imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both source and destination do not overlap (overlapping http://embermanchester.uk/ depends on the source and destination layout imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both source and destination do http://connstr.net/ not overlap (overlapping depends on the source and destination layout imply that the third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and both http://joerg.li/ source and destination do not overlap (overlapping depends on the source and destination layout imply that the third "n" http://www.jopspeech.com/ argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and http://www.wearelondonmade.com/ both source and destination do not overlap (overlapping depends on the source and destination layout imply that the https://waytowhatsnext.com/computers/what-is-ssl-certificate/ third "n" argument is an additional boundary limit, not the destination buffer capacity (ie. the destination buffer is not implicitly SIZE_MAX), and http://www.iu-bloomington.com/shopping/safety-for-online-shopping/ both source and destination do not overlap (overlapping depends on the source and destination layout boundary limit, not the destination buffer capacity (ie. the destination buffer https://komiya-dental.com/crypto/bought-house-with-bitcoin/ is not implicitly SIZE_MAX), and both source and destination do not overlap (overlapping depends on the source and destination layout boundary limit, not the destination buffer capacity http://www-look-4.com/ (ie. the destination buffer is not implicitly SIZE_MAX), and both source and destination do not overlap (overlapping depends on the source and destination layout ---------- components: +Cross-Build -Windows nosy: +Alex.Willmer, ahmedsayeed1982 -Mike Hommey, Ray Donnelly, bquinlan, davin, diogocp, ned.deily, paul.moore, rbcollins, sbt, steve.dower, terry.reedy, tim.golden, tim.peters, zach.ware versions: +Python 3.6 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:15:02 2021 From: report at bugs.python.org (Ahmed Sayeed) Date: Thu, 04 Nov 2021 12:15:02 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1636028102.19.0.881391297161.issue28124@roundup.psfhosted.org> Ahmed Sayeed added the comment: * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.compilatori.com/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.wearelondonmade.com/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.jopspeech.com/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://joerg.li/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://connstr.net/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://embermanchester.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.slipstone.co.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.logoarts.co.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.acpirateradio.co.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). https://waytowhatsnext.com/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). https://www.webb-dev.co.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.iu-bloomington.com/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www-look-4.com/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). https://komiya-dental.com/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). https://www.arborconsult.space/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://fishingnewsletters.co.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.go-mk-websites.co.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://www.mconstantine.co.uk/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). http://the-hunters.org/ * ssl.create_default_context() is the best way to create a SSLContext. Mention that purpose flags and that Purpose.SERVER_AUTH is the correct setting on the client side. It means: "Create a context to authenticate the certs of a TLS server." (correct also for ftp, imap, ldap, smtp and so on). ---------- components: +Build -Documentation, SSL nosy: +ahmedsayeed1982 -cheryl.sabella, christian.heimes, docs at python, miss-islington versions: -Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:17:04 2021 From: report at bugs.python.org (Andreas Ley) Date: Thu, 04 Nov 2021 12:17:04 +0000 Subject: [issue45712] so it not allowed Message-ID: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> New submission from Andreas Ley : https://docs.python.org/3.11/tutorial/controlflow.html (and earlier versions) have the sentence: An unpacking like **rest is also supported. (But **_ would be redundant, so it not allowed.) Although I'm not a native speaker, I suppose this is missing a verb and should read: ? so it is not allowed ---------- assignee: docs at python components: Documentation messages: 405714 nosy: Andy, docs at python priority: normal severity: normal status: open title: so it not allowed versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:22:44 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 04 Nov 2021 12:22:44 +0000 Subject: [issue45712] Typo in "control flow" documentation In-Reply-To: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> Message-ID: <1636028564.09.0.452830074412.issue45712@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: so it not allowed -> Typo in "control flow" documentation type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:35:05 2021 From: report at bugs.python.org (Sebastian Rittau) Date: Thu, 04 Nov 2021 12:35:05 +0000 Subject: [issue21436] Consider leaving importlib.abc.Loader.load_module() In-Reply-To: <1399291208.69.0.802643633069.issue21436@psf.upfronthosting.co.za> Message-ID: <1636029305.64.0.962215890695.issue21436@roundup.psfhosted.org> Sebastian Rittau added the comment: I would ask you to reconsider this. https://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path/67692#67692 is a highly active question on StackOverflow, and my answer basically provided me all the karma I got there. For users that don't have intimate insight in how importlib works, the code posted by Brett is completely non-obvious and I believe that a convenience method would be very useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 08:55:24 2021 From: report at bugs.python.org (Andrew Ushakov) Date: Thu, 04 Nov 2021 12:55:24 +0000 Subject: [issue40740] Missing api-ms-win-core-path-l1-1.0.dll for python-3.9.0b1-amd64.exe Under Win7 In-Reply-To: <1590225113.89.0.949676590632.issue40740@roundup.psfhosted.org> Message-ID: <1636030524.62.0.667053821394.issue40740@roundup.psfhosted.org> Andrew Ushakov added the comment: Is the missed api-ms-win-core-path-l1-1.0.dll library the only reason of the Python 3.9 and 3.10 incompatibility with Windows 7? I am asking because I just found replacement of this dll, compatible with Windows 7: https://github.com/nalexandru/api-ms-win-core-path-HACK, which allows to use Blender (with embedded Python 3.9) in Windows 7 environment. Then I copied installation of Python 3.10 64-bit from Windows 10 to Windows 7, mentioned above DLL to the root sub-directory of Python 3.10 and was able to run Python. So my question is: is it possible to modify just a Windows installer to allow installation to Windows 7? With warning, additional question, etc.? Thank you in advance. --- Andrew ---------- nosy: +Andrew Ushakov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:24:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 04 Nov 2021 13:24:54 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636032294.1.0.0377375062796.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +27660 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29404 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:38:37 2021 From: report at bugs.python.org (vamsi kalapala) Date: Thu, 04 Nov 2021 13:38:37 +0000 Subject: [issue45713] gcc warning when compiling Modules/expat/xmltok_ns.c Message-ID: <1636033117.93.0.543536023335.issue45713@roundup.psfhosted.org> New submission from vamsi kalapala : The code that triggers the compiler warning is: NS(findEncoding)(const ENCODING *enc, const char *ptr, const char *end) { # define ENCODING_MAX 128 char buf[ENCODING_MAX]; /// <==== THIS GIVES A WARNING. // THE FIX IS ====> char buf[ENCODING_MAX] = ""; char *p = buf; int i; XmlUtf8Convert(enc, &ptr, end, &p, p + ENCODING_MAX - 1); if (ptr != end) return 0; *p = 0; if (streqci(buf, KW_UTF_16) && enc->minBytesPerChar == 2) return enc; i = getEncodingIndex(buf); if (i == UNKNOWN_ENC) return 0; return NS(encodings)[i]; } ---------- messages: 405717 nosy: vamsi1281977 priority: normal severity: normal status: open title: gcc warning when compiling Modules/expat/xmltok_ns.c type: compile error versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:54:46 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 13:54:46 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1636034086.69.0.0206590255386.issue26903@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:56:41 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 13:56:41 +0000 Subject: [issue26903] ProcessPoolExecutor(max_workers=64) crashes on Windows In-Reply-To: <1462135538.41.0.857077084248.issue26903@psf.upfronthosting.co.za> Message-ID: <1636034201.52.0.0564609803769.issue26903@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -Alex.Willmer, ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:58:10 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 13:58:10 +0000 Subject: [issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1636034290.1.0.713842321307.issue39573@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 09:58:23 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 13:58:23 +0000 Subject: [issue39573] [C API] Avoid accessing PyObject and PyVarObject members directly: add Py_SET_TYPE() and Py_IS_TYPE(), disallow Py_TYPE(obj)=type In-Reply-To: <1581030432.16.0.48160379721.issue39573@roundup.psfhosted.org> Message-ID: <1636034303.43.0.730748315535.issue39573@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:01:03 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:01:03 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1636034463.94.0.14872186097.issue17239@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: +Arfrever, barry, benjamin.peterson, christian.heimes, eli.bendersky, ezio.melotti, franck, georg.brandl, jwilk, larry, martin.panter, mcepl, mitar, ned.deily, pitrou, rhettinger, rsandwick3, scoder, serhiy.storchaka, steve.dower, vstinner -ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:01:30 2021 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 04 Nov 2021 14:01:30 +0000 Subject: [issue45714] test_multiprocessing_spawn hangs sometimes Message-ID: <1636034490.33.0.255156135487.issue45714@roundup.psfhosted.org> New submission from Skip Montanaro : I find that test_multiprocessing_spawn frequently hangs. Hitting Ctl-C then rerunning "make test" generally works. Still, this behavior makes it problematic to run testing unattended. I don't think I have an unusual environment (XUbuntu 20.04, GCC 9.3.0). Here's some output from the currently running/hanging process, just after the last other unit test completed. 0:03:42 load avg: 4.96 [421/422/21] test_concurrent_futures passed (2 min 57 sec) -- running: test_multiprocessing_spawn (2 min 59 sec) 0:04:12 load avg: 3.19 running: test_multiprocessing_spawn (3 min 29 sec) 0:04:42 load avg: 1.93 running: test_multiprocessing_spawn (3 min 59 sec) 0:05:12 load avg: 1.23 running: test_multiprocessing_spawn (4 min 29 sec) 0:05:42 load avg: 0.74 running: test_multiprocessing_spawn (4 min 59 sec) ... 0:22:12 load avg: 0.42 running: test_multiprocessing_spawn (21 min 29 sec) 0:22:42 load avg: 0.27 running: test_multiprocessing_spawn (21 min 59 sec) 0:23:12 load avg: 0.37 running: test_multiprocessing_spawn (22 min 29 sec) I'm currerntly mostly messing around with the nogil code and 3.9 tip, but I've noticed this problem on other branches as well. The fact that this seems not to have been reported before suggests that I'm somehow an outlier. If it was common, my guess is that the buildbots would experience this problem on a regular basis. Here is the current python process info (output of pgrep -fla python). 1572195 /home/skip/src/python/cpython/python -u -W default -bb -E -m test -r -w -j 0 -u all,-largefile,-audio,-gui 1575193 /home/skip/src/python/cpython/python -bb -E -Wdefault -u -m test.regrtest --worker-args [{"testdir": null, "verbose": 0, "quiet": false, "exclude": false, "single": false, "randomize": true, "fromfile": null, "findleaks": 1, "use_resources": ["curses", "network", "decimal", "cpu", "subprocess", "urlfetch"], "trace": false, "coverdir": "coverage", "runleaks": false, "huntrleaks": false, "verbose2": true, "print_slow": false, "random_seed": 2495022, "use_mp": 10, "verbose3": false, "forever": false, "header": false, "failfast": false, "match_tests": null, "ignore_tests": null, "pgo": false, "timeout": null, "wait": false, "worker_args": null, "start": null, "match_filename": null, "ignore_filename": null, "use": [["all", "-largefile", "-audio", "-gui"]], "memlimit": null, "threshold": null, "nowindows": false, "list_tests": false, "list_cases": false, "pgo_extended": false, "fail_env_changed": false, "xmlpath": null, "tempdir": "/home/skip/src/python/cpython/build/test_python_1572195", "cleanup": false, "args": []}, "test_multiprocessing_spawn"] 1575489 /home/skip/src/python/cpython/python -bb -E -Wdefault -c from multiprocessing.resource_tracker import main;main(3) 1575547 /home/skip/src/python/cpython/python -bb -E -Wdefault -c from multiprocessing.forkserver import main; main(6, 7, ['__main__', 'test.test_multiprocessing_forkserver'], **{'sys_path': ['/home/skip/src/python/cpython', '/home/skip/tmp/nogilpgo_build/lib/python39.zip', '/home/skip/src/python/cpython/Lib', '/home/skip/src/python/cpython/build/lib.linux-x86_64-3.9', '/home/skip/.local/lib/python3.9/site-packages', '/home/skip/tmp/nogilpgo_build/lib/python3.9/site-packages']}) 1589033 /home/skip/src/python/cpython/python -bb -E -Wdefault -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=4, pipe_handle=12) --multiprocessing-fork 1589034 /home/skip/src/python/cpython/python -bb -E -Wdefault -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=4, pipe_handle=14) --multiprocessing-fork At the moment I can't pstack either of the last two processes. Unfortunately, I think I need to tweak ptrace.conf and reboot. ---------- messages: 405718 nosy: skip.montanaro priority: normal severity: normal status: open title: test_multiprocessing_spawn hangs sometimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:02:21 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:02:21 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1636034541.86.0.523844366702.issue17239@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:01:59 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:01:59 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1636034519.4.0.19244971871.issue17239@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:08:01 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:08:01 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1636034881.6.0.160382733063.issue17239@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Library (Lib), XML versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:12:47 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:12:47 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1636035167.52.0.536126423373.issue7673@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:12:54 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:12:54 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1636035174.16.0.490294650025.issue7673@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:13:57 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:13:57 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1636035237.88.0.49691213997.issue27863@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405690 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:14:05 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:14:05 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1636035245.4.0.221750042585.issue27863@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:14:59 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:14:59 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1636035299.65.0.778187667711.issue1635741@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:16:35 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:16:35 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1636035395.67.0.503985877895.issue1635741@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- assignee: docs at python -> components: +Interpreter Core, Subinterpreters -Documentation nosy: +erlendaasland -ahmedsayeed1982, docs at python versions: +Python 3.10 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:17:12 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:17:12 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1636035432.66.0.903071408706.issue38605@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: +AlexWaygood, Anthony Sottile, BTaskaya, barry, brett.cannon, eric.smith, gousaiyang, gvanrossum, levkivskyi, lukasz.langa, methane, miss-islington, pablogsal, serhiy.storchaka, steven.daprano, terry.reedy, veky -ahmedsayeed1982, ezio.melotti, vstinner versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:17:21 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:17:21 +0000 Subject: [issue1635741] Py_Finalize() doesn't clear all Python objects at exit Message-ID: <1636035441.86.0.532299366838.issue1635741@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +Jim Fasarakis-Hilliard, TCsaba, amaury.forgeotdarc, christian.heimes, corona10, eric.snow, h-vetinari, isoschiz, koubaa, kylotan, lukasz.langa, miss-islington, orsenthil, pconnell, petr.viktorin, phsilva, python-dev, santoso.wijaya, serhiy.storchaka, shihai1991, tlesher, vstinner, ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:17:28 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:17:28 +0000 Subject: [issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.11 In-Reply-To: <1572192430.43.0.755831692199.issue38605@roundup.psfhosted.org> Message-ID: <1636035448.01.0.127998725508.issue38605@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:18:35 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:18:35 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1636035515.13.0.000745228410839.issue28124@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:18:56 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:18:56 +0000 Subject: [issue3262] re.split doesn't split with zero-width regex In-Reply-To: <1215036469.9.0.581701421463.issue3262@psf.upfronthosting.co.za> Message-ID: <1636035536.72.0.635493913553.issue3262@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:19:04 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:19:04 +0000 Subject: [issue3262] re.split doesn't split with zero-width regex In-Reply-To: <1215036469.9.0.581701421463.issue3262@psf.upfronthosting.co.za> Message-ID: <1636035544.52.0.29565075147.issue3262@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:20:15 2021 From: report at bugs.python.org (Paul Moore) Date: Thu, 04 Nov 2021 14:20:15 +0000 Subject: [issue40740] Missing api-ms-win-core-path-l1-1.0.dll for python-3.9.0b1-amd64.exe Under Win7 In-Reply-To: <1590225113.89.0.949676590632.issue40740@roundup.psfhosted.org> Message-ID: <1636035615.93.0.39806007631.issue40740@roundup.psfhosted.org> Paul Moore added the comment: Well, we don't support doing that - so I'm not sure what you want beyond the statement "it's not supported". If it works for you, then by all means use it, but you'll be on your own for any issues you encounter unless you can reproduce them in a "normal" supported installation. And I assume it goes without saying, don't do this in a production environment :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:20:39 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:20:39 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1636035639.19.0.442004779491.issue28124@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- assignee: docs at python -> components: +Documentation, SSL -Build nosy: +cheryl.sabella, christian.heimes, docs at python, miss-islington -ahmedsayeed1982 versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:21:03 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:21:03 +0000 Subject: [issue27773] Excessive Py_XDECREF in the ssl module: In-Reply-To: <1471323217.11.0.35836445166.issue27773@psf.upfronthosting.co.za> Message-ID: <1636035663.23.0.658812865847.issue27773@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -ahmedsayeed1982, lys.nikolaou, pablogsal versions: +Python 3.6 -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:21:14 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:21:14 +0000 Subject: [issue27773] Excessive Py_XDECREF in the ssl module: In-Reply-To: <1471323217.11.0.35836445166.issue27773@psf.upfronthosting.co.za> Message-ID: <1636035674.02.0.840530603203.issue27773@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:21:37 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:21:37 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1636035697.52.0.0720702457898.issue34956@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:23:12 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:23:12 +0000 Subject: [issue34956] _tkinter built on macOS 10.14 does not link to Tcl and Tk in /Library/Frameworks In-Reply-To: <1539228548.05.0.788709270274.issue34956@psf.upfronthosting.co.za> Message-ID: <1636035792.25.0.409683978041.issue34956@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- components: +macOS -Parser nosy: +anthonypjshaw, dimpase, miss-islington, ned.deily, ronaldoussoren, wordtech -ahmedsayeed1982, lys.nikolaou, pablogsal versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:23:25 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:23:25 +0000 Subject: [issue38692] add a pidfd child process watcher In-Reply-To: <1572932584.65.0.943486856043.issue38692@roundup.psfhosted.org> Message-ID: <1636035805.9.0.0226895803205.issue38692@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +asyncio -Build nosy: +asvetlov, yselivanov -ahmedsayeed1982 versions: +Python 3.9 -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:23:56 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:23:56 +0000 Subject: [issue38692] add a pidfd child process watcher In-Reply-To: <1572932584.65.0.943486856043.issue38692@roundup.psfhosted.org> Message-ID: <1636035836.82.0.27863160307.issue38692@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:24:20 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:24:20 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1636035860.14.0.601561734422.issue40257@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:25:18 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:25:18 +0000 Subject: [issue39926] unicodedata for Unicode 13.0.0 In-Reply-To: <1583880722.38.0.0788382119247.issue39926@roundup.psfhosted.org> Message-ID: <1636035918.42.0.581211294017.issue39926@roundup.psfhosted.org> Change by Eryk Sun : ---------- nosy: -ahmedsayeed1982, larry versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:25:10 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:25:10 +0000 Subject: [issue40257] Improve the use of __doc__ in pydoc In-Reply-To: <1586638478.83.0.463728061154.issue40257@roundup.psfhosted.org> Message-ID: <1636035910.44.0.428003946634.issue40257@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- components: +Library (Lib) -Interpreter Core nosy: +eamanu, gvanrossum, levkivskyi, lukasz.langa, mark.dickinson, mbussonn, ncoghlan, serhiy.storchaka, tcaswell, terry.reedy, veky, xtreak -ahmedsayeed1982 versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:25:42 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:25:42 +0000 Subject: [issue39926] unicodedata for Unicode 13.0.0 In-Reply-To: <1583880722.38.0.0788382119247.issue39926@roundup.psfhosted.org> Message-ID: <1636035942.05.0.537650931328.issue39926@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:25:29 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:25:29 +0000 Subject: [issue39926] unicodedata for Unicode 13.0.0 In-Reply-To: <1583880722.38.0.0788382119247.issue39926@roundup.psfhosted.org> Message-ID: <1636035929.45.0.941458598868.issue39926@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: -Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:26:29 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:26:29 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1636035989.46.0.677973355142.issue18458@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:27:04 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:27:04 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1636036024.69.0.101876901037.issue12782@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Interpreter Core -IDLE nosy: -ahmedsayeed1982, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:27:18 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:27:18 +0000 Subject: [issue12782] Multiple context expressions do not support parentheses for continuation across lines In-Reply-To: <1313719817.79.0.828403712604.issue12782@psf.upfronthosting.co.za> Message-ID: <1636036038.32.0.670892508503.issue12782@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:27:39 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:27:39 +0000 Subject: [issue18458] interactive interpreter crashes and test_readline fails on OS X 10.9 Mavericks due to libedit update In-Reply-To: <1373891060.78.0.881069869114.issue18458@psf.upfronthosting.co.za> Message-ID: <1636036059.86.0.859195517377.issue18458@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- components: -email nosy: +Etienne Le Sueur, Russell.Jurney, jcea, mkleehammer, mrichman, ned.deily, nneonneo, python-dev, ronaldoussoren -ahmedsayeed1982, barry, r.david.murray versions: -Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:28:16 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:28:16 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1636036096.58.0.952392650537.issue38379@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Interpreter Core -IDLE nosy: -ahmedsayeed1982, terry.reedy versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:28:28 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:28:28 +0000 Subject: [issue38379] finalizer resurrection in gc In-Reply-To: <1570296686.13.0.00730737596554.issue38379@roundup.psfhosted.org> Message-ID: <1636036108.09.0.597472630408.issue38379@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:29:11 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:29:11 +0000 Subject: [issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request In-Reply-To: <1329140734.41.0.0376676358855.issue14001@psf.upfronthosting.co.za> Message-ID: <1636036151.44.0.631305965119.issue14001@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:29:24 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:29:24 +0000 Subject: [issue21082] os.makedirs(exist_ok=True) is not thread-safe: umask is set temporary to 0, serious security problem In-Reply-To: <1395990246.32.0.278092008539.issue21082@psf.upfronthosting.co.za> Message-ID: <1636036164.88.0.0645987588783.issue21082@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Library (Lib) -Subinterpreters nosy: -ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:29:38 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:29:38 +0000 Subject: [issue21082] os.makedirs(exist_ok=True) is not thread-safe: umask is set temporary to 0, serious security problem In-Reply-To: <1395990246.32.0.278092008539.issue21082@psf.upfronthosting.co.za> Message-ID: <1636036178.92.0.573852245202.issue21082@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:29:45 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:29:45 +0000 Subject: [issue14001] CVE-2012-0845 Python v2.7.2 / v3.2.2 (SimpleXMLRPCServer): DoS (excessive CPU usage) by processing malformed XMLRPC / HTTP POST request In-Reply-To: <1329140734.41.0.0376676358855.issue14001@psf.upfronthosting.co.za> Message-ID: <1636036185.52.0.400507271586.issue14001@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- components: +Library (Lib), XML -email nosy: +Arfrever, dmalcolm, ezio.melotti, flox, iankko, loewis, neologix, orsenthil, pitrou, python-dev, rosslagerwall, schmir -ahmedsayeed1982, barry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:30:23 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:30:23 +0000 Subject: [issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True In-Reply-To: <1328301796.8.0.996607861145.issue13936@psf.upfronthosting.co.za> Message-ID: <1636036223.87.0.701953290057.issue13936@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Library (Lib) -Tkinter nosy: -ahmedsayeed1982 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:30:16 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:30:16 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636036216.8.0.429061574564.issue42967@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:30:38 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:30:38 +0000 Subject: [issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True In-Reply-To: <1328301796.8.0.996607861145.issue13936@psf.upfronthosting.co.za> Message-ID: <1636036238.38.0.0329262579574.issue13936@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:31:21 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:31:21 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1636036281.12.0.370343938052.issue28524@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Library (Lib) -Subinterpreters nosy: -ahmedsayeed1982 versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:31:24 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:31:24 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636036284.37.0.111326690002.issue42967@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +AdamGold, eric.araujo, gregory.p.smith, kj, lemburg, mcepl, miss-islington, ned.deily, orsenthil, pablogsal, petr.viktorin, rschiron, serhiy.storchaka, vstinner -ahmedsayeed1982 versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:31:36 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:31:36 +0000 Subject: [issue28524] Set default argument of logging.disable() to logging.CRITICAL In-Reply-To: <1477345510.5.0.68336976066.issue28524@psf.upfronthosting.co.za> Message-ID: <1636036296.71.0.388244709374.issue28524@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:32:27 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:32:27 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1636036347.74.0.696576944924.issue33725@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +macOS -Library (Lib) nosy: +ned.deily, ronaldoussoren -ahmedsayeed1982 versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:32:41 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:32:41 +0000 Subject: [issue33725] Python crashes on macOS after fork with no exec In-Reply-To: <1527814386.62.0.682650639539.issue33725@psf.upfronthosting.co.za> Message-ID: <1636036361.06.0.467280953782.issue33725@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:32:42 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:32:42 +0000 Subject: [issue13703] Hash collision security issue In-Reply-To: <1325619410.45.0.862265945379.issue13703@psf.upfronthosting.co.za> Message-ID: <1636036362.05.0.967601517249.issue13703@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:33:14 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:33:14 +0000 Subject: [issue13703] Hash collision security issue In-Reply-To: <1325619410.45.0.862265945379.issue13703@psf.upfronthosting.co.za> Message-ID: <1636036394.93.0.329811303516.issue13703@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- components: +Interpreter Core -Argument Clinic nosy: +Arach, Arfrever, Huzaifa.Sidhpurwala, Jim.Jewett, Mark.Shannon, PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, christian.heimes, cvrebert, dmalcolm, eric.araujo, eric.snow, fx5, georg.brandl, grahamd, gregory.p.smith, gvanrossum, gz, jcea, jsvaughan, lemburg, loewis, mark.dickinson, neologix, pitrou, python-dev, roger.serwy, skorgu, skrah, terry.reedy, tim.peters, v+python, vstinner, zbysz -ahmedsayeed1982, larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:33:37 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:33:37 +0000 Subject: [issue17482] functools.update_wrapper mishandles __wrapped__ In-Reply-To: <1363714542.8.0.838364934538.issue17482@psf.upfronthosting.co.za> Message-ID: <1636036417.36.0.586383372578.issue17482@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: -IO nosy: -ahmedsayeed1982 versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:33:52 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:33:52 +0000 Subject: [issue12419] Add ident parameter to SysLogHandler In-Reply-To: <1309177677.59.0.756868126424.issue12419@psf.upfronthosting.co.za> Message-ID: <1636036432.42.0.250082363264.issue12419@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- Removed message: https://bugs.python.org/msg405705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:33:49 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:33:49 +0000 Subject: [issue17482] functools.update_wrapper mishandles __wrapped__ In-Reply-To: <1363714542.8.0.838364934538.issue17482@psf.upfronthosting.co.za> Message-ID: <1636036429.42.0.776035925926.issue17482@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:34:22 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:34:22 +0000 Subject: [issue12419] Add ident parameter to SysLogHandler In-Reply-To: <1309177677.59.0.756868126424.issue12419@psf.upfronthosting.co.za> Message-ID: <1636036462.81.0.229246543887.issue12419@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- components: +Library (Lib) -Installation nosy: +flub, python-dev, vinay.sajip -ahmedsayeed1982 versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:34:37 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:34:37 +0000 Subject: [issue12168] SysLogHandler incorrectly appends \000 to messages In-Reply-To: <1306237453.36.0.871696790191.issue12168@psf.upfronthosting.co.za> Message-ID: <1636036477.18.0.494913481186.issue12168@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Library (Lib) -Regular Expressions nosy: -ahmedsayeed1982, ezio.melotti, mrabarnett versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:34:50 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 14:34:50 +0000 Subject: [issue12168] SysLogHandler incorrectly appends \000 to messages In-Reply-To: <1306237453.36.0.871696790191.issue12168@psf.upfronthosting.co.za> Message-ID: <1636036490.71.0.635096658671.issue12168@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg405704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:40:53 2021 From: report at bugs.python.org (Marc Culler) Date: Thu, 04 Nov 2021 14:40:53 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1636036853.57.0.555235784271.issue44828@roundup.psfhosted.org> Marc Culler added the comment: Where do you think that "feature" is documented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:47:40 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 04 Nov 2021 14:47:40 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636037260.38.0.798960704482.issue42967@roundup.psfhosted.org> ?ric Araujo added the comment: erlandaasland you?ve been editing closed issues today (got messages from at least 2). maybe submitting old browser tabs with obsolete form data? ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:53:51 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 14:53:51 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636037631.48.0.768975842072.issue42967@roundup.psfhosted.org> Erlend E. Aasland added the comment: Yes, cleaning up ahmedsayeed1982 spam. I did my best to revert the nosy list, component, versions, and assigned to changes. What did I mess up? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 10:53:44 2021 From: report at bugs.python.org (Marc Culler) Date: Thu, 04 Nov 2021 14:53:44 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1636037624.29.0.205351791084.issue44828@roundup.psfhosted.org> Marc Culler added the comment: According to wikipedia, it was only the Big Sur beta that identified itself as 10.16. (And I observed this with the beta). But the release and, I think, the later Big Sur betas stopped doing that. But I did eventually find a page showing a tweet that "documents" this behavior: https://eclecticlight.co/2020/07/21/big-sur-is-both-10-16-and-11-0-its-official/ I guess obscure tweets have replaced documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:01:03 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 04 Nov 2021 15:01:03 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636038063.33.0.368548615273.issue42967@roundup.psfhosted.org> Erlend E. Aasland added the comment: See bpo-12168 for a similar cleanup by Eryk Sun. There was approx. 20 spammed issues. Eryk fixed most of them; I did a couple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:00:58 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Nov 2021 15:00:58 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636038058.44.0.158747105067.issue45708@roundup.psfhosted.org> Raymond Hettinger added the comment: Tim, do you have any thoughts on whether Decimal should extend beyond the specification in this case? ---------- assignee: -> rhettinger nosy: +rhettinger, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:31:24 2021 From: report at bugs.python.org (Jacek) Date: Thu, 04 Nov 2021 15:31:24 +0000 Subject: [issue45715] round(2500, -3) Message-ID: <1636039884.59.0.199110305946.issue45715@roundup.psfhosted.org> New submission from Jacek : round(2500, -3) returns 2000 instead of 3000. I have checked it on 3.7.4 and 3.6.9. ---------- components: Library (Lib) messages: 405726 nosy: jacekblaz priority: normal severity: normal status: open title: round(2500, -3) type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:35:57 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 04 Nov 2021 15:35:57 +0000 Subject: [issue13703] Hash collision security issue In-Reply-To: <1636036394.95.0.61671405981.issue13703@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Hey Erlend, why did you add so many people to the nosy list of this old issue? On Thu, Nov 4, 2021 at 07:33 Erlend E. Aasland wrote: > > Change by Erlend E. Aasland : > > > ---------- > components: +Interpreter Core -Argument Clinic > nosy: +Arach, Arfrever, Huzaifa.Sidhpurwala, Jim.Jewett, Mark.Shannon, > PaulMcMillan, Zhiping.Deng, alex, barry, benjamin.peterson, > christian.heimes, cvrebert, dmalcolm, eric.araujo, eric.snow, fx5, > georg.brandl, grahamd, gregory.p.smith, gvanrossum, gz, jcea, jsvaughan, > lemburg, loewis, mark.dickinson, neologix, pitrou, python-dev, roger.serwy, > skorgu, skrah, terry.reedy, tim.peters, v+python, vstinner, zbysz > -ahmedsayeed1982, larry > > _______________________________________ > Python tracker > > _______________________________________ > -- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:42:23 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 04 Nov 2021 15:42:23 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636040543.31.0.846574832621.issue42967@roundup.psfhosted.org> ?ric Araujo added the comment: See the changelog entry for 2021-11-04 10:31:24 (and the other ticket where Guido just commented) (and thanks for cleaning spam!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:48:10 2021 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 04 Nov 2021 15:48:10 +0000 Subject: [issue45714] test_multiprocessing_spawn hangs sometimes In-Reply-To: <1636034490.33.0.255156135487.issue45714@roundup.psfhosted.org> Message-ID: <1636040890.32.0.296287604914.issue45714@roundup.psfhosted.org> Skip Montanaro added the comment: Took me a while to notice the -i flag to regrtest.py. I think that solves my particular problem, so I will close this. Is there a place to see how 'make test' is run on the buildbots? ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:52:35 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Nov 2021 15:52:35 +0000 Subject: [issue45651] -X frozen_modules not defaulting to "off" on Windows when running in source tree? In-Reply-To: <1635440975.82.0.890486444721.issue45651@roundup.psfhosted.org> Message-ID: <1636041155.32.0.939474253311.issue45651@roundup.psfhosted.org> Eric Snow added the comment: maybe related: https://github.com/python/cpython/pull/29041#discussion_r734085599 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 11:58:05 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 04 Nov 2021 15:58:05 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1635985499.81.0.118940389717.issue45582@roundup.psfhosted.org> Message-ID: Eric Snow added the comment: On Wed, Nov 3, 2021 at 6:25 PM Steve Dower wrote: > Now to find out why the old getpath could somehow locate the stdlib but new getpath cannot... (I'm guessing it is finding the "original" stdlib rather than the fresh clone, since AFAICT there's no reference at all to the original source dir) What fresh clone do you mean? test_embed is failing, not test_freeze. So there is no out-of-tree build involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:04:32 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 04 Nov 2021 16:04:32 +0000 Subject: [issue45651] -X frozen_modules not defaulting to "off" on Windows when running in source tree? In-Reply-To: <1635440975.82.0.890486444721.issue45651@roundup.psfhosted.org> Message-ID: <1636041872.73.0.809615500098.issue45651@roundup.psfhosted.org> Guido van Rossum added the comment: Yes, that?s definitely the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:09:23 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 04 Nov 2021 16:09:23 +0000 Subject: [issue45715] round(2500, -3) In-Reply-To: <1636039884.59.0.199110305946.issue45715@roundup.psfhosted.org> Message-ID: <1636042163.42.0.681802601453.issue45715@roundup.psfhosted.org> Dennis Sweeney added the comment: Thanks for the report, but this is the intended behavior. >From https://docs.python.org/3/library/functions.html#round : """values are rounded to the closest multiple of 10 to the power minus ndigits; if two multiples are equally close, rounding is done toward the even choice (so, for example, both round(0.5) and round(-0.5) are 0, and round(1.5) is 2)""" This is called "round-half-to-even" or "Banker's rounding" (see https://en.wikipedia.org/wiki/Rounding#Round_half_to_even) and it's used to prevent the upward bias that would happen if we always rounded halfway points up. ---------- nosy: +Dennis Sweeney resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:33:07 2021 From: report at bugs.python.org (Zack McCauley) Date: Thu, 04 Nov 2021 16:33:07 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1636037624.29.0.205351791084.issue44828@roundup.psfhosted.org> Message-ID: Zack McCauley added the comment: If you use the older methods to detect OSVersion, Monterey will also identify as 10.16. iirc there?s an environment variable to enable or disable that. On Thu, Nov 4, 2021 at 7:54 AM Marc Culler wrote: > > Marc Culler added the comment: > > According to wikipedia, it was only the Big Sur beta that identified > itself as 10.16. (And I observed this with the beta). But the release > and, I think, the later Big Sur betas stopped doing that. > > But I did eventually find a page showing a tweet that "documents" this > behavior: > > https://eclecticlight.co/2020/07/21/big-sur-is-both-10-16-and-11-0-its-official/ > > I guess obscure tweets have replaced documentation. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:39:40 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 16:39:40 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636043980.69.0.480931708226.issue45220@roundup.psfhosted.org> Steve Dower added the comment: New changeset fd0c84dc28d00d68e4f43034dc41786a682390fd by Steve Dower in branch 'main': bpo-45220: Remove invalid include from resource definition files on Windows (GH-29396) https://github.com/python/cpython/commit/fd0c84dc28d00d68e4f43034dc41786a682390fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:39:25 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 16:39:25 +0000 Subject: [issue43652] Upgrade Windows tcl/tk to 8.6.11 In-Reply-To: <1617001631.71.0.115330422511.issue43652@roundup.psfhosted.org> Message-ID: <1636043965.82.0.247405680195.issue43652@roundup.psfhosted.org> Steve Dower added the comment: New changeset 36b4f9e2a7d5ed55c441eb6dfe5c13baa483b9d4 by Steve Dower in branch 'main': bpo-43652: Actually update to Tcl/Tk 8.6.11 on Windows (GH-29397) https://github.com/python/cpython/commit/36b4f9e2a7d5ed55c441eb6dfe5c13baa483b9d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:39:47 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 16:39:47 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636043987.76.0.500761117906.issue45220@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27661 pull_request: https://github.com/python/cpython/pull/29405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:40:30 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 16:40:30 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636044030.9.0.802674583687.issue45220@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27662 pull_request: https://github.com/python/cpython/pull/29406 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 12:44:39 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 16:44:39 +0000 Subject: [issue43652] Upgrade Windows tcl/tk to 8.6.11 In-Reply-To: <1617001631.71.0.115330422511.issue43652@roundup.psfhosted.org> Message-ID: <1636044279.39.0.323299316811.issue43652@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27663 pull_request: https://github.com/python/cpython/pull/29407 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:01:28 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 17:01:28 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636045288.21.0.430554650094.issue45220@roundup.psfhosted.org> miss-islington added the comment: New changeset 1a44d27e6f8a06cb7d56e39be48852f0c3f4502b by Miss Islington (bot) in branch '3.9': bpo-45220: Remove invalid include from resource definition files on Windows (GH-29396) https://github.com/python/cpython/commit/1a44d27e6f8a06cb7d56e39be48852f0c3f4502b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:12:31 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 04 Nov 2021 17:12:31 +0000 Subject: [issue44319] setup openssl failed on linux In-Reply-To: <1622922030.41.0.294175639013.issue44319@roundup.psfhosted.org> Message-ID: <1636045951.71.0.927525691996.issue44319@roundup.psfhosted.org> Christian Heimes added the comment: /usr/lib64/openssl11 is not a valid OpenSSL root directory. The option expects an OpenSSL installation directory with bin, lib, and include subdirectories. The custom scheme from CentOS EPEL openssl11 package is not supported. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:14:58 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 04 Nov 2021 17:14:58 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636046098.38.0.542944287709.issue45708@roundup.psfhosted.org> Mark Dickinson added the comment: > whether Decimal should extend beyond the specification in this case We already go way beyond the original specification for string formatting. The spec doesn't go further than specifying to-scientific-string and to-engineering-string, neither of which even get into limiting precision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:28:05 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 17:28:05 +0000 Subject: [issue43652] Upgrade Windows tcl/tk to 8.6.11 In-Reply-To: <1617001631.71.0.115330422511.issue43652@roundup.psfhosted.org> Message-ID: <1636046885.86.0.783814960026.issue43652@roundup.psfhosted.org> Steve Dower added the comment: New changeset 6340ba7f2c1bef94939dcab0d5babc256ffd7485 by Steve Dower in branch '3.10': bpo-43652: Actually update to Tcl/Tk 8.6.11 on Windows (GH-29397) https://github.com/python/cpython/commit/6340ba7f2c1bef94939dcab0d5babc256ffd7485 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 13:45:49 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Thu, 04 Nov 2021 17:45:49 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument Message-ID: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : A bit of a nitpick, but the following SyntaxError message is a bit confusing: >>> f(True=1) File "", line 1 f(True=1) ^^^^^ SyntaxError: expression cannot contain assignment, perhaps you meant "=="? The problem with that line is not that it contains an assignment, it's almost a valid keyword argument after all. The problem is that the name of the keyword is True, which is no longer a name you can assign to. It would be better to produce the same error as with __debug__: >>> f(__debug__=1) File "", line 1 SyntaxError: cannot assign to __debug__ The latter error message is however produced by the compiler, not the parser I think? ---------- messages: 405741 nosy: Carl.Friedrich.Bolz priority: normal severity: normal status: open title: Confusing parsing error message when trying to use True as keyword argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:05:08 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Nov 2021 18:05:08 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1636049108.21.0.761351323881.issue45582@roundup.psfhosted.org> Steve Dower added the comment: > What fresh clone do you mean? test_embed is failing, not test_freeze. test_freeze is passing, but it shouldn't be able to locate a valid Lib/ directory to load modules from. So it's somehow managing to do it against the "official" logic (none of the searches are going to find `root/python-build/Lib` starting from `root/python-installation/python`). I haven't dug into it yet, but I suspect if the root used for this test is moved outside of the main tree then it will fail again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:36:09 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 04 Nov 2021 18:36:09 +0000 Subject: [issue45710] Junction/symbolic folder access error on Windows 11 In-Reply-To: <1636023477.57.0.826365620965.issue45710@roundup.psfhosted.org> Message-ID: <1636050969.24.0.100293931768.issue45710@roundup.psfhosted.org> Eryk Sun added the comment: It's not completely surprising that attempting to traverse a name-surrogate reparse point under "%UserProfile%\AppData" fails when using the store app. If you can't or won't move the mountpoint up to %UserProfile%, or anywhere else outside of the application-data tree, then I suggest using a regular Python installation from python.org. The error in Windows 11 is ERROR_MOUNT_POINT_NOT_RESOLVED (649), based on the NT status code STATUS_MOUNT_POINT_NOT_RESOLVED. This error status is associated with the kernel routines IoCreateFileSpecifyDeviceObjectHint() [1] and IoCreateFileEx() [2]: IoCreateFileEx returns this status value if the DriverContext parameter is not NULL and if the file or directory name contains a mount point that resolves to a volume other than the one to which the specified device object is attached. This device object is specified by the DeviceObjectHint member of the IO_DRIVER_CREATE_CONTEXT structure. A filter driver can use this feature to open a path on a particular volume or filesystem device (i.e. the device hint) and bypass other filter drivers that are attached to the device stack. However, if path parsing traverses a reparse point to another filesystem, it has to fail with STATUS_MOUNT_POINT_NOT_RESOLVED. Note that a reparse point that targets a path in the same filesystem works fine. For example: >>> path = os.path.join(os.environ['appdata'], 'spam') >>> os.lstat(path).st_reparse_tag == stat.IO_REPARSE_TAG_MOUNT_POINT True >>> os.path.realpath(path) 'C:\\Temp\\spam' >>> os.path.exists(os.path.join(path, 'eggs.py')) True >>> subprocess.call(['python', os.path.join(path, 'eggs.py')]) works fine 0 The case of a cross-device mountpoint or symlink under "%UserProfile%\AppData" also fails when using the store app in Windows 10. However, the error in Windows 10 is ERROR_INVALID_FUNCTION (1), from the status code STATUS_NOT_IMPLEMENTED, so the underlying implementation details must be quite different. I was able to work around the limitation somewhat in Windows 10 (but not Windows 11) by first changing to the mountpoint directory and accessing relative paths. This doesn't work when running a script, however, since the interpreter tries to open the fully-qualified path, which has to traverse the mountpoint or symlink. --- [1 https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/nf-ntddk-iocreatefilespecifydeviceobjecthint [2] https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/nf-ntddk-iocreatefileex. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:40:02 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Nov 2021 18:40:02 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument In-Reply-To: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> Message-ID: <1636051202.2.0.0319694770968.issue45716@roundup.psfhosted.org> Change by Eric V. Smith : ---------- components: +Parser nosy: +lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 14:48:53 2021 From: report at bugs.python.org (Andre Roberge) Date: Thu, 04 Nov 2021 18:48:53 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument In-Reply-To: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> Message-ID: <1636051733.85.0.161122813294.issue45716@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:07:09 2021 From: report at bugs.python.org (Joshua) Date: Thu, 04 Nov 2021 19:07:09 +0000 Subject: [issue45717] Bad link to python docs in help(_hashlib) Message-ID: <1636052829.11.0.396753142278.issue45717@roundup.psfhosted.org> New submission from Joshua : I was attempting to look through hashlib to try and understand more about python's built-in hash functions. As part of this, I ran 'help(_hashlib)' which returns this text: 'MODULE REFERENCE https://docs.python.org/3.11/library/_hashlib.html' This is an invalid link which has been an issue in all versions of the documentation I looked up. As an aside, where would I find the source for _hashlib? ---------- components: Library (Lib) messages: 405744 nosy: Joshuah143 priority: normal severity: normal status: open title: Bad link to python docs in help(_hashlib) type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:28:37 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Nov 2021 19:28:37 +0000 Subject: [issue13703] Hash collision security issue In-Reply-To: <1325619410.45.0.862265945379.issue13703@psf.upfronthosting.co.za> Message-ID: <1636054117.28.0.730668416769.issue13703@roundup.psfhosted.org> Terry J. Reedy added the comment: Because today's spammer, whose message was removed, deleted us all. Restoring the version to 3.3 is not possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:34:21 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 19:34:21 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1636054461.78.0.0376494694631.issue45678@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset effb72fa0f6f8f8ec92687fc6a29d63bbdb7e98d by Alex Waygood in branch '3.9': [3.9] bpo-45678: Fix `singledispatchmethod` `classmethod`/`staticmethod` bug (GH-29394) https://github.com/python/cpython/commit/effb72fa0f6f8f8ec92687fc6a29d63bbdb7e98d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:35:01 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Nov 2021 19:35:01 +0000 Subject: [issue43652] Upgrade Windows tcl/tk to 8.6.11 In-Reply-To: <1617001631.71.0.115330422511.issue43652@roundup.psfhosted.org> Message-ID: <1636054501.5.0.590763420912.issue43652@roundup.psfhosted.org> Terry J. Reedy added the comment: This worked for me on main and 3.10. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 15:39:59 2021 From: report at bugs.python.org (Eric Case) Date: Thu, 04 Nov 2021 19:39:59 +0000 Subject: [issue17305] IDNA2008 encoding is missing In-Reply-To: <1361928766.42.0.728949411958.issue17305@psf.upfronthosting.co.za> Message-ID: <1636054799.78.0.434332402394.issue17305@roundup.psfhosted.org> Change by Eric Case : ---------- nosy: +case _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:09:26 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 04 Nov 2021 20:09:26 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1636056566.5.0.97231106299.issue45678@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +27664 pull_request: https://github.com/python/cpython/pull/29412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:14:24 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 04 Nov 2021 20:14:24 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1636056864.12.0.513379074026.issue45678@roundup.psfhosted.org> Alex Waygood added the comment: Yet more tests were added to the 3.9 branch in PR 29394 in order to test the bugfix. PR 29412 "forward-ports" these new tests into main (and 3.10, if they are backported). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:17:16 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 20:17:16 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636057036.44.0.520526836327.issue45220@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset c0f3281d6ca5c59d4a11698364463d968b9ddd3c by Miss Islington (bot) in branch '3.10': bpo-45220: Remove invalid include from resource definition files on Windows (GH-29396) (GH-29406) https://github.com/python/cpython/commit/c0f3281d6ca5c59d4a11698364463d968b9ddd3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:20:09 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 20:20:09 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636057209.35.0.534706239337.issue30570@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27666 pull_request: https://github.com/python/cpython/pull/29414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:19:58 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 04 Nov 2021 20:19:58 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument In-Reply-To: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> Message-ID: <1636057198.92.0.912192794137.issue45716@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27665 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29413 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:20:25 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 20:20:25 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636057225.49.0.195224187002.issue30570@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 1e29dce1138a39e095ba47ab4c1e445fd08716e2 by Miss Islington (bot) in branch '3.9': bpo-30570: Use Py_EnterRecursiveCall() in issubclass() (GH-29048) (GH-29178) https://github.com/python/cpython/commit/1e29dce1138a39e095ba47ab4c1e445fd08716e2 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:21:32 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 20:21:32 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1636057292.68.0.7293986281.issue44828@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 10b0c671580a2f8dd013b6345c1dc9789d5bd95c by Ned Deily in branch '3.8': bpo-44828: Avoid leaving a zombie Save panel (GH-29372) https://github.com/python/cpython/commit/10b0c671580a2f8dd013b6345c1dc9789d5bd95c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:24:04 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 04 Nov 2021 20:24:04 +0000 Subject: [issue42943] singledispatchmethod should expose registry of all known overloads In-Reply-To: <1610833579.12.0.993134178442.issue42943@roundup.psfhosted.org> Message-ID: <1636057444.29.0.227377287415.issue42943@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood versions: +Python 3.11 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:24:16 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 20:24:16 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636057456.13.0.469083571508.issue30570@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +27667 pull_request: https://github.com/python/cpython/pull/29415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:27:59 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 20:27:59 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636057679.48.0.082207886244.issue27313@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- nosy: +lukasz.langa nosy_count: 3.0 -> 4.0 pull_requests: +27668 pull_request: https://github.com/python/cpython/pull/29411 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:38:51 2021 From: report at bugs.python.org (Mitchell Hentges) Date: Thu, 04 Nov 2021 20:38:51 +0000 Subject: [issue43969] "bad magic number" when Python 2's pyc file exists without py file In-Reply-To: <1619642212.93.0.461785778702.issue43969@roundup.psfhosted.org> Message-ID: <1636058331.39.0.247599015739.issue43969@roundup.psfhosted.org> Mitchell Hentges added the comment: I'm going to close this here - I currently don't have the cycles to push this forward. Besides, this issue only occurs in environments that are using both Python 2 and 3, and as Python 2's EOL date gets further in the past, the severity of this ticket decreases. For future readers, if you need a workaround for this exact problem, it was solved by my team with this import hook: https://hg.mozilla.org/mozilla-central/file/50e4a4e6975a7f828277a2b9c3cc9770a6c94107/build/mach_initialize.py#l630 ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:45:14 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Nov 2021 20:45:14 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636058714.86.0.108292362251.issue30570@roundup.psfhosted.org> miss-islington added the comment: New changeset 1f3ae5c1ca5a8e7696bad414c1de38e0f5f1e2c3 by Miss Islington (bot) in branch '3.10': bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests (GH-29258) https://github.com/python/cpython/commit/1f3ae5c1ca5a8e7696bad414c1de38e0f5f1e2c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:52:38 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 20:52:38 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636059158.84.0.338404517536.issue30570@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset f701237db2611140e578cebbdfef91ae4714af4e by ?ukasz Langa in branch '3.9': [3.9] bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests (GH-29258) (GH-29415) https://github.com/python/cpython/commit/f701237db2611140e578cebbdfef91ae4714af4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 16:53:21 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 20:53:21 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636059201.94.0.909912177016.issue30570@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Dennis! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 17:31:41 2021 From: report at bugs.python.org (felk) Date: Thu, 04 Nov 2021 21:31:41 +0000 Subject: [issue15751] [subinterpreters] Make the PyGILState API compatible with subinterpreters In-Reply-To: <1345526301.75.0.455071650321.issue15751@psf.upfronthosting.co.za> Message-ID: <1636061501.0.0.763196433934.issue15751@roundup.psfhosted.org> Change by felk : ---------- nosy: +felk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:22:39 2021 From: report at bugs.python.org (William Fisher) Date: Thu, 04 Nov 2021 22:22:39 +0000 Subject: [issue45718] asyncio: MultiLoopWatcher has a race condition (Proposed work-around) Message-ID: <1636064559.39.0.358204060297.issue45718@roundup.psfhosted.org> New submission from William Fisher : Summary: asyncio.MultiLoopChildWatcher has two problems that create a race condition. 1. The SIGCHLD signal handler does not guard against interruption/re-entry. 2. The SIGCHLD signal handler can interrupt add_child_handler's `self._do_waitpid(pid)`. This is a continuation of bpo-38323. That issue discussed two bugs. This issue proposes a work-around for one of them that may be useful in making build tests more reliable. I'm reserving discussion to the case of a single asyncio event loop on the main thread. (MultiLoopChildWatcher has a separate "signal-delivery-blocked" problem when used in an event loop that is not in the main thread as mentioned in bpo-38323.) Symptoms: Log messages that look like this: 1634935451.761 WARNING Unknown child process pid 8747, will report returncode 255 ... 1634935451.762 WARNING Child watcher got an unexpected pid: 8747 Traceback (most recent call last): File "/Users/runner/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/asyncio/unix_events.py", line 1306, in _do_waitpid loop, callback, args = self._callbacks.pop(pid) KeyError: 8747 Background: I've been working on a library to make calling asyncio subprocesses more convenient. As part of my testing, I've been stress testing asyncio using different child watcher policies. My CI build runs more than 200 tests each on macOS, Linux and FreeBSD. I've noticed a small percentage of sporadic failures using MultiLoopChildWatcher. My understanding of Python signal functions is that: 1. Upon receipt of a signal, the native "C" signal handler sets a flag that indicates the signal arrived. 2. The main thread checks the signal flags after each bytecode instruction. If a signal flag is set, Python saves the call stack, runs the signal handler on the main thread immediately, then pops the stack when it returns (assuming no exception raised by signal handler). 3. If you are in the middle of a signal handler running on the main thread and Python detects another signal flag, your signal handler can be interrupted. 4. Stacked signal handlers run in LIFO order. The last one that enters will run to completion without interruption. Explanation: I wrapped MultiLoopChildWatcher's sig_chld function in a decorator that logs when it is entered and exited. This clearly shows that _sig_chld is being re-entered. In the following log snippet, I'm running two commands in a pipeline "tr | cat". 1634935451.743 DEBUG process '/usr/bin/tr' created: pid 8747 ... 1634935451.746 DEBUG process '/bin/cat' created: pid 8748 ... 1634935451.761 DEBUG enter '_sig_chld' 20 1634935451.761 DEBUG enter '_sig_chld' 20 1634935451.761 WARNING Unknown child process pid 8747, will report returncode 255 1634935451.762 DEBUG process 8748 exited with returncode 0 1634935451.762 DEBUG exit '_sig_chld' 20 1634935451.762 WARNING Child watcher got an unexpected pid: 8747 Traceback (most recent call last): File "/Users/runner/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/asyncio/unix_events.py", line 1306, in _do_waitpid loop, callback, args = self._callbacks.pop(pid) KeyError: 8747 1634935451.763 WARNING Unknown child process pid 8748, will report returncode 255 1634935451.763 WARNING Child watcher got an unexpected pid: 8748 Traceback (most recent call last): File "/Users/runner/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/asyncio/unix_events.py", line 1306, in _do_waitpid loop, callback, args = self._callbacks.pop(pid) KeyError: 8748 1634935451.763 DEBUG exit '_sig_chld' 20 Here is the breakdown of what happens: 1. Pid 8747 exits and we enter _sig_chld #1. 2. sig_chld #1 calls os.waitpid which gives (pid, status) = (8747, 0). 3. Before sig_chld #1 has a chance to call `self._callbacks.pop(pid)`, it is interrupted. 4. sig_chld #2 calls os.waitpid for pid 8747. We get a ChildProcessError and then "Unknown child process pid 8747, will report returncode 255" 5. sig_chld #2 invokes the callback for pid 8747 saying the returncode=255. 6. sig_chld #2 continues to completion. It reaps pid 8748 normally. 7. sig_chld #1 picks up where it left off. We get an error when we try to pop the callback for 8747. 8. sig_chld #1 calls os.waitpid for pid 8748. This gives us failure messages because it was done by sig_chld #2. The issue of interruption can also happen in the case of running a single process. If the _sig_chld interrupts the call to `self._do_waitpid(pid)` in add_child_watcher, a similar interleaving can occur. Work-Around: In my tests, I patched MultiLoopChildWatcher and so far, it appears to be more reliable. In add_child_handler, I call raise_signal(SIGCHLD) so that all the work is done in the signal handler. class PatchedMultiLoopChildWatcher(asyncio.MultiLoopChildWatcher): "Test race condition fixes in MultiLoopChildWatcher." def add_child_handler(self, pid, callback, *args): loop = asyncio.get_running_loop() self._callbacks[pid] = (loop, callback, args) # Prevent a race condition in case signal was delivered before # callback added. signal.raise_signal(signal.SIGCHLD) @_serialize def _sig_chld(self, signum, frame): super()._sig_chld(signum, frame) _serialize is a decorator that looks like this: def _serialize(func): """Decorator to serialize a non-reentrant signal function. If one client is already in the critical section, set a flag to run the section one more time. Testing purposes only. """ lock = threading.Lock() # Used as atomic test-and-set. retry = False @functools.wraps(func) def _decorator(*args, **kwargs): nonlocal retry while True: if lock.acquire(blocking=False): # pylint: disable=consider-using-with try: retry = False func(*args, **kwargs) finally: lock.release() if retry: continue else: # A signal handler that interrupts an existing handler will # run to completion (LIFO). retry = True break return _decorator ---------- components: asyncio messages: 405756 nosy: asvetlov, byllyfish, yselivanov priority: normal severity: normal status: open title: asyncio: MultiLoopWatcher has a race condition (Proposed work-around) type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:27:01 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 04 Nov 2021 22:27:01 +0000 Subject: [issue24949] Identifier lookup in a multi-level package is flakey In-Reply-To: <1440716362.21.0.0587084904786.issue24949@psf.upfronthosting.co.za> Message-ID: <1636064821.59.0.423073519523.issue24949@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 18:32:38 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Nov 2021 22:32:38 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1636065158.32.0.201029986225.issue45704@roundup.psfhosted.org> Eric V. Smith added the comment: The more I think about this, the more I think it's not .parse's job to fill in the field numbers, it's the job of whoever is calling it. Just as it's not .parse's job to give you an error if you switch back and forth between numbered and un-numbered fields. It's literally just telling you what's in the string as it breaks it apart, not assigning any further meaning to the parts. I guess I should have called it .lex, not .parse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 19:19:36 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 23:19:36 +0000 Subject: [issue44257] typo and verbous grammar in the grammar spec In-Reply-To: <1622172368.56.0.587828284396.issue44257@roundup.psfhosted.org> Message-ID: <1636067976.74.0.0594715509854.issue44257@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 0e34a5918c74c3cc2284cd77a2eba4108b0d6fb0 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393) (GH-29395) https://github.com/python/cpython/commit/0e34a5918c74c3cc2284cd77a2eba4108b0d6fb0 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 19:21:33 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 04 Nov 2021 23:21:33 +0000 Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org> Message-ID: <1636068093.94.0.917173231703.issue45160@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +27669 pull_request: https://github.com/python/cpython/pull/29416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 19:39:39 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Nov 2021 23:39:39 +0000 Subject: [issue35829] datetime: parse "Z" timezone suffix in fromisoformat() In-Reply-To: <1548445007.56.0.14925163397.issue35829@roundup.psfhosted.org> Message-ID: <1636069179.8.0.391056241008.issue35829@roundup.psfhosted.org> Brett Cannon added the comment: I also support the idea of adding an `allow_Z` or some equivalent keyword parameter to isoformat() and then allowing for `Z` in `fromisoformat()`. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 20:04:58 2021 From: report at bugs.python.org (anadius) Date: Fri, 05 Nov 2021 00:04:58 +0000 Subject: [issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT In-Reply-To: <1620375535.4.0.206636353999.issue44067@roundup.psfhosted.org> Message-ID: <1636070698.99.0.861558169316.issue44067@roundup.psfhosted.org> anadius added the comment: I was looking at `zipfile._strip_extra` trying to figure out how it works. It doesn't. It skips extra headers after the last one that matches. That's what causes this issue. Here's a fixed version: def _strip_extra(extra, xids): # Remove Extra Fields with specified IDs. unpack = _EXTRA_FIELD_STRUCT.unpack modified = False buffer = [] start = i = 0 while i + 4 <= len(extra): xid, xlen = unpack(extra[i : i + 4]) j = i + 4 + xlen if xid in xids: if i != start: buffer.append(extra[start : i]) start = j modified = True i = j if i != start: buffer.append(extra[start : i]) if not modified: return extra return b''.join(buffer) Or this one, easier to understand: def _strip_extra(extra, xids): # Remove Extra Fields with specified IDs. unpack = _EXTRA_FIELD_STRUCT.unpack modified = False buffer = [] i = 0 while i + 4 <= len(extra): xid, xlen = unpack(extra[i : i + 4]) j = i + 4 + xlen if xid in xids: modified = True else: buffer.append(extra[i : j]) i = j if not modified: return extra return b''.join(buffer) Not sure which one is better. ---------- nosy: +anadius _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 20:42:47 2021 From: report at bugs.python.org (DJ PJs) Date: Fri, 05 Nov 2021 00:42:47 +0000 Subject: [issue45719] SubProcess stdin.flush freezes when running python interpreter Message-ID: <1636072966.86.0.9507982269.issue45719@roundup.psfhosted.org> New submission from DJ PJs : Keeping writing to a subprocess, and then flushing it to get the stdout works for other interpreters, but not python's. Simplified Example of what I mean: from subprocess import PIPE, Popen, CREATE_NEW_CONSOLE, run subProcess = Popen("Python", stdin=PIPE, stdout=PIPE, text=True, universal_newlines=True) subProcess.stdin.write('Print("HelloWorld")') subProcess.stdin.flush() for line in subProcess.stdout: print(">>> " + str(line.rstrip())) subProcess.stdout.flush() ---------- components: Library (Lib) files: example.py messages: 405761 nosy: djp1012878 priority: normal severity: normal status: open title: SubProcess stdin.flush freezes when running python interpreter type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file50425/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:04:25 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Nov 2021 01:04:25 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows Message-ID: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> New submission from Steve Dower : According to https://twitter.com/BruceDawson0xB/status/1455714820485894151?s=20 there are some serious performance implications from referencing shlwapi.dll. It turns out, we only use it for one native path calculation function, which is easily replaceable (since Windows 8). So we can drop the dependency and get a startup (and shutdown) improvement back to 3.9. ---------- assignee: steve.dower components: Windows messages: 405762 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Remove shlwapi dependency on Windows type: performance versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:06:26 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Nov 2021 01:06:26 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636074386.94.0.844293691476.issue45720@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +27670 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:07:24 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Nov 2021 01:07:24 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636074444.19.0.241837542998.issue45720@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:28:55 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Nov 2021 01:28:55 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636075735.25.0.696076736041.issue45720@roundup.psfhosted.org> Steve Dower added the comment: FTR, I see about 1-1.5ms improvement (using timeit to do a check_call) out of ~32ms total startup time. I also don't actually see gdi32 being transitively loaded as claimed in the Twitter thread, even back to 3.8. So presumably there's something else going on to cause that issue. Either way, this is an easy change with non-zero benefit (at the very least, it gets rid of a dependency we are better off avoiding these days). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 21:53:40 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 05 Nov 2021 01:53:40 +0000 Subject: [issue45721] Improve error message when python shell command is entered at the REPL prompt Message-ID: <1636077220.31.0.800245298483.issue45721@roundup.psfhosted.org> New submission from Steven D'Aprano : A frequent newbie mistake is to call shell commands from inside the interactive interpreter. Most common is to call Python itself. Here is an example where a Python instructor was allegedly unable to diagnose the issue for their students: https://windowsquestions.com/2021/10/09/syntaxerror-invalid-syntax-perhaps-you-forgot-a-comma/ I think it would be a nice feature if the compiler recognised obvious cases of "user tried to call Python from the Python prompt", and suggested a fix. If the statement matches the regex r"python\s+" the error message might say "it looks like you are trying to run a shell command at the Python prompt" rather than suggest a missing comma. ---------- messages: 405764 nosy: steven.daprano priority: normal severity: normal status: open title: Improve error message when python shell command is entered at the REPL prompt type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 22:56:11 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Nov 2021 02:56:11 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1636080971.91.0.851305999357.issue45709@roundup.psfhosted.org> Change by Zachary Ware : ---------- keywords: +3.11regression stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 23:00:47 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Nov 2021 03:00:47 +0000 Subject: [issue45712] Typo in "control flow" documentation In-Reply-To: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> Message-ID: <1636081247.0.0.67797746857.issue45712@roundup.psfhosted.org> Change by Zachary Ware : ---------- keywords: +easy, newcomer friendly stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 23:02:36 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Nov 2021 03:02:36 +0000 Subject: [issue45712] Typo in "control flow" documentation In-Reply-To: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> Message-ID: <1636081356.57.0.236616331153.issue45712@roundup.psfhosted.org> Change by Zachary Ware : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 23:51:28 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Nov 2021 03:51:28 +0000 Subject: [issue40051] Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1636084288.61.0.982728190829.issue40051@roundup.psfhosted.org> Zachary Ware added the comment: Option 4: generate a list of modules (or a mapping of module names to documentation files) that have documentation when generating Lib/pydoc_data/topics.py, and teach pydoc.help to not include the link when it knows the module doesn't have documentation. This is a much more complete solution that also avoids creating links for private modules (see bpo-45717), but is significantly more effort to implement. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 4 23:54:42 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Nov 2021 03:54:42 +0000 Subject: [issue45717] Bad link to python docs in help(_hashlib) In-Reply-To: <1636052829.11.0.396753142278.issue45717@roundup.psfhosted.org> Message-ID: <1636084482.42.0.268137500938.issue45717@roundup.psfhosted.org> Zachary Ware added the comment: I'm closing this as a duplicate of bpo-40051, as it's basically another manifestation of that issue. However, any module named with a leading underscore is a private module, and won't have documentation. The source for _hashlib can be found in Modules/_hashopenssl.c. ---------- nosy: +zach.ware resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 00:36:08 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Nov 2021 04:36:08 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636086968.39.0.250057291861.issue45708@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 00:43:54 2021 From: report at bugs.python.org (Joshua) Date: Fri, 05 Nov 2021 04:43:54 +0000 Subject: [issue40051] Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1636087434.7.0.945545867144.issue40051@roundup.psfhosted.org> Joshua added the comment: I think that option 4 would work best but instead of putting any logic in (Lib/pydoc_data/topics.py)[https://github.com/python/cpython/blob/main/Lib/pydoc_data/topics.py] we could put the logic for working with private modules as well and other edge cases in (Lib/pydoc.py)[https://github.com/python/cpython/blob/main/Lib/pydoc.py]. It might make future changes easier. ---------- nosy: +Joshuah143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 01:06:50 2021 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 05 Nov 2021 05:06:50 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1636088810.84.0.605791745712.issue45636@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +27671 pull_request: https://github.com/python/cpython/pull/29418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 02:55:10 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Nov 2021 06:55:10 +0000 Subject: [issue40051] Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1636095310.64.0.551692599974.issue40051@roundup.psfhosted.org> Change by Zachary Ware : ---------- keywords: +patch pull_requests: +27672 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 02:57:23 2021 From: report at bugs.python.org (Zachary Ware) Date: Fri, 05 Nov 2021 06:57:23 +0000 Subject: [issue40051] Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1636095443.4.0.740596601395.issue40051@roundup.psfhosted.org> Zachary Ware added the comment: This actually turned out to be less effort than I expected (though I still should have been asleep 2 hours ago), so I've gone ahead and opened GH-29419 to implement what I suggested. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 03:32:21 2021 From: report at bugs.python.org (Jens Rapp) Date: Fri, 05 Nov 2021 07:32:21 +0000 Subject: [issue45722] documentation missing information on objects in submodules Message-ID: <1636097541.32.0.940629899159.issue45722@roundup.psfhosted.org> New submission from Jens Rapp : Documentation 5.4.2. Submodules tells what happens to modules which are imported inside __init__.py of a package> from .foo import Foo from .bar import Bar then executing the following puts a name binding to foo and bar in the spam module: >>> >>> import spam >>> spam.foo >>> spam.bar I miss information on what happes to Foo and Bar. is it directly usable under spam.Bar() or does one have to use spam.bar.Bar()? To my mind, that example should tell this. ---------- assignee: docs at python components: Documentation messages: 405769 nosy: docs at python, rapp.jens priority: normal severity: normal status: open title: documentation missing information on objects in submodules type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 04:52:03 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 08:52:03 +0000 Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org> Message-ID: <1636102323.32.0.920449572076.issue45160@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 54d1e3f72ed1ad8e860888c30ee7a285b931c0d1 by ?ukasz Langa in branch 'main': bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) https://github.com/python/cpython/commit/54d1e3f72ed1ad8e860888c30ee7a285b931c0d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 04:51:46 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Nov 2021 08:51:46 +0000 Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org> Message-ID: <1636102306.44.0.64333634598.issue45160@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27673 pull_request: https://github.com/python/cpython/pull/29420 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 04:52:37 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Nov 2021 08:52:37 +0000 Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org> Message-ID: <1636102357.22.0.421279514801.issue45160@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27674 pull_request: https://github.com/python/cpython/pull/29421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 04:53:17 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 08:53:17 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636102397.33.0.755956434553.issue27313@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e52f9bee802aa7a7fbd405dcc43bc2d1bea884d9 by ?ukasz Langa in branch 'main': bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) https://github.com/python/cpython/commit/e52f9bee802aa7a7fbd405dcc43bc2d1bea884d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 04:53:20 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Nov 2021 08:53:20 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636102400.61.0.806625212542.issue27313@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27675 pull_request: https://github.com/python/cpython/pull/29422 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 04:53:34 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Nov 2021 08:53:34 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636102414.31.0.612758886835.issue27313@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27676 pull_request: https://github.com/python/cpython/pull/29423 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:19:09 2021 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiBCcm/FvsOtaw==?=) Date: Fri, 05 Nov 2021 09:19:09 +0000 Subject: [issue38401] Make dataclass attribute docstrings accessible In-Reply-To: <1570494293.05.0.934356434949.issue38401@roundup.psfhosted.org> Message-ID: <1636103949.88.0.674460328148.issue38401@roundup.psfhosted.org> V?clav Bro??k added the comment: Note that John Parejko is right that the active PEP 257 clearly specifies attribute docstrings. Here is the excerpt: String literals occurring immediately after a simple assignment at the top level of a module, class, or __init__ method are called "attribute docstrings". They are being supported by various software like Sphinx, vim, VS Codes's Pylance. ---------- nosy: +pabouk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:34:24 2021 From: report at bugs.python.org (penguin_wwy) Date: Fri, 05 Nov 2021 09:34:24 +0000 Subject: [issue45630] Dump CodeObject API for debugging In-Reply-To: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org> Message-ID: <1636104864.44.0.0283920310905.issue45630@roundup.psfhosted.org> Change by penguin_wwy <940375606 at qq.com>: ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:37:41 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 05 Nov 2021 09:37:41 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636105061.72.0.948179520581.issue45708@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:39:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Nov 2021 09:39:50 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1636105190.34.0.816502949226.issue45292@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 3509b26c916707363c71a1df040855e395cf4817 by Irit Katriel in branch 'main': bpo-45292: [PEP 654] Update traceback display code to work with exception groups (GH-29207) https://github.com/python/cpython/commit/3509b26c916707363c71a1df040855e395cf4817 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:43:25 2021 From: report at bugs.python.org (Andre Roberge) Date: Fri, 05 Nov 2021 09:43:25 +0000 Subject: [issue45721] Improve error message when python shell command is entered at the REPL prompt In-Reply-To: <1636077220.31.0.800245298483.issue45721@roundup.psfhosted.org> Message-ID: <1636105405.68.0.110444240547.issue45721@roundup.psfhosted.org> Andre Roberge added the comment: I think that "trying to run a shell command" might not be easy to understand by a beginner. If the special case of r"python\s+" is added, perhaps r"pip\s+" should be considered as well since many sites on the Internet suggest to install packages using "pip install ..." instead of "python -m pip install ..." ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:43:42 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 05 Nov 2021 09:43:42 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1636105422.03.0.272044865182.issue45292@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:47:17 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Nov 2021 09:47:17 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1636105637.9.0.038966463216.issue45615@roundup.psfhosted.org> Irit Katriel added the comment: It's been merged now, so go ahead. Note that there are two traceback printing functions - in the interpreter in traceback.c and in the library in traceback.py. They are expected to work the same as much as possible. If you add a test to BaseExceptionReportingTests, it will test both versions (see the PyExcReportingTests and PyExcReportingTests subclasses). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:59:38 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 09:59:38 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636106378.61.0.33165856566.issue27313@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 363ecb36da273ddb0c80ad14f3f1aa5101223bc2 by Miss Islington (bot) in branch '3.10': bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) (GH-29422) https://github.com/python/cpython/commit/363ecb36da273ddb0c80ad14f3f1aa5101223bc2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 05:59:54 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 09:59:54 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636106394.13.0.906293729236.issue27313@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 885e57c148d0b2c34daa2b7e5162dc57cf7e4469 by Miss Islington (bot) in branch '3.9': bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411) (GH-29423) https://github.com/python/cpython/commit/885e57c148d0b2c34daa2b7e5162dc57cf7e4469 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:00:22 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 10:00:22 +0000 Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org> Message-ID: <1636106422.32.0.184607072884.issue45160@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 099a94fba3f9437e29d16ed54215ec8cf65de868 by Miss Islington (bot) in branch '3.10': bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) (GH-29421) https://github.com/python/cpython/commit/099a94fba3f9437e29d16ed54215ec8cf65de868 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:00:09 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 10:00:09 +0000 Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org> Message-ID: <1636106409.4.0.0529011319197.issue45160@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 276a3a6a16ebf489607db31ad86c58dd89567306 by Miss Islington (bot) in branch '3.9': bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) (GH-29420) https://github.com/python/cpython/commit/276a3a6a16ebf489607db31ad86c58dd89567306 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:05:47 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 10:05:47 +0000 Subject: [issue45723] Improve and simplify configure.ac checks Message-ID: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> New submission from Christian Heimes : The autoconf-based build system has room for improvements. The configure.ac script can be simplified in several places by using AS and AC macros or by defining new custom macros. For example we have a lot of blocks that look like this: AC_MSG_CHECKING(for chroot) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[void x=chroot]])], [AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) ]) The block has an issue, too. It does not use AC_CACHE to cache the result. The entire block can be replaced by a custom macro that takes care of everything and implements correct caching: PY_CHECK_FUNC([chroot], [#include ]) We can also move several library and header checks from setup.py into configure.ac, e.g. check for soundcard.h or gdbm libs and headers. ---------- assignee: christian.heimes components: Build messages: 405780 nosy: christian.heimes priority: normal severity: normal status: open title: Improve and simplify configure.ac checks type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:06:28 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Nov 2021 10:06:28 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1636106788.94.0.489011840168.issue45678@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27677 pull_request: https://github.com/python/cpython/pull/29424 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:06:26 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 10:06:26 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1636106786.41.0.581330613856.issue45678@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 32f55d1a5de66f9a86964fc0655d7a006a9d90b9 by Alex Waygood in branch 'main': bpo-45678: Add more ``singledispatchmethod`` tests (GH-29412) https://github.com/python/cpython/commit/32f55d1a5de66f9a86964fc0655d7a006a9d90b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:36:57 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Fri, 05 Nov 2021 10:36:57 +0000 Subject: [issue45507] Small oversight in 3.11 gzip.decompress implementation with regards to backwards compatibility In-Reply-To: <1634547092.41.0.572458235667.issue45507@roundup.psfhosted.org> Message-ID: <1636108617.14.0.991365667843.issue45507@roundup.psfhosted.org> Ruben Vorderman added the comment: bump. This is a regression introduced by https://github.com/python/cpython/pull/27941 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 06:38:27 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Fri, 05 Nov 2021 10:38:27 +0000 Subject: [issue45509] Gzip header corruption not properly checked. In-Reply-To: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org> Message-ID: <1636108707.4.0.532031363779.issue45509@roundup.psfhosted.org> Ruben Vorderman added the comment: Bump. This is a bug that allows corrupted gzip files to be processed without error. Therefore I bump this issue in the hopes someone will review the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 07:06:28 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Nov 2021 11:06:28 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636110388.86.0.3030964864.issue27313@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +27678 pull_request: https://github.com/python/cpython/pull/29425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 07:16:05 2021 From: report at bugs.python.org (ghost_in _the_wires) Date: Fri, 05 Nov 2021 11:16:05 +0000 Subject: [issue45724] Segmentation fault Message-ID: <1636110965.6.0.294482496197.issue45724@roundup.psfhosted.org> Change by ghost_in _the_wires : ---------- files: log.txt nosy: ghost.in.the.wires priority: normal severity: normal status: open title: Segmentation fault versions: Python 3.10 Added file: https://bugs.python.org/file50426/log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 07:17:21 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 05 Nov 2021 11:17:21 +0000 Subject: [issue45725] test_freeze doesn't clean up after itself Message-ID: <1636111041.41.0.0249123262066.issue45725@roundup.psfhosted.org> New submission from Mark Shannon : test_tools leaves a copy of the source in Tools/freeze/test/outdir/ which messes up grep and other tools used for searching the source. ---------- components: Tests messages: 405784 nosy: Mark.Shannon, eric.snow priority: normal severity: normal status: open title: test_freeze doesn't clean up after itself versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 07:18:53 2021 From: report at bugs.python.org (ghost_in _the_wires) Date: Fri, 05 Nov 2021 11:18:53 +0000 Subject: [issue45724] Segmentation fault Message-ID: <1636111133.22.0.130315009164.issue45724@roundup.psfhosted.org> New submission from ghost_in _the_wires : Test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 07:22:09 2021 From: report at bugs.python.org (ghost_in _the_wires) Date: Fri, 05 Nov 2021 11:22:09 +0000 Subject: [issue45724] Segmentation fault In-Reply-To: <1636111133.22.0.130315009164.issue45724@roundup.psfhosted.org> Message-ID: <1636111329.42.0.936987441056.issue45724@roundup.psfhosted.org> ghost_in _the_wires added the comment: When trying to run this tool https://github.com/shmilylty/OneForAll in Parallels Desktop virtual environment (Ubuntu 20.0.4 aarch64) I've got segmentation fault in ssl, http client and threading. Full log in file ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 07:41:52 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 11:41:52 +0000 Subject: [issue45721] Improve error message when python shell command is entered at the REPL prompt In-Reply-To: <1636077220.31.0.800245298483.issue45721@roundup.psfhosted.org> Message-ID: <1636112512.43.0.340949461753.issue45721@roundup.psfhosted.org> Alex Waygood added the comment: +1 for adding r"pip\s" as a special case as well. A few months ago, I was trying to (remotely) help a beginner friend debug why his attempt to install a library wasn't working. It took me ages before I realised he was entering it into the interactive REPL rather than a terminal window. ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:15:07 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 12:15:07 +0000 Subject: [issue45726] Documentation for `@singledispatch` and `@singledispatchmethod` could be improved Message-ID: <1636114507.95.0.911356270077.issue45726@roundup.psfhosted.org> New submission from Alex Waygood : The documentation for `functools.singledispatch` and `functools.singledispatchmethod` contains a few small grammar mistakes and instances of slightly inelegant writing. PR to follow shortly. ---------- assignee: docs at python components: Documentation messages: 405788 nosy: AlexWaygood, docs at python, lukasz.langa, rhettinger priority: normal severity: normal status: open title: Documentation for `@singledispatch` and `@singledispatchmethod` could be improved type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:19:34 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 12:19:34 +0000 Subject: [issue45726] Documentation for `@singledispatch` and `@singledispatchmethod` could be improved In-Reply-To: <1636114507.95.0.911356270077.issue45726@roundup.psfhosted.org> Message-ID: <1636114774.83.0.60554184997.issue45726@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch pull_requests: +27679 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29426 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:29:08 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Fri, 05 Nov 2021 12:29:08 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1636105637.9.0.038966463216.issue45615@roundup.psfhosted.org> Message-ID: Nikita Sobolev added the comment: Thanks! ??, 5 ????. 2021 ?. ? 12:47, Irit Katriel : > > Irit Katriel added the comment: > > It's been merged now, so go ahead. > > Note that there are two traceback printing functions - in the interpreter > in traceback.c and in the library in traceback.py. They are expected to > work the same as much as possible. > > If you add a test to BaseExceptionReportingTests, it will test both > versions (see the PyExcReportingTests and PyExcReportingTests subclasses). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:29:14 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 05 Nov 2021 12:29:14 +0000 Subject: [issue45677] [doc] improve sqlite3 docs In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org> Message-ID: <1636115354.02.0.150726730978.issue45677@roundup.psfhosted.org> Erlend E. Aasland added the comment: See also discussion on Discourse: https://discuss.python.org/t/avoid-addressing-the-user-directly-when-writing-docs/11671 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:41:28 2021 From: report at bugs.python.org (Sander Bollen) Date: Fri, 05 Nov 2021 12:41:28 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636116088.96.0.186960686794.issue45708@roundup.psfhosted.org> Sander Bollen added the comment: Thanks for looking into this so swiftly! As a user, I have found PEP515 to be worded a little ambiguously with regards to formatting using underscores as thousands separators. While it enumerates a collection of types as far as the constructor is concerned, it does not do so for formatting. Instead, it says to support `_` as thousands separator for formatting wherever `,` is allowed. Since `,` does work for Decimal, I have taken that to imply `_` should work for Decimal as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:44:09 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Fri, 05 Nov 2021 12:44:09 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent Message-ID: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : I found following inconsistency in the error message when there's a missing comma (it behaves that way both on main and 3.10). Here's what happens with numbers, as expected: Python 3.11.0a1+ (heads/main:32f55d1a5d, Nov 5 2021, 13:18:52) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 1 2 3 4 File "", line 1 1 2 3 4 ^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? But with names the error is further right in the lines: >>> a b c d File "", line 1 a b c d ^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? >>> a b c d e f g File "", line 1 a b c d e f g ^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? That looks potentially quite confusing to me? (I don't know if these nit-picky parsing issues are too annoying, if they are please tell me to stop filing them). ---------- messages: 405792 nosy: Carl.Friedrich.Bolz, pablogsal priority: normal severity: normal status: open title: Parse error when missing commas is inconsistent versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 08:56:01 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 12:56:01 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1636116961.83.0.499141640222.issue45727@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:06:01 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Nov 2021 13:06:01 +0000 Subject: [issue45724] Segmentation fault In-Reply-To: <1636111133.22.0.130315009164.issue45724@roundup.psfhosted.org> Message-ID: <1636117561.59.0.861736082478.issue45724@roundup.psfhosted.org> Eric V. Smith added the comment: I assume this is a problem with the third party library, not with Python itself. If so, you'll have to contact the authors of OneForAll. But if you can create a small program that demonstrates the problem, maybe someone here could take a look at it. As it is, you've given us no way to duplicate the problem, so we can't help. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:08:56 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Nov 2021 13:08:56 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1636117736.9.0.662736966101.issue45727@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >(I don't know if these nit-picky parsing issues are too annoying, if they are please tell me to stop filing them). Don't worry, I think is great to discuss these cases. If there are too many, then maybe it will take a while to correct, but please, don't stop :) > That looks potentially quite confusing to me? I agree is unfortunate that is inconsistent, but unfortunately, this is going to be a bit of a pain because the way the expression rule is reached. I will try to see if we can easily fix this without having to restructure a bunch of the grammar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:21:27 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Nov 2021 13:21:27 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1636118487.88.0.899467948322.issue45727@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27680 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:21:33 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Nov 2021 13:21:33 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636118493.41.0.0820120000434.issue45708@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a duplicate of issue43624. It was also discussed in Discuss. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add underscore as a decimal separator for string formatting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:31:48 2021 From: report at bugs.python.org (Sascha Desch) Date: Fri, 05 Nov 2021 13:31:48 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1636119108.35.0.798703566986.issue45704@roundup.psfhosted.org> Sascha Desch added the comment: That definition of `.parse()` definitely makes sense. Do you then think this is out of scope for `Formatter` in general or just for `.parse()`?. Just for reference, this is what I currently use to get automatic numbering to work for my use case. ``` def parse_command_template(format_string): auto_numbering_error = ValueError( 'cannot switch from automatic field numbering to manual field specification') index = 0 auto_numbering = None for literal_text, field_name, spec, conversion in Formatter().parse(format_string): if field_name is not None: if field_name.isdigit(): if auto_numbering is True: raise auto_numbering_error auto_numbering = False if field_name == '': if auto_numbering is False: raise auto_numbering_error auto_numbering = True field_name = str(index) index += 1 yield literal_text, field_name, spec, conversion ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:32:25 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Nov 2021 13:32:25 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636119145.9.0.960106781657.issue27313@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: -27678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:32:53 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Nov 2021 13:32:53 +0000 Subject: [issue45160] ttk.OptionMenu radiobuttons change variable value twice In-Reply-To: <1631257980.33.0.506661911605.issue45160@roundup.psfhosted.org> Message-ID: <1636119173.15.0.0853710833476.issue45160@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +27681 pull_request: https://github.com/python/cpython/pull/29425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:32:53 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Nov 2021 13:32:53 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636119173.23.0.11811170625.issue27313@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +27682 pull_request: https://github.com/python/cpython/pull/29425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:46:16 2021 From: report at bugs.python.org (jkrupp) Date: Fri, 05 Nov 2021 13:46:16 +0000 Subject: [issue45728] SharedMemory documentation: System V vs Posix Message-ID: <1636119976.18.0.141514451368.issue45728@roundup.psfhosted.org> New submission from jkrupp : Hi, the documentation for the shared_memory module states that "shared memory refers to ?System V style? shared memory". However, I believe it might be clearer to talk about "POSIX style shared memory" here instead. Primed by the "System V style"-comment, I had expected that shared memory blocks could be identified through a numeric ID (as used by the system V shared memory APIs `shmget`, `shmat`, ...). After looking at the implementation it became clear though, that the newer POSIX-API (`shm_open`, `shm_unlink`, ...) is used, which explains why shared memory blocks have a *name* instead. Technically, the documentation only uses "System V style" to distinguish it from "distributed shared memory", and further states that "[it] is not necessarily implemented explicitly as such". Yet, this distinction is particularly relevant if memory is to be shared with other (non-python!) processes (although placement of shared_memory in the multiprocessing package might indicate that that is not one of its expected use-cases...) ---------- assignee: docs at python components: Documentation messages: 405797 nosy: docs at python, jkrupp priority: normal severity: normal status: open title: SharedMemory documentation: System V vs Posix type: enhancement versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:55:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Nov 2021 13:55:10 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument In-Reply-To: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> Message-ID: <1636120510.71.0.695798212129.issue45716@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset e2d65630f36712dbdbf7711520c985c526a5cc25 by Pablo Galindo Salgado in branch 'main': bpo-45716: Improve the error message when using True/False/None as keywords in a call (GH-29413) https://github.com/python/cpython/commit/e2d65630f36712dbdbf7711520c985c526a5cc25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 09:57:15 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Nov 2021 13:57:15 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument In-Reply-To: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> Message-ID: <1636120635.49.0.383454337293.issue45716@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 Nov 5 09:59:51 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Nov 2021 13:59:51 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument In-Reply-To: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> Message-ID: <1636120791.24.0.41533030909.issue45716@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27683 pull_request: https://github.com/python/cpython/pull/29428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:07:39 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 14:07:39 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636121259.38.0.649928441373.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: The first PR adds helper macros, AC_CACHE_CHECK() [1] and AS_VAR_IF() [2]. It also unified internal variables to use format "ac_cv_func_$funcname", "ac_cv_func_lib_$library_$funcname", or "ac_cv_header_$headername_h". "ac_cv" stands for autoconf cached value. AC_CACHE_CHECK() replaces AC_MSG_CHECKING() and AC_MSG_RESULT(). The syntax is AC_CACHE_CHECK([text], [cache variable], [body]) where body is only excecuted when the cache variable is not set. The body has to set the cache variable to yes or no. Any output and AC_DEFINE must occur outside the body. AS_VAR_IF() is a nicer way to write if test $variable = value; then; fi. [1] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Caching-Results.html#Caching-Results [2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Polymorphic-Variables.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:25:33 2021 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 05 Nov 2021 14:25:33 +0000 Subject: [issue45718] asyncio: MultiLoopWatcher has a race condition (Proposed work-around) In-Reply-To: <1636064559.39.0.358204060297.issue45718@roundup.psfhosted.org> Message-ID: <1636122333.62.0.886406766896.issue45718@roundup.psfhosted.org> Chris Jerdonek added the comment: Since issue 38323 is still open, I think you should just comment on that instead of creating a new issue. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 10:51:17 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Nov 2021 14:51:17 +0000 Subject: [issue45630] Dump CodeObject API for debugging In-Reply-To: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org> Message-ID: <1636123877.93.0.482305617748.issue45630@roundup.psfhosted.org> Guido van Rossum added the comment: Why not propose a slight extension to the dis module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:04:35 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Nov 2021 15:04:35 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1636124675.61.0.296453348985.issue45704@roundup.psfhosted.org> Eric V. Smith added the comment: I think your code is rational. But since string.Formatter gets such little use, I'm not sure it's worth adding this to the stdlib. On the other hand, it could be used internal to string.Formatter. We'd need to pick a better name, though. And maybe it should return the field_name as an int. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:24:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 15:24:24 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636125864.86.0.194416261323.issue45723@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27684 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:27:30 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 15:27:30 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1636126050.5.0.39409161978.issue45678@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset bcb236c19e4ddf5ccf0fc45ab541eabf1f757a64 by Miss Islington (bot) in branch '3.10': bpo-45678: Add more ``singledispatchmethod`` tests (GH-29412) (GH-29424) https://github.com/python/cpython/commit/bcb236c19e4ddf5ccf0fc45ab541eabf1f757a64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:28:00 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 15:28:00 +0000 Subject: [issue45678] `functools.singledispatchmethod` is missing tests (and is buggy in 3.9) In-Reply-To: <1635595831.41.0.152210084078.issue45678@roundup.psfhosted.org> Message-ID: <1636126080.98.0.422341712997.issue45678@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Alex! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 11:41:41 2021 From: report at bugs.python.org (ghost_in _the_wires) Date: Fri, 05 Nov 2021 15:41:41 +0000 Subject: [issue45724] Segmentation fault In-Reply-To: <1636111133.22.0.130315009164.issue45724@roundup.psfhosted.org> Message-ID: <1636126901.82.0.537413314822.issue45724@roundup.psfhosted.org> ghost_in _the_wires added the comment: Oh I see. Thanks for your response! I thought that it's something wrong with python on arm64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:00:29 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 05 Nov 2021 16:00:29 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1636128029.14.0.167613530804.issue44828@roundup.psfhosted.org> Ronald Oussoren added the comment: > Where do you think that "feature" is documented? I'd have to check, but I didn't learn this from Twitter, although it wouldn't surprise me if I learned this from a WWDC talk. The beta for Big Sur never identified itself as 10.16 other than through this feature. I guess Apple determined that too many applications only looked at the minor version determine if the current system is new enough. Applications compiled with/linked against a 11.0 or 12.0 SDK will always just see the real system version. Note that this also affects programs just opening the SystemVersion.plist file, that will get substituted by an alternative version when the opening process links against an older SDK. Calling sw_vers and parsing the output does return the right version though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:06:13 2021 From: report at bugs.python.org (Jacob Lifshay) Date: Fri, 05 Nov 2021 16:06:13 +0000 Subject: [issue45729] "history and license" link has wrong target Message-ID: <1636128373.81.0.436284013167.issue45729@roundup.psfhosted.org> New submission from Jacob Lifshay : https://docs.python.org/3.10/library/csv.html at the bottom the "history and license" link just links back to csv.html, rather than the correct target. ---------- assignee: docs at python components: Documentation messages: 405807 nosy: docs at python, programmerjake priority: normal severity: normal status: open title: "history and license" link has wrong target versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:21:42 2021 From: report at bugs.python.org (Marc Culler) Date: Fri, 05 Nov 2021 16:21:42 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1636129302.77.0.109950558044.issue44828@roundup.psfhosted.org> Marc Culler added the comment: Well, not exactly ... culler at abner ~ % export SYSTEM_VERSION_COMPAT=1 culler at abner ~ % sw_vers ProductName: Mac OS X ProductVersion: 10.16 BuildVersion: 20G224 culler at abner ~ % export SYSTEM_VERSION_COMPAT=0 culler at abner ~ % sw_vers ProductName: macOS ProductVersion: 11.6.1 BuildVersion: 20G224 But that would only be helpful to me if the operatingSystemVersion property of an NSProcessInfo object also depended on that environment variable. Feel free to check the docs for an answer to that question: https://developer.apple.com/documentation/foundation/nsprocessinfo/1410906-operatingsystemversion ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:26:44 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Nov 2021 16:26:44 +0000 Subject: [issue45726] Documentation for `@singledispatch` and `@singledispatchmethod` could be improved In-Reply-To: <1636114507.95.0.911356270077.issue45726@roundup.psfhosted.org> Message-ID: <1636129604.28.0.25324945435.issue45726@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +27685 pull_request: https://github.com/python/cpython/pull/29430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:26:53 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Nov 2021 16:26:53 +0000 Subject: [issue45726] Documentation for `@singledispatch` and `@singledispatchmethod` could be improved In-Reply-To: <1636114507.95.0.911356270077.issue45726@roundup.psfhosted.org> Message-ID: <1636129613.47.0.240179623167.issue45726@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27686 pull_request: https://github.com/python/cpython/pull/29431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:40:42 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 16:40:42 +0000 Subject: [issue41122] functools.singledispatchfunction has confusing error message if no positional arguments are passed in In-Reply-To: <1593142171.21.0.765046839926.issue41122@roundup.psfhosted.org> Message-ID: <1636130442.31.0.742062187387.issue41122@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood, lukasz.langa, rhettinger versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:53:22 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 05 Nov 2021 16:53:22 +0000 Subject: [issue45726] Documentation for `@singledispatch` and `@singledispatchmethod` could be improved In-Reply-To: <1636114507.95.0.911356270077.issue45726@roundup.psfhosted.org> Message-ID: <1636131202.94.0.729843816912.issue45726@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Alex! ? ? ? I'm not a native speaker so your review of my language use was helpful ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 12:54:34 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 16:54:34 +0000 Subject: [issue45726] Documentation for `@singledispatch` and `@singledispatchmethod` could be improved In-Reply-To: <1636114507.95.0.911356270077.issue45726@roundup.psfhosted.org> Message-ID: <1636131274.83.0.853262112192.issue45726@roundup.psfhosted.org> Alex Waygood added the comment: Thanks for reviewing and merging, ?ukasz -- appreciate it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:19:50 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Nov 2021 17:19:50 +0000 Subject: [issue45243] [sqlite3] add support for changing connection limits In-Reply-To: <1632090954.41.0.8887678667.issue45243@roundup.psfhosted.org> Message-ID: <1636132790.82.0.418743552877.issue45243@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 3d42cd9461e60c7427f3793f640cd975fbd99289 by Erlend Egeberg Aasland in branch 'main': bpo-45243: Use connection limits to simplify `sqlite3` tests (GH-29356) https://github.com/python/cpython/commit/3d42cd9461e60c7427f3793f640cd975fbd99289 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:40:45 2021 From: report at bugs.python.org (William Fisher) Date: Fri, 05 Nov 2021 17:40:45 +0000 Subject: [issue45718] asyncio: MultiLoopWatcher has a race condition (Proposed work-around) In-Reply-To: <1636064559.39.0.358204060297.issue45718@roundup.psfhosted.org> Message-ID: <1636134045.48.0.899722594531.issue45718@roundup.psfhosted.org> William Fisher added the comment: Thanks, I will comment on bpo-38323 directly. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 13:45:33 2021 From: report at bugs.python.org (William Fisher) Date: Fri, 05 Nov 2021 17:45:33 +0000 Subject: [issue38323] asyncio: MultiLoopWatcher has a race condition (test_asyncio: test_close_kill_running() hangs on AMD64 RHEL7 Refleaks 3.x) In-Reply-To: <1569848255.08.0.155489980043.issue38323@roundup.psfhosted.org> Message-ID: <1636134333.74.0.0799731326707.issue38323@roundup.psfhosted.org> William Fisher added the comment: asyncio.MultiLoopChildWatcher has two problems that create a race condition. 1. The SIGCHLD signal handler does not guard against interruption/re-entry. 2. The SIGCHLD signal handler can interrupt add_child_handler's `self._do_waitpid(pid)`. Symptoms: Log messages that look like this: 1634935451.761 WARNING Unknown child process pid 8747, will report returncode 255 ... 1634935451.762 WARNING Child watcher got an unexpected pid: 8747 Traceback (most recent call last): File "/Users/runner/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/asyncio/unix_events.py", line 1306, in _do_waitpid loop, callback, args = self._callbacks.pop(pid) KeyError: 8747 Background: I've been working on a library to make calling asyncio subprocesses more convenient. As part of my testing, I've been stress testing asyncio using different child watcher policies. My CI build runs more than 200 tests each on macOS, Linux and FreeBSD. I've noticed a small percentage of sporadic failures using MultiLoopChildWatcher. My understanding of Python signal functions is that: 1. Upon receipt of a signal, the native "C" signal handler sets a flag that indicates the signal arrived. 2. The main thread checks the signal flags after each bytecode instruction. If a signal flag is set, Python saves the call stack, runs the signal handler on the main thread immediately, then pops the stack when it returns (assuming no exception raised by signal handler). 3. If you are in the middle of a signal handler running on the main thread and Python detects another signal flag, your signal handler can be interrupted. 4. Stacked signal handlers run in LIFO order. The last one that enters will run to completion without interruption. Explanation: I wrapped MultiLoopChildWatcher's sig_chld function in a decorator that logs when it is entered and exited. This clearly shows that _sig_chld is being re-entered. In the following log snippet, I'm running two commands in a pipeline "tr | cat". 1634935451.743 DEBUG process '/usr/bin/tr' created: pid 8747 ... 1634935451.746 DEBUG process '/bin/cat' created: pid 8748 ... 1634935451.761 DEBUG enter '_sig_chld' 20 1634935451.761 DEBUG enter '_sig_chld' 20 1634935451.761 WARNING Unknown child process pid 8747, will report returncode 255 1634935451.762 DEBUG process 8748 exited with returncode 0 1634935451.762 DEBUG exit '_sig_chld' 20 1634935451.762 WARNING Child watcher got an unexpected pid: 8747 Traceback (most recent call last): File "/Users/runner/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/asyncio/unix_events.py", line 1306, in _do_waitpid loop, callback, args = self._callbacks.pop(pid) KeyError: 8747 1634935451.763 WARNING Unknown child process pid 8748, will report returncode 255 1634935451.763 WARNING Child watcher got an unexpected pid: 8748 Traceback (most recent call last): File "/Users/runner/hostedtoolcache/Python/3.9.7/x64/lib/python3.9/asyncio/unix_events.py", line 1306, in _do_waitpid loop, callback, args = self._callbacks.pop(pid) KeyError: 8748 1634935451.763 DEBUG exit '_sig_chld' 20 Here is the breakdown of what happens: 1. Pid 8747 exits and we enter _sig_chld #1. 2. sig_chld #1 calls os.waitpid which gives (pid, status) = (8747, 0). 3. Before sig_chld #1 has a chance to call `self._callbacks.pop(pid)`, it is interrupted. 4. sig_chld #2 calls os.waitpid for pid 8747. We get a ChildProcessError and then "Unknown child process pid 8747, will report returncode 255" 5. sig_chld #2 invokes the callback for pid 8747 saying the returncode=255. 6. sig_chld #2 continues to completion. It reaps pid 8748 normally. 7. sig_chld #1 picks up where it left off. We get an error when we try to pop the callback for 8747. 8. sig_chld #1 calls os.waitpid for pid 8748. This gives us failure messages because it was done by sig_chld #2. The issue of interruption can also happen in the case of running a single process. If the _sig_chld interrupts the call to `self._do_waitpid(pid)` in add_child_watcher, a similar interleaving can occur. Work-Around: In my tests, I patched MultiLoopChildWatcher and so far, it appears to be more reliable. In add_child_handler, I call raise_signal(SIGCHLD) so that all the work is done in the signal handler. class PatchedMultiLoopChildWatcher(asyncio.MultiLoopChildWatcher): "Test race condition fixes in MultiLoopChildWatcher." def add_child_handler(self, pid, callback, *args): loop = asyncio.get_running_loop() self._callbacks[pid] = (loop, callback, args) # Prevent a race condition in case signal was delivered before # callback added. signal.raise_signal(signal.SIGCHLD) @_serialize def _sig_chld(self, signum, frame): super()._sig_chld(signum, frame) _serialize is a decorator that looks like this: def _serialize(func): """Decorator to serialize a non-reentrant signal function. If one client is already in the critical section, set a flag to run the section one more time. Testing purposes only. """ lock = threading.Lock() # Used as atomic test-and-set. retry = False @functools.wraps(func) def _decorator(*args, **kwargs): nonlocal retry while True: if lock.acquire(blocking=False): # pylint: disable=consider-using-with try: retry = False func(*args, **kwargs) finally: lock.release() if retry: continue else: # A signal handler that interrupts an existing handler will # run to completion (LIFO). retry = True break return _decorator ---------- nosy: +byllyfish _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:06:11 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Nov 2021 18:06:11 +0000 Subject: [issue45704] string.Formatter.parse does not handle auto-numbered positional fields In-Reply-To: <1635940547.79.0.60719103588.issue45704@roundup.psfhosted.org> Message-ID: <1636135571.75.0.219313135108.issue45704@roundup.psfhosted.org> Eric V. Smith added the comment: That is, return field_name as an int if it's an int, otherwise as a string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:30:06 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2021 18:30:06 +0000 Subject: [issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing In-Reply-To: <1635535560.24.0.0921518602941.issue45675@roundup.psfhosted.org> Message-ID: <1636137006.13.0.363845402938.issue45675@roundup.psfhosted.org> Change by ?ric Araujo : ---------- nosy: +brett.cannon, eric.snow, ncoghlan versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:32:00 2021 From: report at bugs.python.org (penguin_wwy) Date: Fri, 05 Nov 2021 18:32:00 +0000 Subject: [issue45630] Dump CodeObject API for debugging In-Reply-To: <1635349665.14.0.891838928636.issue45630@roundup.psfhosted.org> Message-ID: <1636137120.24.0.0597846405882.issue45630@roundup.psfhosted.org> penguin_wwy <940375606 at qq.com> added the comment: I hope that this function can be used in the _PyEval_EvalFrameDefault(or other customized eval_frame), for example, after calling the _Py_Quicken to confirm whether the instruction is modified correctly https://github.com/python/cpython/pull/29243/files#diff-c22186367cbe20233e843261998dc027ae5f1f8c0d2e778abfa454ae74cc59de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:33:16 2021 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 05 Nov 2021 18:33:16 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636137196.54.0.304184012376.issue45512@roundup.psfhosted.org> Dong-hee Na added the comment: Hmm, now I understood what you intended, The code was hard to read without knowing the condition of the begin_statement. Would this be a trade-off in terms of code readability? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:38:11 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2021 18:38:11 +0000 Subject: [issue45699] AttributeError: 'list' object has no attribute 'find' In-Reply-To: <1635925743.59.0.349899416416.issue45699@roundup.psfhosted.org> Message-ID: <1636137491.02.0.528530023291.issue45699@roundup.psfhosted.org> ?ric Araujo added the comment: Also note that Python 3.6 only receives security updates now. Does your problem still happen with a current version? ---------- components: -Parser nosy: +eric.araujo status: open -> pending type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:46:59 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2021 18:46:59 +0000 Subject: [issue45729] "history and license" link has wrong target In-Reply-To: <1636128373.81.0.436284013167.issue45729@roundup.psfhosted.org> Message-ID: <1636138019.82.0.875512943693.issue45729@roundup.psfhosted.org> ?ric Araujo added the comment: It happens on all pages for all versions, because the link is empty. 3.8 doesn?t have that line so doesn?t show the bug. I am trying to find where that is defined. Strangely, I don?t find results looking for `please donate` which is the line below? ---------- nosy: +eric.araujo type: -> behavior versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:48:56 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 18:48:56 +0000 Subject: [issue45729] [doc] "history and license" link has wrong target In-Reply-To: <1636128373.81.0.436284013167.issue45729@roundup.psfhosted.org> Message-ID: <1636138136.57.0.688002586616.issue45729@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: "history and license" link has wrong target -> [doc] "history and license" link has wrong target _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 14:53:52 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 18:53:52 +0000 Subject: [issue45684] `functools.singledispatchmethod` does not define `__class_getitem__` In-Reply-To: <1635790981.47.0.0130236033988.issue45684@roundup.psfhosted.org> Message-ID: <1636138432.76.0.213636861247.issue45684@roundup.psfhosted.org> Alex Waygood added the comment: To clarify why this is an issue: It's probably quite improbable that anybody would ever need to use `singledispatchmethod` in a type annotation. But, if they do, they'll find themselves in an impossible situation if they're using mypy with the `--strict` setting. If you're using `--strict` (as I always do), mypy will complain if you leave unparameterised any class that is marked as a generic in typeshed. But if you try to parameterise `singledispatchmethod`, and you're not using `from __future__ import annotations`, your code will fail at runtime. It would be better if the cpython source were changed to add `__class_getitem__` to `singledispatchmethod`, rather than making the class no longer generic in typeshed. This is because being able to parameterise classes gives mypy much more information to work with, giving it the ability to provide far more fine-grained analysis of your code. Here is a minimal reproducible example of the error mypy will give: https://mypy-play.net/?mypy=latest&python=3.10&flags=show-error-codes%2Cstrict ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:02:56 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 05 Nov 2021 19:02:56 +0000 Subject: [issue45729] [doc] "history and license" link has wrong target In-Reply-To: <1636128373.81.0.436284013167.issue45729@roundup.psfhosted.org> Message-ID: <1636138976.17.0.772906934975.issue45729@roundup.psfhosted.org> ?ric Araujo added the comment: Tracked to https://github.com/python/python-docs-theme/issues/89 AlexWaygood: can I ask why add pseudo-tags to the title field when we do have structured data (components set to doc) on this tracker? Is it a new practice? ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:09:52 2021 From: report at bugs.python.org (Joef Huang) Date: Fri, 05 Nov 2021 19:09:52 +0000 Subject: [issue45730] ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform Message-ID: <1636139392.76.0.708373821493.issue45730@roundup.psfhosted.org> New submission from Joef Huang : We have been using this command to install Python to our container: RUN pip3 install -U pip && \ pip install wheel && \ pip wheel -w /tmp/wheels It started failing today with the following error: ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform. It turned out the install now downloads the cp39 wheel: 12:46:14 Collecting pyyaml>=3.12 12:46:14 Downloading PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (661 kB) When this worked a couple of days ago, the install downloaded a different wheel: 15:03:12 Collecting pyyaml>=3.12 15:03:12 Downloading PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (603 kB) Why does the python install download the cp39 wheel now? ---------- components: Installation messages: 405821 nosy: joefh priority: normal severity: normal status: open title: ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:14:33 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 05 Nov 2021 19:14:33 +0000 Subject: [issue45729] [doc] "history and license" link has wrong target In-Reply-To: <1636128373.81.0.436284013167.issue45729@roundup.psfhosted.org> Message-ID: <1636139673.81.0.686868292613.issue45729@roundup.psfhosted.org> Alex Waygood added the comment: @?ric: I personally found it difficult to immediately understand what the issue was about when reading only the title on the BPO homepage, and thought the change in title would help clarify, having seen other documentation issues marked similarly on the tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:44:31 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 19:44:31 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1636141471.93.0.752106432238.issue43158@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27687 status: pending -> open pull_request: https://github.com/python/cpython/pull/29433 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:46:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Nov 2021 19:46:29 +0000 Subject: [issue32291] Value error for string shared memory in multiprocessing In-Reply-To: <1513098036.37.0.213398074469.issue32291@psf.upfronthosting.co.za> Message-ID: <1636141589.38.0.817453848352.issue32291@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:47:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Nov 2021 19:47:06 +0000 Subject: [issue23449] Fatal errors rebuilding 3.5 from Visual Studio Windows 8.1 64 bit In-Reply-To: <1423696269.22.0.462965146464.issue23449@psf.upfronthosting.co.za> Message-ID: <1636141626.46.0.604154367606.issue23449@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:47:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Nov 2021 19:47:46 +0000 Subject: [issue22678] An OSError subclass for "no space left on device" would be nice: NoSpaceError In-Reply-To: <1413822435.2.0.235544061908.issue22678@psf.upfronthosting.co.za> Message-ID: <1636141666.53.0.370420247799.issue22678@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> rejected stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:48:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Nov 2021 19:48:49 +0000 Subject: [issue36281] OSError: handle is closed for ProcessPoolExecutor and run_in_executor In-Reply-To: <1552498582.24.0.716871849164.issue36281@roundup.psfhosted.org> Message-ID: <1636141729.53.0.024089257069.issue36281@roundup.psfhosted.org> Change by Irit Katriel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:49:05 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 19:49:05 +0000 Subject: [issue45730] ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform In-Reply-To: <1636139392.76.0.708373821493.issue45730@roundup.psfhosted.org> Message-ID: <1636141745.9.0.958253133115.issue45730@roundup.psfhosted.org> Christian Heimes added the comment: This is the wrong place to report bugs with third party packages or wheels. The Python bug tracker is only for core development. Please use one of the community channels to get assistance, https://www.python.org/community/ ---------- nosy: +christian.heimes resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:48:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Nov 2021 19:48:31 +0000 Subject: [issue24319] Crash during "make coverage-report" In-Reply-To: <1432832461.97.0.279218434752.issue24319@psf.upfronthosting.co.za> Message-ID: <1636141711.4.0.711307363791.issue24319@roundup.psfhosted.org> Irit Katriel added the comment: Please reopen or create a new issue if you see it on a current python version. ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:52:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Nov 2021 19:52:54 +0000 Subject: [issue45679] typing.Literal[True] is implicitly converted to typing.Literal[1] In-Reply-To: <1635608006.78.0.966278676499.issue45679@roundup.psfhosted.org> Message-ID: <1636141974.87.0.0991821754558.issue45679@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 60b5333fa936a7e7f078a82e0fa3752cc9b6c5fb by Nikita Sobolev in branch 'main': bpo-45679: add `tuple` tests with `lru_cache` to `test_functools` (GH-29339) https://github.com/python/cpython/commit/60b5333fa936a7e7f078a82e0fa3752cc9b6c5fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:55:46 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 19:55:46 +0000 Subject: [issue45731] Handle --enable-loadable-sqlite-extensions in configure Message-ID: <1636142146.47.0.904831540314.issue45731@roundup.psfhosted.org> New submission from Christian Heimes : The --enable-loadable-sqlite-extensions configure option is currently handled by a check in setup.py. The approach is incompatible with Modules/Setup and yields incorrect results for --enable-loadable-sqlite-extensions=no. Instead of reading the value from CONFIG_ARGS, configure should add an AC_DEFINE to pyconfig.h ---------- assignee: christian.heimes components: Build messages: 405826 nosy: christian.heimes priority: normal severity: normal status: open title: Handle --enable-loadable-sqlite-extensions in configure type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:53:30 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Nov 2021 19:53:30 +0000 Subject: [issue45701] Add tuple tests to `functools.lru_cache` In-Reply-To: <1635936448.66.0.888386290275.issue45701@roundup.psfhosted.org> Message-ID: <1636142010.76.0.387855251859.issue45701@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 15:59:17 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 19:59:17 +0000 Subject: [issue45731] Handle --enable-loadable-sqlite-extensions in configure In-Reply-To: <1636142146.47.0.904831540314.issue45731@roundup.psfhosted.org> Message-ID: <1636142357.6.0.676562158799.issue45731@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27688 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29434 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:08:42 2021 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Nov 2021 20:08:42 +0000 Subject: [issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing In-Reply-To: <1635535560.24.0.0921518602941.issue45675@roundup.psfhosted.org> Message-ID: <1636142922.14.0.599868940193.issue45675@roundup.psfhosted.org> Brett Cannon added the comment: FYI the long-term plan is to deprecate pkgutil, so I would use newer APIs as provided by importlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:22:08 2021 From: report at bugs.python.org (Joef Huang) Date: Fri, 05 Nov 2021 20:22:08 +0000 Subject: [issue45730] ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform In-Reply-To: <1636139392.76.0.708373821493.issue45730@roundup.psfhosted.org> Message-ID: <1636143728.14.0.234746964832.issue45730@roundup.psfhosted.org> Joef Huang added the comment: Thanks Christian. But why the python installer suddenly started using cp39 of the yaml wheel? It used to be using cp36 of the wheel which was working fine. Trying to gather more information so that I can talk to the 3rd party about this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:37:06 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 05 Nov 2021 20:37:06 +0000 Subject: [issue45731] Handle --enable-loadable-sqlite-extensions in configure In-Reply-To: <1636142146.47.0.904831540314.issue45731@roundup.psfhosted.org> Message-ID: <1636144626.3.0.92531583308.issue45731@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 16:51:34 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Nov 2021 20:51:34 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place In-Reply-To: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> Message-ID: <1636145494.34.0.403461910017.issue43158@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 9b0f45c069863517a24239da301a1bf1697ac2e7 by Christian Heimes in branch 'main': bpo-43158: Regenerate configure again (GH-29433) https://github.com/python/cpython/commit/9b0f45c069863517a24239da301a1bf1697ac2e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:26:11 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 05 Nov 2021 22:26:11 +0000 Subject: [issue45730] ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform In-Reply-To: <1636139392.76.0.708373821493.issue45730@roundup.psfhosted.org> Message-ID: <1636151171.87.0.021300396459.issue45730@roundup.psfhosted.org> Eric V. Smith added the comment: This is really a question for pip, which is a third party product (despite a version of it shipping with core python). You can find their issue tracker at https://pip.pypa.io/en/stable/ When reporting the bug there, you'll need to provide information about which python you're using, how you installed it, and which version of pip you're using. And probably also the verbose output from pip. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:30:55 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 05 Nov 2021 22:30:55 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636151455.54.0.904525327505.issue45720@roundup.psfhosted.org> Eryk Sun added the comment: > I also don't actually see gdi32 being transitively loaded as > claimed in the Twitter thread, even back to 3.8. So presumably > there's something else going on to cause that issue. Since Windows XP, shlwapi.dll has increasingly made use of delay loading, but up to Windows 8.1 it was still immediately loading user32.dll and gdi32.dll. In Windows 10, shlwapi.dll finally made them delay loaded dependencies. Also, in Windows 10, PathIsRelativeW is forwarded to the implementation in kernelbase.dll, not that it matters from the end user's perspective since it's not in an API set. Regarding user32.dll, there's still an issue with ssl, hashlib, winsound, and ctypes not delay loading it, or DLLs that directly depend on it such as ole32.dll and oleaut32.dll. In most use cases these DLLs would never be loaded. When user32.dll loads, the process and the loading thread are converted to GUI versions, i.e. they're extended in the kernel with the window manager's Win32Process and Win32Thread structures, and the process connects to a window station and desktop (e.g. r"WinSta0\Default"). One concern with converting to a GUI process is that the system doesn't send CTRL_LOGOFF_EVENT and CTRL_SHUTDOWN_EVENT console events to GUI processes. Thus a console script can't handle those events with a simple ctypes-based handler as long as importing ctypes always loads user32.dll. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 18:55:10 2021 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Nov 2021 22:55:10 +0000 Subject: [issue44828] tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves In-Reply-To: <1628076093.82.0.287740145135.issue44828@roundup.psfhosted.org> Message-ID: <1636152910.28.0.0839744239251.issue44828@roundup.psfhosted.org> Ned Deily added the comment: Thanks everyone, especially Marc! python.org macOS installers for 3.9.8, 3.10.0, and 3.11.0a2 with patched versions of Tk to avoid the filedialog problems on macOS 12 Monterey are now released and available for download. We can now close this issue and move on :) https://discuss.python.org/t/python-3-9-8-and-3-11-0a2-are-now-available/11763 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 19:06:49 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Nov 2021 23:06:49 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636153609.6.0.314572920992.issue45720@roundup.psfhosted.org> Steve Dower added the comment: New changeset a4774f42e35861c4bb16928cffb011c2d8a285ac by Steve Dower in branch 'main': bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417) https://github.com/python/cpython/commit/a4774f42e35861c4bb16928cffb011c2d8a285ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 19:12:30 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Nov 2021 23:12:30 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636153950.87.0.495022925529.issue45720@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27689 pull_request: https://github.com/python/cpython/pull/29435 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 19:15:21 2021 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Nov 2021 23:15:21 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 Message-ID: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> New submission from Ned Deily : https://sourceforge.net/p/tcl/mailman/message/37380142/ ---------- components: Build, Windows, macOS messages: 405834 nosy: ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Update python.org Windows and macOS installers to use Tk 8.6.12 versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:16:17 2021 From: report at bugs.python.org (Joef Huang) Date: Sat, 06 Nov 2021 00:16:17 +0000 Subject: [issue45730] ERROR: PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl is not a supported wheel on this platform In-Reply-To: <1636139392.76.0.708373821493.issue45730@roundup.psfhosted.org> Message-ID: <1636157777.94.0.534906334951.issue45730@roundup.psfhosted.org> Joef Huang added the comment: Thanks Eric. I created an issue in the pip repo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:25:37 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 00:25:37 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636158337.66.0.0785930973462.issue45720@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27690 pull_request: https://github.com/python/cpython/pull/29436 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 20:25:38 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 06 Nov 2021 00:25:38 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636158338.03.0.966449787819.issue45720@roundup.psfhosted.org> Steve Dower added the comment: New changeset 804ea41211b042fa20c3cd8c0457bbfa3873128a by Steve Dower in branch '3.10': bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417) https://github.com/python/cpython/commit/804ea41211b042fa20c3cd8c0457bbfa3873128a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:23:46 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2021 01:23:46 +0000 Subject: [issue45699] AttributeError: 'list' object has no attribute 'find' In-Reply-To: <1635925743.59.0.349899416416.issue45699@roundup.psfhosted.org> Message-ID: <1636161826.29.0.0347963485452.issue45699@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> not a bug stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:23:27 2021 From: report at bugs.python.org (John-Mark Gurney) Date: Sat, 06 Nov 2021 01:23:27 +0000 Subject: [issue45733] importlib.abc.Traversable.name does not match Message-ID: <1636161807.52.0.0427102935668.issue45733@roundup.psfhosted.org> New submission from John-Mark Gurney : The documentation for Traversable.name says it is a method, not a property: https://docs.python.org/3/library/importlib.html#importlib.abc.Traversable.name The issue is that with Python 3.9.7 (default, Nov 1 2021, 11:26:33), using a standard posix module (on MacOSX), it returns a string and not a method. I have not tested on newer versions, but expect similar issues. I have tagged the newer versions to get exposure, feel free to untag the versions that are confirmed to be unaffected by this bug. ``` $ python3.9 Python 3.9.7 (default, Nov 1 2021, 11:26:33) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import mod >>> ^D ``` This is with a module dir named `mod`, w/ an empty `res.txt` file, and the following in `__init__.py`: ``` from importlib import resources r = resources.files(__name__) / 'res.txt' print(repr(type(r.name))) ``` ---------- messages: 405837 nosy: jmg priority: normal severity: normal status: open title: importlib.abc.Traversable.name does not match type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:28:01 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2021 01:28:01 +0000 Subject: [issue45710] Junction/symbolic folder access error on Windows 11 In-Reply-To: <1636023477.57.0.826365620965.issue45710@roundup.psfhosted.org> Message-ID: <1636162081.36.0.64296109118.issue45710@roundup.psfhosted.org> Terry J. Reedy added the comment: Eryk, does this or does this not look to you like a bug in CPython? I don't know enough to tell. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:34:06 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2021 01:34:06 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636162446.2.0.82404217232.issue45711@roundup.psfhosted.org> Terry J. Reedy added the comment: Would there be any change at the Python level? ---------- nosy: +terry.reedy type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:39:50 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 06 Nov 2021 01:39:50 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636162790.5.0.126822081219.issue45720@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:39:02 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 06 Nov 2021 01:39:02 +0000 Subject: [issue45720] Remove shlwapi dependency on Windows In-Reply-To: <1636074265.43.0.608267631685.issue45720@roundup.psfhosted.org> Message-ID: <1636162742.43.0.321860241659.issue45720@roundup.psfhosted.org> Steve Dower added the comment: New changeset 5017306c8732b3ceda878db13088f8c2cf0c5e71 by Miss Islington (bot) in branch '3.9': bpo-45720: Drop references to shlwapi.dll on Windows (GH-29417) https://github.com/python/cpython/commit/5017306c8732b3ceda878db13088f8c2cf0c5e71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 21:53:58 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2021 01:53:58 +0000 Subject: [issue45721] Improve error message for OS command entered at >>> prompt In-Reply-To: <1636077220.31.0.800245298483.issue45721@roundup.psfhosted.org> Message-ID: <1636163638.35.0.941652349962.issue45721@roundup.psfhosted.org> Terry J. Reedy added the comment: Agreed. 'pip ...' not working is a recurring question on stackoverflow, usually from an IDLE user. 'python' is much rarer. Note that IDLE's shell may be a beginner's only exposure to the word 'shell'. The standard Windows shell is the Command Prompt console, so one has to say 'Command Prompt command'. Would 'bash command' work elsewhere? ---------- nosy: +pablogsal, terry.reedy title: Improve error message when python shell command is entered at the REPL prompt -> Improve error message for OS command entered at >>> prompt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:13:33 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2021 02:13:33 +0000 Subject: [issue45722] documentation missing information on objects in submodules In-Reply-To: <1636097541.32.0.940629899159.issue45722@roundup.psfhosted.org> Message-ID: <1636164813.22.0.816392983052.issue45722@roundup.psfhosted.org> Terry J. Reedy added the comment: https://docs.python.org/3/reference/import.html#submodules The point of the section is that even though the names 'for' and 'bar' are not directly importing into 'spam', they get attached to 'spam' any way as indirect effect of 'from'. 'Foo' and 'Bar are directly imported and so are also bound. How about "Executing the following puts a name binding to foo and bar (as well as Foo and Bar) in the spam module: >>> spam.Foo (This should be checked in case the .foo changes the report.) I think one example showing both foo and Foo would be enough. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 22:30:17 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Nov 2021 02:30:17 +0000 Subject: [issue45728] SharedMemory documentation: System V vs Posix In-Reply-To: <1636119976.18.0.141514451368.issue45728@roundup.psfhosted.org> Message-ID: <1636165817.48.0.121683715148.issue45728@roundup.psfhosted.org> Terry J. Reedy added the comment: 'System V' is in the first line of the second paragraph of https://docs.python.org/3/library/multiprocessing.shared_memory.html Davin, git blame says you wrote this in Feb 2019. ---------- nosy: +davin, pitrou, terry.reedy versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:25:02 2021 From: report at bugs.python.org (Skillovilla Official) Date: Sat, 06 Nov 2021 03:25:02 +0000 Subject: [issue45734] Data Science and Machine Learning Course Message-ID: <1636169102.83.0.727198950247.issue45734@roundup.psfhosted.org> New submission from Skillovilla Official : best data science courses , best data science courses online , data science beginners , data science certification , data science certification course, data science course fees , data science course with placement guarantee , data science full course, data science online classes, data science online course, data scientist course, data scientist course fees , https://www.skillovilla.com/tracks/data-science-and-machine-learning ---------- components: Build files: logo-thumbnail.png messages: 405844 nosy: skillovillaofficial priority: normal severity: normal status: open title: Data Science and Machine Learning Course type: performance versions: Python 3.9 Added file: https://bugs.python.org/file50427/logo-thumbnail.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:28:13 2021 From: report at bugs.python.org (Skillovilla Official) Date: Sat, 06 Nov 2021 03:28:13 +0000 Subject: [issue45734] Data Science and Machine Learning Course In-Reply-To: <1636169102.83.0.727198950247.issue45734@roundup.psfhosted.org> Message-ID: <1636169293.39.0.489013279306.issue45734@roundup.psfhosted.org> Skillovilla Official added the comment: - Data Science and Machine Learning Course Learn the syntactical application of python in data science. Get to grips with statistics, probability, and core mathematical concepts, which are the foundations of data science. - https://www.skillovilla.com/tracks/data-science-and-machine-learning ---------- Added file: https://bugs.python.org/file50428/logo-thumbnail.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:43:14 2021 From: report at bugs.python.org (Zachary Ware) Date: Sat, 06 Nov 2021 03:43:14 +0000 Subject: [issue45734] Spam In-Reply-To: <1636169102.83.0.727198950247.issue45734@roundup.psfhosted.org> Message-ID: <1636170194.29.0.981449896254.issue45734@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: -Build nosy: -skillovillaofficial resolution: -> not a bug stage: -> resolved status: open -> closed title: Data Science and Machine Learning Course -> Spam type: performance -> versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:43:31 2021 From: report at bugs.python.org (Zachary Ware) Date: Sat, 06 Nov 2021 03:43:31 +0000 Subject: [issue45734] Spam In-Reply-To: <1636169102.83.0.727198950247.issue45734@roundup.psfhosted.org> Message-ID: <1636170211.63.0.233143486382.issue45734@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg405845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:43:40 2021 From: report at bugs.python.org (Zachary Ware) Date: Sat, 06 Nov 2021 03:43:40 +0000 Subject: [issue45734] Spam Message-ID: <1636170220.01.0.29066715314.issue45734@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg405844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:43:52 2021 From: report at bugs.python.org (Zachary Ware) Date: Sat, 06 Nov 2021 03:43:52 +0000 Subject: [issue45734] Spam Message-ID: <1636170232.36.0.374861267171.issue45734@roundup.psfhosted.org> Change by Zachary Ware : Removed file: https://bugs.python.org/file50428/logo-thumbnail.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 5 23:44:01 2021 From: report at bugs.python.org (Zachary Ware) Date: Sat, 06 Nov 2021 03:44:01 +0000 Subject: [issue45734] Spam Message-ID: <1636170241.77.0.725346616522.issue45734@roundup.psfhosted.org> Change by Zachary Ware : Removed file: https://bugs.python.org/file50427/logo-thumbnail.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:02:01 2021 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Nov 2021 04:02:01 +0000 Subject: [issue45735] Promise that the long-time truth that `args=list` works Message-ID: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> New submission from Tim Peters : A number of contexts allow specifying a tuple of arguments to be passed later to a function. The Thread constructor is a fine example, and happened to come up (again! for me) here today: https://stackoverflow.com/questions/69858950/why-do-we-have-to-add-comma-in-args-in-python-multithreading/69859068 This often confuses especially newbies, because the function they intend to parallelize often takes only a single argument, and Python's syntax for a 1-element tuple actually _requires_ parentheses in the context of an argument list, with a naked trailing comma: t = threading.Thread(target=access, args=(thread_number,)) It "looks weird" to people. I'm not suggesting to change that, but instead to officially bless the workaround I've seen very often in real code: use a list instead. t = threading.Thread(target=access, args=[thread_number]) Nobody scratches their head over what that means. CPython's implementations typically couldn't care less what kind of sequence is used, and none that I'm aware of verify that it's specifically a tuple. The implementations just go on to do some simple variation of self.target(*self.args) Tuple or list makes no real difference. I'm not really keen to immortalize the "any sequence type whatsoever that just happens to work" implementation behavior, but am keen to promise that a list specifically will work. A lot of code already relies on it. ---------- assignee: docs at python components: Documentation keywords: easy messages: 405846 nosy: docs at python, tim.peters priority: low severity: normal stage: needs patch status: open title: Promise that the long-time truth that `args=list` works type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:02:32 2021 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Nov 2021 04:02:32 +0000 Subject: [issue45735] Promise the long-time truth that `args=list` works In-Reply-To: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> Message-ID: <1636171352.22.0.398044283442.issue45735@roundup.psfhosted.org> Change by Tim Peters : ---------- title: Promise that the long-time truth that `args=list` works -> Promise the long-time truth that `args=list` works _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 00:44:44 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Nov 2021 04:44:44 +0000 Subject: [issue45735] Promise the long-time truth that `args=list` works In-Reply-To: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> Message-ID: <1636173884.79.0.724586175578.issue45735@roundup.psfhosted.org> Raymond Hettinger added the comment: I relied on this for many years. So, yet it would be nice to guarantee it :-) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 01:01:09 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Nov 2021 05:01:09 +0000 Subject: [issue45735] Promise the long-time truth that `args=list` works In-Reply-To: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> Message-ID: <1636174869.37.0.26906476621.issue45735@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +27691 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 01:12:19 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Nov 2021 05:12:19 +0000 Subject: [issue45735] Promise the long-time truth that `args=list` works In-Reply-To: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> Message-ID: <1636175539.62.0.318330107968.issue45735@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg405847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 02:46:14 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 Nov 2021 06:46:14 +0000 Subject: [issue45710] Junction/symbolic folder access error on Windows 11 In-Reply-To: <1636023477.57.0.826365620965.issue45710@roundup.psfhosted.org> Message-ID: <1636181174.46.0.461041024612.issue45710@roundup.psfhosted.org> Eryk Sun added the comment: > does this or does this not look to you like a bug in CPython? It's better to leave the detailed explanation of limits up to the document that's referenced for further information [1], but this issue isn't even briefly mentioned there. Maybe it would help some people to mention the store package's [2] limitation on using reparse points in "%UserProfile%\AppData", but this is the first I've seen of this issue, and I hadn't even considered the problem beforehand. I don't see why it would ever be necessary to use a cross-volume reparse point in the application-data tree. Also, maybe this is a bug in the operation system that could get fixed in the future. It could be unintended behavior in the filesystem filter that virtualizes access to "%UserProfile%\AppData". Maybe someone used a target device hint as a convenience in the design, without thinking about how it would limit the resolution of reparse points. --- [1] https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes [2] https://docs.python.org/3.10/using/windows.html#the-microsoft-store-package ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 03:53:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 06 Nov 2021 07:53:27 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636185207.63.0.130387633845.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: Initially not, neither in python nor in the c api. It would be nice to replace PyErr_Fetch/Restore by a version that takes just an exception but that?s a long deprecation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 04:57:19 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 06 Nov 2021 08:57:19 +0000 Subject: [issue45684] `functools.singledispatchmethod` does not define `__class_getitem__` In-Reply-To: <1635790981.47.0.0130236033988.issue45684@roundup.psfhosted.org> Message-ID: <1636189039.29.0.240272439422.issue45684@roundup.psfhosted.org> Alex Waygood added the comment: ^ I posted the wrong link for the example; it should have been: https://mypy-play.net/?mypy=latest&python=3.10&flags=show-error-codes%2Cstrict&gist=6a26d31899f9803a823662261eae21df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:09:32 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Nov 2021 09:09:32 +0000 Subject: [issue45735] Promise the long-time truth that `args=list` works In-Reply-To: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> Message-ID: <1636189772.75.0.00468942057566.issue45735@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is a difference if you modify the arguments list after creating a thread. args = [1] t = threading.Thread(target=access, args=args) args[0] = 2 t.start() Would it call access(1) or access(2)? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:30:41 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Nov 2021 09:30:41 +0000 Subject: [issue45731] Handle --enable-loadable-sqlite-extensions in configure In-Reply-To: <1636142146.47.0.904831540314.issue45731@roundup.psfhosted.org> Message-ID: <1636191041.93.0.254605957644.issue45731@roundup.psfhosted.org> Christian Heimes added the comment: New changeset e9594f6747eaaaa848c26e2bf67d467aabfd62b3 by Christian Heimes in branch 'main': bpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434) https://github.com/python/cpython/commit/e9594f6747eaaaa848c26e2bf67d467aabfd62b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:30:54 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Nov 2021 09:30:54 +0000 Subject: [issue45731] Handle --enable-loadable-sqlite-extensions in configure In-Reply-To: <1636142146.47.0.904831540314.issue45731@roundup.psfhosted.org> Message-ID: <1636191054.01.0.871412477679.issue45731@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:39:09 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Nov 2021 09:39:09 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636191549.83.0.132890201118.issue45708@roundup.psfhosted.org> Mark Dickinson added the comment: Serhiy: this is not a duplicate of #43624. That issue is about underscores in the *fractional* part of a (float / complex / Decimal) number, and the changes to the formatting mini-language syntax that would be necessary to support that. This issue is simply about bringing Decimal into line with int and float and allowing inclusion of underscores in the *integral* part of the formatted result. Raymond: the "General Decimal Arithmetic" specification that the decimal module is based on isn't relevant here. It has nothing to say on the subject of formatting. We moved beyond the specification the moment we allowed `format(some_decimal, 'f')`, let alone `format(some_decimal, '.3f')` or `format(some_decimal, ',')`. As Sander Bollen noted, we've already added ","-form thousands separators to Decimal formatting. I can't see any good reason for supporting "," but not supporting "_" as a thousands separator for Decimal. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 05:49:54 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Nov 2021 09:49:54 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636192194.72.0.819915636527.issue45708@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: duplicate -> stage: resolved -> status: closed -> open superseder: Add underscore as a decimal separator for string formatting -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 06:34:21 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Sat, 06 Nov 2021 10:34:21 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636194861.16.0.434779234902.issue45708@roundup.psfhosted.org> Nikita Sobolev added the comment: > We do need to think about the implications of making local changes to our copy of the externally-maintained libmpdec library, though. It looks like quite similar changes have already been made: https://github.com/python/cpython/commit/298131a44896a4fec1ea829814ad52409d59aba5 I will send a PR, so we can see what exactly it touches / changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 06:42:22 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Nov 2021 10:42:22 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636195342.52.0.200717544045.issue45708@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +27692 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 06:44:41 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Nov 2021 10:44:41 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636195481.32.0.268140091438.issue45708@roundup.psfhosted.org> Mark Dickinson added the comment: > It looks like quite similar changes have already been made: Yes, I think this isn't something that needs to be resolved for this issue, but it is something we need to think about. (Though perhaps the resolution is just "Don't worry about it until we need to.") > I will send a PR, so we can see what exactly it touches / changes. Ah, sorry; I already made one before reading your message. I'd be happy to get your input on that PR, though. (Or to review a PR from you.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 06:56:28 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 06 Nov 2021 10:56:28 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636196188.18.0.365998622344.issue45392@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +27693 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:34:10 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 Nov 2021 11:34:10 +0000 Subject: [issue45719] SubProcess stdin.flush freezes when running python interpreter In-Reply-To: <1636072966.86.0.9507982269.issue45719@roundup.psfhosted.org> Message-ID: <1636198450.89.0.902779949252.issue45719@roundup.psfhosted.org> Eryk Sun added the comment: Interactive mode isn't automatically enabled when stdin isn't a tty, so the interpreter tries to read all of stdin, until the result is empty (i.e. EOF). You can force interactive mode with the -i command-line option. The example would also benefit from passing bufsize=0 to Popen, since full buffering on either the child side or parent side of the pipe prevents interactive I/O. Finally, input statements have to end with a newline character since the interpreter reads input in lines. Here's a toy example that interacts with a REPL in a child process. Note that spawn_repl() sets the sys.ps1 prompt in the child to a string that ends with a newline. This allows iterating over the lines in p.stdout up to the REPL prompt. Also, spawn_repl() forces UTF-8 mode in order to reliably support Unicode. Otherwise text support in Windows is limited to the ANSI code page. import subprocess def _write_input(p, input): if not input.endswith('\n'): input += '\n' p.stdin.write(input) def _read_output(p): lines = [] for line in p.stdout: if line.endswith(p._ps1): break lines.append(line) return lines def eval_remote(p, input): if not hasattr(p, '_ps1'): raise ValueError('p._ps1 prompt not defined; use p = spawn_repl()') _write_input(p, input) return _read_output(p) def spawn_repl(): p = subprocess.Popen( ['python', '-i', '-q', '-X utf8'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=0, encoding='utf-8') p._ps1 = f'\n' eval_remote(p, f'import sys; sys.ps1="\\n"') return p For example: >>> p = spawn_repl() >>> eval_remote(p, 'double = lambda x: 2 * x') [] >>> eval_remote(p, 'double(2)') ['4\n'] >>> eval_remote(p, 'print("spam\\neggs")') ['spam\n', 'eggs\n'] ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:50:26 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 06 Nov 2021 11:50:26 +0000 Subject: [issue45736] 2to3 does not support integer division fixing Message-ID: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> New submission from theeshallnotknowethme : Right now, 2to3 does not support integer division fixing. Supposing `test.py` is a file with these contents: x = 2 ** 8 / 5 / 7 Here's an example: C:\Users\admin> py -m lib2to3 test.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: No files need to be modified. ---------- components: 2to3 (2.x to 3.x conversion tool), Library (Lib) messages: 405857 nosy: February291948 priority: normal severity: normal status: open title: 2to3 does not support integer division fixing versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 07:54:42 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 06 Nov 2021 11:54:42 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636199682.62.0.659167287204.issue45736@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- keywords: +patch pull_requests: +27694 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 08:08:52 2021 From: report at bugs.python.org (Daniel) Date: Sat, 06 Nov 2021 12:08:52 +0000 Subject: [issue45737] assertLogs to optionally not disable existing handlers Message-ID: <1636200532.3.0.526903352151.issue45737@roundup.psfhosted.org> New submission from Daniel <3daniel at hotmail.com>: At the moment, assertLogs removes the handlers attached to the logger. In general this is good, because it reduces message spamming in the test logs. However, if the code being tested is relying on a handler to do something, then the test fails because the handler is being removed. This leads to the situation that the same exact test must be run twice: - first time within the context manager, to assert that specific messages were logged (using `with self.assertLogs()`) - second time, without the assertLogs to ensure the code that uses a handler does the right thing The proposal is to have `self.assertLogs()` accept a key word argument such as `keep_handlers=False`, which can be set to True, whenever the handlers should be preserved. It would probably be also useful to add a note in the documentation that makes users aware that the existing handlers will be removed. ---------- messages: 405858 nosy: dandiez priority: normal severity: normal status: open title: assertLogs to optionally not disable existing handlers versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 09:01:16 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Sat, 06 Nov 2021 13:01:16 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1636203676.05.0.731220047944.issue45615@roundup.psfhosted.org> Nikita Sobolev added the comment: Couple of thoughts. 1. You have to create quite complex structural "clone" of `Exception` for python-based `traceback`: ```python def test_non_exception_subtype(self): class RegularObject: __traceback__ = None __suppress_context__ = None __cause__ = None __context__ = None def __call__(self): return self # we need it for `get_exception` to work obj = RegularObject() try: 1 / 0 except Exception as ex: obj.__traceback__ = ex.__traceback__ err = self.get_report(obj, force=True) self.assertIn('1 / 0', err) # passes ``` Is it really worth it? 2. Removing `PyExceptionInstance_Check(value)` from https://github.com/python/cpython/blob/main/Modules/_testcapimodule.c#L3508-L3511 does not really help that much, because we still need to call `PyErr_Display` below. Which assumes `value` to be `Exception`. There's no correct way of calling `print_exception()` directly as far as I understand. It is only called in `print_exception_recursive`, which in its order is called from: - `print_chained` (called recursively from `print_exception_recursive`) - `_PyErr_Display` -> `PyErrDisplay` So, maybe instead we should change `print_exception` to not type check `value` again? Or we can cahnge some levels above. Like `PyErrDisplay`, it can return `TypeError` earlier if case `value` is invalid. What do you think? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 09:02:50 2021 From: report at bugs.python.org (Daniel) Date: Sat, 06 Nov 2021 13:02:50 +0000 Subject: [issue45737] assertLogs to optionally not disable existing handlers In-Reply-To: <1636200532.3.0.526903352151.issue45737@roundup.psfhosted.org> Message-ID: <1636203770.99.0.395996484303.issue45737@roundup.psfhosted.org> Change by Daniel <3daniel at hotmail.com>: ---------- components: +Library (Lib) versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 09:10:52 2021 From: report at bugs.python.org (PEW's Corner) Date: Sat, 06 Nov 2021 13:10:52 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation Message-ID: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> New submission from PEW's Corner : When exec'ing code with an illegal character after the line continuation character '\', python 3.11.0a2 raises this strange exception: SystemError: Negative size passed to PyUnicode_New Here's an example where '#' is the illegal character: exec('1,\\#\n2') I expected the following exception (which is raised by Python 3.10.0, and also by Python 3.11.0a2 when using eval instead of exec, or when the string content is put into its own file and run as a normal script): SyntaxError: unexpected character after line continuation character ---------- messages: 405860 nosy: pewscorner priority: normal severity: normal status: open title: 3.11 exec raises SystemError instead of SyntaxError on char after line continuation type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 09:34:41 2021 From: report at bugs.python.org (Daniel) Date: Sat, 06 Nov 2021 13:34:41 +0000 Subject: [issue45737] assertLogs to optionally not disable existing handlers In-Reply-To: <1636200532.3.0.526903352151.issue45737@roundup.psfhosted.org> Message-ID: <1636205681.7.0.439816057903.issue45737@roundup.psfhosted.org> Change by Daniel <3daniel at hotmail.com>: ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 09:51:18 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Nov 2021 13:51:18 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format Message-ID: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> New submission from Serhiy Storchaka : The C implementation supports both formats "n" and "N". The Python implementation only supports format "n". >>> from decimal import Decimal >>> format(Decimal('1e100'), 'n') '1e+100' >>> format(Decimal('1e100'), 'N') '1E+100' >>> from _pydecimal import Decimal >>> format(Decimal('1e100'), 'n') '1e+100' >>> format(Decimal('1e100'), 'N') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/_pydecimal.py", line 3766, in __format__ spec = _parse_format_specifier(specifier, _localeconv=_localeconv) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/_pydecimal.py", line 6194, in _parse_format_specifier raise ValueError("Invalid format specifier: " + format_spec) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: Invalid format specifier: N ---------- components: Library (Lib) messages: 405861 nosy: facundobatista, mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: The Python implementation of Decimal does not support the "N" format type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 10:26:00 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Nov 2021 14:26:00 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636208760.71.0.566553470009.issue45708@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 10:31:05 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 06 Nov 2021 14:31:05 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636209065.54.0.597355839352.issue45736@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 10:34:27 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 06 Nov 2021 14:34:27 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636209267.03.0.442964807446.issue45736@roundup.psfhosted.org> theeshallnotknowethme added the comment: When 2to3 supports integer division fixing, there would be this behaviour: - x = 2 ** 8 / 5 / 7 + x = 2 ** 8 // 5 // 7 Basically convert any integer division to floor division. The PR I made only works for constant integers, and any improvement would be appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:02:00 2021 From: report at bugs.python.org (Dutcho) Date: Sat, 06 Nov 2021 15:02:00 +0000 Subject: [issue45740] StrEnum entry doesn't mention its introduction in 3.11 Message-ID: <1636210920.1.0.557884718262.issue45740@roundup.psfhosted.org> New submission from Dutcho : At https://docs.python.org/3.11/library/enum.html#enum.StrEnum no mention is made of 'New in version 3.11', whereas e.g. https://docs.python.org/3.11/library/enum.html#enum.EnumCheck does. Note https://docs.python.org/3.11/library/enum.html#module-contents DOES document: 'New in version 3.11: StrEnum, EnumCheck, FlagBoundary'. ---------- assignee: docs at python components: Documentation messages: 405863 nosy: Dutcho, docs at python priority: normal severity: normal status: open title: StrEnum entry doesn't mention its introduction in 3.11 type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:07:51 2021 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Nov 2021 15:07:51 +0000 Subject: [issue45740] StrEnum entry doesn't mention its introduction in 3.11 In-Reply-To: <1636210920.1.0.557884718262.issue45740@roundup.psfhosted.org> Message-ID: <1636211271.47.0.889153057497.issue45740@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 11:39:25 2021 From: report at bugs.python.org (Michael Felt) Date: Sat, 06 Nov 2021 15:39:25 +0000 Subject: [issue35828] test_multiprocessing_fork: segmentation error in PyDict_GetItem on AIX In-Reply-To: <1548421607.34.0.921297585279.issue35828@roundup.psfhosted.org> Message-ID: <1636213165.94.0.268752463929.issue35828@roundup.psfhosted.org> Michael Felt added the comment: I stopped running my bot. I have no idea if this is also an issue on 3.9+ And since noone will look at this in it's present state. I'd recommend closing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:01:38 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Nov 2021 16:01:38 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636214498.24.0.00367292735975.issue45723@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27696 pull_request: https://github.com/python/cpython/pull/29441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:05:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Nov 2021 16:05:00 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636214700.72.0.890254151425.issue45723@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27697 pull_request: https://github.com/python/cpython/pull/29442 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:56:20 2021 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Nov 2021 16:56:20 +0000 Subject: [issue45740] StrEnum entry doesn't mention its introduction in 3.11 In-Reply-To: <1636210920.1.0.557884718262.issue45740@roundup.psfhosted.org> Message-ID: <1636217780.52.0.900482176023.issue45740@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +27698 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29443 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:57:44 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 16:57:44 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636217864.91.0.510141922332.issue45644@roundup.psfhosted.org> ?ukasz Langa added the comment: This is arguably a bugfix since truncating the `infile` cannot be construed as a useful feature in any sense. Thus I'm inclined to backport this to 3.10.1 and 3.9.9 too. ---------- nosy: +lukasz.langa type: enhancement -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:57:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 06 Nov 2021 16:57:12 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636217832.35.0.547805531468.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: GH-29441 introduces forward compatibility issues with autoconf 2.71. I took the output of autoupdate and resolved all warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 12:58:17 2021 From: report at bugs.python.org (Tim Peters) Date: Sat, 06 Nov 2021 16:58:17 +0000 Subject: [issue45735] Promise the long-time truth that `args=list` works In-Reply-To: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> Message-ID: <1636217897.75.0.735805262347.issue45735@roundup.psfhosted.org> Tim Peters added the comment: Serhiy, we haven't documented such stuff, and, indeed, I've been burned by it but much more often in the case of multiprocessing.Process. But note that I'm SWAPPING the order of your last two lines. In the original, you mutated the argument _before_ starting any parallel work, so "of course" the new worker will see the mutation: def access(xs): print(xs) args = ([1],) t = multiprocessing.Process(target=access, args=args) t.start() # start parallel work before mutating args[0][0] = 2 Does that print [1] or [2]? Passing a tuple in no way prevents mutations to mutable objects the tuple contains. When the docs are silent, "implementation defined" rules. Whether you use threading or multiprocessing in the altered example above, the result printed simply isn't defined - it's a race between the main thread doing the mutation and the "parallel part" accessing the mutated object. This is subtler in the multiprocessing context, though, because the relevant "parallel part" is really the hidden thread that pickles the argument list to send to the worker. That effectively makes a deep copy. But it's still a race, just not one visible from staring at the Python code. In the threading case, no copies are made. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 13:05:19 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 06 Nov 2021 17:05:19 +0000 Subject: [issue35828] test_multiprocessing_fork: segmentation error in PyDict_GetItem on AIX In-Reply-To: <1548421607.34.0.921297585279.issue35828@roundup.psfhosted.org> Message-ID: <1636218319.5.0.686687282415.issue35828@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 13:11:43 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 17:11:43 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636218703.83.0.208499921078.issue45644@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27699 pull_request: https://github.com/python/cpython/pull/29445 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 13:11:42 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 17:11:42 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636218702.94.0.0906540818743.issue45644@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 815dad42d53fc40a6dc057e067f4a8a885c3b858 by Chris Wesseling in branch 'main': bpo-45644: Make json.tool read infile before writing to outfile (GH-29273) https://github.com/python/cpython/commit/815dad42d53fc40a6dc057e067f4a8a885c3b858 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 13:11:49 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 17:11:49 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636218709.22.0.673712921569.issue45644@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27700 pull_request: https://github.com/python/cpython/pull/29446 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 13:16:50 2021 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Nov 2021 17:16:50 +0000 Subject: [issue45740] StrEnum entry doesn't mention its introduction in 3.11 In-Reply-To: <1636210920.1.0.557884718262.issue45740@roundup.psfhosted.org> Message-ID: <1636219010.66.0.654932815094.issue45740@roundup.psfhosted.org> Ethan Furman added the comment: New changeset cb755dba7a988f92a7d1cad48f3c27df18c9342d by Ethan Furman in branch 'main': bpo-45740: [Enum] add versionadded markers to docs (GH-29443) https://github.com/python/cpython/commit/cb755dba7a988f92a7d1cad48f3c27df18c9342d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 13:27:36 2021 From: report at bugs.python.org (Ethan Furman) Date: Sat, 06 Nov 2021 17:27:36 +0000 Subject: [issue45740] StrEnum entry doesn't mention its introduction in 3.11 In-Reply-To: <1636210920.1.0.557884718262.issue45740@roundup.psfhosted.org> Message-ID: <1636219656.18.0.344201045915.issue45740@roundup.psfhosted.org> Ethan Furman added the comment: Thanks! ---------- assignee: docs at python -> ethan.furman resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:00:56 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:00:56 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636221656.84.0.10766934595.issue45680@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 77a2c77c84d2ead2d19f96df862c119308e90071 by Alex Waygood in branch 'main': [doc] bpo-45680: Improve glossary entry for generic types (GH-29388) https://github.com/python/cpython/commit/77a2c77c84d2ead2d19f96df862c119308e90071 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:00:59 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 18:00:59 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636221659.24.0.39851381039.issue45680@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27702 pull_request: https://github.com/python/cpython/pull/29448 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:00:54 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 18:00:54 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636221654.93.0.392295540928.issue45680@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27701 pull_request: https://github.com/python/cpython/pull/29447 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:01:26 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:01:26 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636221686.99.0.0703923780556.issue45644@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 6603f6b5bdf0ed164bad4eb432619da2e95fb518 by Miss Islington (bot) in branch '3.10': bpo-45644: Make json.tool read infile before writing to outfile (GH-29273) (GH-29445) https://github.com/python/cpython/commit/6603f6b5bdf0ed164bad4eb432619da2e95fb518 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:01:53 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:01:53 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636221713.42.0.00850766250233.issue45644@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset a932631890d148444e5f9b09f4b57305475d6386 by Miss Islington (bot) in branch '3.9': bpo-45644: Make json.tool read infile before writing to outfile (GH-29273) (GH-29446) https://github.com/python/cpython/commit/a932631890d148444e5f9b09f4b57305475d6386 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:02:21 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:02:21 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636221741.14.0.421957630208.issue45644@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Chris! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:08:48 2021 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9s_Delfino?=) Date: Sat, 06 Nov 2021 18:08:48 +0000 Subject: [issue39452] Improve the __main__ module documentation In-Reply-To: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org> Message-ID: <1636222128.91.0.828448848053.issue39452@roundup.psfhosted.org> Change by Andr?s Delfino : ---------- nosy: +adelfino nosy_count: 11.0 -> 12.0 pull_requests: +27703 pull_request: https://github.com/python/cpython/pull/29379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:09:26 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:09:26 +0000 Subject: [issue39452] Improve the __main__ module documentation In-Reply-To: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org> Message-ID: <1636222166.83.0.842162635247.issue39452@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 57457a1e5caf714034a75fe4f382b8b669ce6ed8 by Andre Delfino in branch 'main': bpo-39452: [doc] Change "must" to "can" on relative import style in `__main__` (GH-29379) https://github.com/python/cpython/commit/57457a1e5caf714034a75fe4f382b8b669ce6ed8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:09:31 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 18:09:31 +0000 Subject: [issue39452] Improve the __main__ module documentation In-Reply-To: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org> Message-ID: <1636222171.05.0.190982518197.issue39452@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27704 pull_request: https://github.com/python/cpython/pull/29449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:21:43 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:21:43 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636222903.96.0.921106127488.issue45680@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 494f8da741054e5bab33f23f3961400ea5778235 by Miss Islington (bot) in branch '3.10': [doc] bpo-45680: Improve glossary entry for generic types (GH-29388) (GH-29447) https://github.com/python/cpython/commit/494f8da741054e5bab33f23f3961400ea5778235 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:50:09 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:50:09 +0000 Subject: [issue39452] Improve the __main__ module documentation In-Reply-To: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org> Message-ID: <1636224609.26.0.469914817043.issue39452@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e53cb9811f97ded5a20872fe0f3486bc7f8f1b6e by Miss Islington (bot) in branch '3.10': bpo-39452: [doc] Change "must" to "can" on relative import style in `__main__` (GH-29379) (GH-29449) https://github.com/python/cpython/commit/e53cb9811f97ded5a20872fe0f3486bc7f8f1b6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 14:50:22 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 18:50:22 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636224622.66.0.944481779876.issue45680@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 643f50ca5e9e12a4d8269ddc8baf2279d8608745 by Miss Islington (bot) in branch '3.9': [doc] bpo-45680: Improve glossary entry for generic types (GH-29388) (GH-29448) https://github.com/python/cpython/commit/643f50ca5e9e12a4d8269ddc8baf2279d8608745 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:01:47 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 19:01:47 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636225307.63.0.2780487333.issue27313@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset cc1cbcbb2d75cacc31ff3359d83043bc7bd5a89d by Serhiy Storchaka in branch 'main': bpo-27313: Use non-deprecated methods for tracing (GH-29425) https://github.com/python/cpython/commit/cc1cbcbb2d75cacc31ff3359d83043bc7bd5a89d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:01:57 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 19:01:57 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636225317.85.0.693139002553.issue27313@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27705 pull_request: https://github.com/python/cpython/pull/29450 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:02:00 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 19:02:00 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636225320.59.0.933359028141.issue27313@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27706 pull_request: https://github.com/python/cpython/pull/29451 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:08:04 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 19:08:04 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636225684.1.0.488074298529.issue45392@roundup.psfhosted.org> ?ukasz Langa added the comment: It's unclear what the original comment was about. BPO-20189 is somewhat cryptic to me too. `inspect.signature` never supported `type`, `round`, `int`, and so on. I checked 3.4.10 and 3.5.10 and in each case it looks like this: >>> inspect.signature(type) Traceback (most recent call last): ... ValueError: no signature found for builtin In fact, there's open issues on that, like BPO-44618. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:08:52 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 19:08:52 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636225732.4.0.490494797355.issue45392@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27707 pull_request: https://github.com/python/cpython/pull/29452 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:08:51 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 19:08:51 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636225731.87.0.124054179342.issue45392@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 91275207296c39e495fe118019a757c4ddefede8 by Mark Dickinson in branch 'main': bpo-45392: Update the docstring of the 'type' built-in (GH-29439) https://github.com/python/cpython/commit/91275207296c39e495fe118019a757c4ddefede8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:08:56 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 06 Nov 2021 19:08:56 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636225736.56.0.638458426934.issue45392@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27708 pull_request: https://github.com/python/cpython/pull/29453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:23:04 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 19:23:04 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636226584.8.0.515093116654.issue27313@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 8fdf6c64d3e0183c21f069d31d350a907ce42708 by Miss Islington (bot) in branch '3.10': bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29450) https://github.com/python/cpython/commit/8fdf6c64d3e0183c21f069d31d350a907ce42708 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:23:32 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 19:23:32 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1636226612.26.0.84446171947.issue27313@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 376218e1c65c029c24e45ca408a14f681cf1aeae by Miss Islington (bot) in branch '3.9': bpo-27313: Use non-deprecated methods for tracing (GH-29425) (GH-29451) https://github.com/python/cpython/commit/376218e1c65c029c24e45ca408a14f681cf1aeae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 15:47:02 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 06 Nov 2021 19:47:02 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636228022.19.0.590878016036.issue45736@roundup.psfhosted.org> Eric V. Smith added the comment: I think knowing that that's integer division is beyond what 2to3 can accomplish. Plus, with lib2to3 being deprecated, I don't think anyone's going to put any effort into this. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:18:07 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 20:18:07 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636229887.97.0.506614166333.issue45392@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset f5287ecd59d83a662490f89188a0fc2ef3718f8b by Miss Islington (bot) in branch '3.9': bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29453) https://github.com/python/cpython/commit/f5287ecd59d83a662490f89188a0fc2ef3718f8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:21:12 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 20:21:12 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636230072.7.0.563683303768.issue45392@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 045f205ba4710c4c633364a4e2e098483af936e5 by Miss Islington (bot) in branch '3.10': bpo-45392: Update the docstring of the 'type' built-in (GH-29439) (GH-29452) https://github.com/python/cpython/commit/045f205ba4710c4c633364a4e2e098483af936e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 16:21:56 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 06 Nov 2021 20:21:56 +0000 Subject: [issue45392] docstring of "type" could use an update In-Reply-To: <1633528499.41.0.143485330537.issue45392@roundup.psfhosted.org> Message-ID: <1636230116.9.0.577112892778.issue45392@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Mark! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 18:58:18 2021 From: report at bugs.python.org (Rafael Fontenelle) Date: Sat, 06 Nov 2021 22:58:18 +0000 Subject: [issue44010] IDLE: highlight soft keywords In-Reply-To: <1619968726.44.0.898029339856.issue44010@roundup.psfhosted.org> Message-ID: <1636239498.77.0.242261077439.issue44010@roundup.psfhosted.org> Change by Rafael Fontenelle : ---------- nosy: +rffontenelle nosy_count: 5.0 -> 6.0 pull_requests: +27709 pull_request: https://github.com/python/cpython/pull/29454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 19:05:18 2021 From: report at bugs.python.org (Rafael Fontenelle) Date: Sat, 06 Nov 2021 23:05:18 +0000 Subject: [issue45741] entry points singular? Message-ID: <1636239918.89.0.442271633024.issue45741@roundup.psfhosted.org> New submission from Rafael Fontenelle : whatsnew/3.10 on importlib.metadata has the following paragraph: "importlib.metadata entry points now provides a nicer experience for selecting entry points by group and name through a new importlib.metadata.EntryPoints class. See the Compatibility Note in the docs for more info on the deprecation and usage." In the above paragraph should "provides" -> "provide", or "entry points" is somehow considered singular? [1] https://docs.python.org/pt-br/3/whatsnew/3.10.html#importlib-metadata ---------- assignee: docs at python components: Documentation messages: 405888 nosy: docs at python, rffontenelle priority: normal severity: normal status: open title: entry points singular? versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 19:09:58 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 06 Nov 2021 23:09:58 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636240198.4.0.781496338948.issue45736@roundup.psfhosted.org> theeshallnotknowethme added the comment: I have put some effort to make it work for constant integers. So this x = a ** 3 / 7 would not be changed, since it refers to a name whose value is not known. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 20:34:59 2021 From: report at bugs.python.org (anadius) Date: Sun, 07 Nov 2021 00:34:59 +0000 Subject: [issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT In-Reply-To: <1620375535.4.0.206636353999.issue44067@roundup.psfhosted.org> Message-ID: <1636245299.02.0.124754659201.issue44067@roundup.psfhosted.org> Change by anadius : ---------- nosy: +alanmcintyre, serhiy.storchaka, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 21:55:05 2021 From: report at bugs.python.org (Jack DeVries) Date: Sun, 07 Nov 2021 01:55:05 +0000 Subject: [issue19217] Calling assertEquals for moderately long list takes too long In-Reply-To: <1381410286.72.0.514206486634.issue19217@psf.upfronthosting.co.za> Message-ID: <1636250105.65.0.281477347146.issue19217@roundup.psfhosted.org> Jack DeVries added the comment: Hey all, I'm putting a ping on this issue. I think my fix is ready to merge, see GH-27434. Thanks for all the feedback on the PR so far! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 23:10:01 2021 From: report at bugs.python.org (jiahua wang) Date: Sun, 07 Nov 2021 03:10:01 +0000 Subject: [issue45742] python -h can't find -R option Message-ID: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> New submission from jiahua wang : I input python -h on the command line, and I can't find any -R option. ---------- assignee: docs at python components: Documentation messages: 405891 nosy: 180909, docs at python priority: normal severity: normal status: open title: python -h can't find -R option versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 23:46:11 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sun, 07 Nov 2021 03:46:11 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636256771.09.0.0541652811146.issue45736@roundup.psfhosted.org> theeshallnotknowethme added the comment: A correction to the discussion: The PR I made only fixes CONSTANT integer division, not any other. The left and right operands are checked for non-constants and then are checked for integerness (specifically checks for `NOT A FLOAT`s). After both checks have passed, the division operator is turned into a floor division operator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 23:51:55 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Nov 2021 03:51:55 +0000 Subject: [issue45737] assertLogs to optionally not disable existing handlers In-Reply-To: <1636200532.3.0.526903352151.issue45737@roundup.psfhosted.org> Message-ID: <1636257115.97.0.914308648974.issue45737@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 23:53:03 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sun, 07 Nov 2021 03:53:03 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636257183.05.0.87014861378.issue45736@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 6 23:53:16 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sun, 07 Nov 2021 03:53:16 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1636257196.27.0.764050656229.issue45736@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- versions: -Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 02:12:34 2021 From: report at bugs.python.org (Martin) Date: Sun, 07 Nov 2021 07:12:34 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636269154.77.0.501464488201.issue43656@roundup.psfhosted.org> Martin added the comment: Could the participants of this issue please have a look at my pull request: https://github.com/python/cpython/pull/29299 What do you like, what don't you like? Does it work for your use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 02:25:27 2021 From: report at bugs.python.org (Martin) Date: Sun, 07 Nov 2021 07:25:27 +0000 Subject: [issue41544] multiprocessing.dummy.Process lacks daemon parameter In-Reply-To: <1597352913.9.0.790175794398.issue41544@roundup.psfhosted.org> Message-ID: <1636269927.87.0.371294899821.issue41544@roundup.psfhosted.org> Change by Martin : ---------- nosy: +davin, pitrou type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 03:00:41 2021 From: report at bugs.python.org (Martin) Date: Sun, 07 Nov 2021 08:00:41 +0000 Subject: [issue41544] multiprocessing.dummy.Process lacks daemon parameter In-Reply-To: <1597352913.9.0.790175794398.issue41544@roundup.psfhosted.org> Message-ID: <1636272041.36.0.963127283871.issue41544@roundup.psfhosted.org> Martin added the comment: Could someone have a look at my pull request? I have trouble with the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 04:27:32 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2021 09:27:32 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636277252.8.0.708397671958.issue45708@roundup.psfhosted.org> Mark Dickinson added the comment: Christian Heimes pointed out in the PR discussion that we can't simply modify libmpdec, since some vendors unbundle the mpdecimal library. So some options are: 0. Do nothing. 1. Request that this feature to be added upstream, so that it eventually makes its way into core Python. 2. Bypass mpd_parse_fmt_str and do our own format string parsing in _decimal.c (e.g., by copying and adapting the code in mpdecimal). 3. Wrap mpd_parse_fmt_str and do our own pre- and post- processing in _decimal.c (pre-process to convert "_" to "," in the format string, then post-process the formatted string to convert "," back to "_"). Option 2 makes sense to me from the point of view of separation of concerns: libmpdec aims to implement Cowlishaw's specification, and formatting lies outside of that specification. The decimal specification is pretty much set in stone, but the formatting mini-language could change again in the future, and when that happens we should be able to update the CPython code accordingly. (This brings to mind Robert Martin's Single Responsibility Principle: "Gather together those things that change for the same reason, and separate those things that change for different reasons.") I've updated the PR (and turned it into a draft) to show what option 2 looks like. The duplication is a little ugly. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 05:18:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Nov 2021 10:18:49 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636280329.04.0.211471483908.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset be3cd5c05d9fb1d1cdb55cb98ca6ef8f866774be by Christian Heimes in branch 'main': bpo-45723: Detect missing pkg-config (GH-29442) https://github.com/python/cpython/commit/be3cd5c05d9fb1d1cdb55cb98ca6ef8f866774be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 05:37:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 07 Nov 2021 10:37:25 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1636281445.58.0.811691589093.issue45615@roundup.psfhosted.org> Irit Katriel added the comment: 1. I don't think we need such a clone of exception. We just need something like these two tests: @cpython_only def test_print_exception_bad_type_ct(self): with self.assertRaises(TypeError): from _testcapi import exception_print exception_print(42) def test_print_exception_bad_type_python(self): with self.assertRaises(TypeError): traceback.print_exception(42) It could be that they don't fit in BaseExceptionReportingTests because that is for tests that use get_report. It's fine of they are added separately. The python one can come after test_exception_is_None, and the C one perhaps after test_unhashable (and their names should be slightly different than above). 2. _testcapi is how you call into print_exception directly (for testing). If I remove the type check in _testcapi then the test above segfaults with Assertion failed: (PyExceptionInstance_Check(exc)), function _PyBaseExceptionObject_cast, file exceptions.c, line 321. This issue was created because Erlend found that the type check in print_exception is not covered by tests. It's possible that this check is in the wrong place at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 05:46:57 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Nov 2021 10:46:57 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1636282017.48.0.584355218376.issue45739@roundup.psfhosted.org> Mark Dickinson added the comment: Interesting. I think the behaviour of the Python implementation behaviour is actually more correct here: neither `int` nor `float` supports 'N', and I'm not seeing any indication in tests or documentation that 'N' should be supported. So is this a bug in libmpdec, or a missing feature in the Python implementation? (Either way, it's definitely a bug that the two aren't aligned.) >>> format(123, 'n') '123' >>> format(123, 'N') Traceback (most recent call last): File "", line 1, in ValueError: Unknown format code 'N' for object of type 'int' ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 05:54:09 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Sun, 07 Nov 2021 10:54:09 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1636281445.58.0.811691589093.issue45615@roundup.psfhosted.org> Message-ID: Nikita Sobolev added the comment: 1. Thanks! Yes, this is exactly the case I am talking about. Right now, this test won't pass: ``` def test_print_exception_bad_type_python(self): with self.assertRaises(TypeError): traceback.print_exception(42) ``` Why? Because we don't type check the argument to be `Exception` subtype. It fails with `AttributeError`. And my question is more like: should we? I have several opposing thoughts: - Most likely it is always used with `Exception`. I am pretty sure that re-implementing exceptions is not something you would do. And it will be in sync with C code. - But, on the other hand, it is a breaking change. ??, 7 ????. 2021 ?. ? 13:37, Irit Katriel : > > Irit Katriel added the comment: > > 1. I don't think we need such a clone of exception. We just need something > like these two tests: > > @cpython_only > def test_print_exception_bad_type_ct(self): > with self.assertRaises(TypeError): > from _testcapi import exception_print > exception_print(42) > > def test_print_exception_bad_type_python(self): > with self.assertRaises(TypeError): > traceback.print_exception(42) > > It could be that they don't fit in BaseExceptionReportingTests because > that is for tests that use get_report. It's fine of they are added > separately. The python one can come after test_exception_is_None, and the C > one perhaps after test_unhashable (and their names should be slightly > different than above). > > > 2. _testcapi is how you call into print_exception directly (for testing). > If I remove the type check in _testcapi then the test above segfaults with > > Assertion failed: (PyExceptionInstance_Check(exc)), function > _PyBaseExceptionObject_cast, file exceptions.c, line 321. > > > This issue was created because Erlend found that the type check in > print_exception is not covered by tests. It's possible that this check is > in the wrong place at the moment. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 06:06:22 2021 From: report at bugs.python.org (Spencer Brown) Date: Sun, 07 Nov 2021 11:06:22 +0000 Subject: [issue42369] Reading ZipFile not thread-safe In-Reply-To: <1605524871.74.0.395089652548.issue42369@roundup.psfhosted.org> Message-ID: <1636283182.81.0.0112026816729.issue42369@roundup.psfhosted.org> Change by Spencer Brown : ---------- nosy: +Spencer Brown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 06:15:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 07 Nov 2021 11:15:11 +0000 Subject: [issue45615] Missing test for type of error when printing traceback for non-exception In-Reply-To: <1635261430.95.0.190322958386.issue45615@roundup.psfhosted.org> Message-ID: <1636283711.94.0.572333197191.issue45615@roundup.psfhosted.org> Irit Katriel added the comment: I see what you mean. I think it's ok in traceback.py to reject an exception clone which is not an instance of BaseException. I agree this should not be backported. You could make that explicit by adding a few words to this sentence in the doc, to make it about the exc value as well as the traceback: "The module uses traceback objects ? this is the object type that is stored in the sys.last_traceback variable and returned as the third item from sys.exc_info()." (https://docs.python.org/3/library/traceback.html) The C code fix doesn't need to be backported either - this issue is not something a user had a problem with, we found it through test coverage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 06:35:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 07 Nov 2021 11:35:26 +0000 Subject: [issue45724] Segmentation fault In-Reply-To: <1636111133.22.0.130315009164.issue45724@roundup.psfhosted.org> Message-ID: <1636284926.39.0.0311016361861.issue45724@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 07:38:47 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 07 Nov 2021 12:38:47 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1636288727.89.0.572517074074.issue45739@roundup.psfhosted.org> Eric V. Smith added the comment: I don?t think ?N? should be supported. It was never the intention to have it work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 08:19:38 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 07 Nov 2021 13:19:38 +0000 Subject: [issue45741] entry points singular? In-Reply-To: <1636239918.89.0.442271633024.issue45741@roundup.psfhosted.org> Message-ID: <1636291178.37.0.495687667052.issue45741@roundup.psfhosted.org> Eric V. Smith added the comment: I think ?provide? would be better. ---------- keywords: +easy nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 08:48:49 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 Nov 2021 13:48:49 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636292929.46.0.399386691948.issue45742@roundup.psfhosted.org> Eryk Sun added the comment: Apparently -R is still implemented in Python 3, even though hash randomization is enabled by default now. Unlike Python 2, in Python 3 -R overrides the PYTHONHASHSEED environment variable, making it effectively the same as "PYTHONHASHSEED=random". For example: Python 2.7.18 $ PYTHONHASHSEED=37 python2 >>> import sys; sys.flags.hash_randomization 37 >>> hash('spam') -3063226141675644153 $ PYTHONHASHSEED=37 python2 -R >>> import sys; sys.flags.hash_randomization 37 >>> hash('spam') -3063226141675644153 Python 3.11 $ PYTHONHASHSEED=37 python3 -q >>> import sys; sys.flags.hash_randomization 1 >>> hash('spam') 7085596773562191897 $ PYTHONHASHSEED=37 python3 -q >>> hash('spam') 7085596773562191897 $ PYTHONHASHSEED=37 python3 -qR >>> import sys; sys.flags.hash_randomization 1 >>> hash('spam') -6544739063919843911 $ PYTHONHASHSEED=37 python3 -qR >>> hash('spam') 5363435507110042548 Python 3 no longer reports the seed value in sys.flags.hash_randomization, so I repeated the 3.11 examples twice to show that PYTHONHASHSEED works, except when -R overrides it. ---------- nosy: +eryksun -180909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 08:52:05 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 Nov 2021 13:52:05 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636293125.12.0.0696395934589.issue45742@roundup.psfhosted.org> Change by Eryk Sun : ---------- versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 08:55:54 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 Nov 2021 13:55:54 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636293354.85.0.888813755146.issue45742@roundup.psfhosted.org> Eryk Sun added the comment: Either the documentation [1] or the behavior needs to be fixed. The following statement is false: Turn on hash randomization. This option only has an effect if the PYTHONHASHSEED environment variable is set to 0, since hash randomization is enabled by default. --- [1] https://docs.python.org/3.10/using/cmdline.html#cmdoption-R ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 09:06:21 2021 From: report at bugs.python.org (Fabio Storino) Date: Sun, 07 Nov 2021 14:06:21 +0000 Subject: [issue45710] Junction/symbolic folder access error on Windows 11 In-Reply-To: <1636023477.57.0.826365620965.issue45710@roundup.psfhosted.org> Message-ID: <1636293981.49.0.0651861391541.issue45710@roundup.psfhosted.org> Fabio Storino added the comment: Hello, Eryk. Just to let you know that a regular Python installation was able to access my junction folder in AppData and run scripts there. Thank you for the information on how store apps handle reads/writes in the AppData folder. This is my first bug report. Should I mark this issue as closed? ---------- resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 09:24:54 2021 From: report at bugs.python.org (rindeal) Date: Sun, 07 Nov 2021 14:24:54 +0000 Subject: [issue43073] Adding a ctypes.Union to a ctypes.BigEndianStructure results in an error In-Reply-To: <1611981538.61.0.504435630016.issue43073@roundup.psfhosted.org> Message-ID: <1636295094.18.0.893080044198.issue43073@roundup.psfhosted.org> rindeal added the comment: I have created a workaround, since it might take years to fix this in master. Hope it'll come in useful. For the example in https://bugs.python.org/issue43073#msg385970, but probably any combination of Unions and BigEndianStructures can be constructed this way. ``` class U_a(ct.BigEndianStructure): _pack_ = True _fields_ = [('a', ct.c_int)] class U_b(ct.BigEndianStructure): _pack_ = True _fields_ = [('b', ct.c_int)] class U(ct.Union): _pack_ = True _fields_ = [ ('_a', U_a), ('_b', U_b), ] _anonymous_ = ['_a', '_b'] class _S_be_fields_only(ct.Structure): _pack_ = True _fields_ = [ ('_x', ct.c_int), ('y', U), ] class _S_2be_fields_only(ct.BigEndianStructure): _pack_ = True _fields_ = [ ('x', ct.c_int), ('_y', ct.c_byte * ct.sizeof(U)), ] class _S_U(ct.Union): _pack_ = True _fields_ = [ ('_be_fields_only', _S_be_fields_only), ('_2be_fields_only', _S_2be_fields_only), ] _anonymous_ = [f[0] for f in _fields_] class S(ct.Structure): _pack_ = True _fields_ = [('_s_u', _S_U)] _anonymous_ = [_fields_[0][0]] issubclass(S, ct.Structure) == True s = S(x=0x11223344, y=U(a=0xaabbccdd)) s.y.a == s.y.b bytes(s).hex() == "11223344aabbccdd" ``` ---------- nosy: +rindeal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:29:51 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 07 Nov 2021 16:29:51 +0000 Subject: [issue45708] PEP 515-style formatting with underscores does not seem to work for Decimal In-Reply-To: <1636016474.79.0.0748645326286.issue45708@roundup.psfhosted.org> Message-ID: <1636302591.07.0.103076655407.issue45708@roundup.psfhosted.org> Eric V. Smith added the comment: I think your option 2 makes the most sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:37:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Nov 2021 16:37:24 +0000 Subject: [issue45743] Cleanup and simplify setup.py Message-ID: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> New submission from Christian Heimes : Motivated by deprecation of distutils, I like to move more logic and checks from setup.py into configure.ac. Eventually I like to get rid of setup.py. The file contains a bunch of complicated checks and macOS-specific adjustments that I cannot verify on Linux. 1) socketmodule setup defines __APPLE_USE_RFC_3542 https://github.com/python/cpython/blob/v3.11.0a2/setup.py#L1229 Can we move the define into the __APPLE__ block of socketmodule.c? 2) -Wl,-search_paths_first linker arg, e.g. https://github.com/python/cpython/blob/v3.11.0a2/setup.py#L1616 Would it be safe to make the option default for all core extensions on $ac_sys_system = Darwin? We could add it to PY_CORE_LDFLAGS or add a new Makefile variable for core extensions. 3) detect_dbm_gdbm has about 200 lines of complicated code to detect old to ancient versions of Berkeley DB (libdb), https://github.com/python/cpython/blob/v3.11.0a2/setup.py#L1233 . Can I remove support for libdb-3 / libdb-4 and only support libdb-5 in standard locations? libdb-5.3 has been around for over a decade. Note: libdb, gdbm, ndbm, and gdbm-compat don't provide pkg-config .pc files. We cannot use pkg-config to detect them. 4) sqlite's setup https://github.com/python/cpython/blob/v3.11.0a2/setup.py#L1531 does extra work to search for header and library files in non-standard locations. Can we replace the code with pkg-config checks in configure.ac with a fallback to AC_CHECK_LIB() and AC_CHECK_HEADERS()? 5) zlib's setup code https://github.com/python/cpython/blob/v3.11.0a2/setup.py#L1661 has a check for a CVE from 2002 (!). I think we can safely assume that everybody has upgraded to a fixed version. The check is mixed with macOS specific code. ---------- components: Build, macOS messages: 405908 nosy: christian.heimes, gregory.p.smith, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Cleanup and simplify setup.py type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:47:47 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 07 Nov 2021 16:47:47 +0000 Subject: [issue45710] Junction/symbolic folder access error on Windows 11 In-Reply-To: <1636023477.57.0.826365620965.issue45710@roundup.psfhosted.org> Message-ID: <1636303667.06.0.376652140014.issue45710@roundup.psfhosted.org> Eryk Sun added the comment: All we can do here is document the store app's limitation on cross-volume reparse points (junctions, symlinks) in "%UserProfile%\AppData". I suppose it's a rare enough problem that it can just be closed as a third-party issue. ---------- resolution: works for me -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:56:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Nov 2021 16:56:35 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636304195.21.0.820798306057.issue45743@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch, patch pull_requests: +27710, 27711 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29456 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 11:56:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Nov 2021 16:56:35 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636304195.13.0.677737588866.issue45743@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27710 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29456 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 12:35:14 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Nov 2021 17:35:14 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636306514.1.0.177891359399.issue45743@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27712 pull_request: https://github.com/python/cpython/pull/29457 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 13:37:03 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 07 Nov 2021 18:37:03 +0000 Subject: [issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method In-Reply-To: <1414045283.61.0.401738994501.issue22708@psf.upfronthosting.co.za> Message-ID: <1636310223.87.0.725367461464.issue22708@roundup.psfhosted.org> Change by ?ric Araujo : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 14:31:22 2021 From: report at bugs.python.org (Abdur-rahmaan Janhangeer) Date: Sun, 07 Nov 2021 19:31:22 +0000 Subject: [issue45744] Fix Flawfinder C Errors Message-ID: <1636313482.78.0.504082429267.issue45744@roundup.psfhosted.org> New submission from Abdur-rahmaan Janhangeer : Greetings all, I was doing a security audit using https://dwheeler.com/flawfinder/ There are quite some issues. Before i PR, i am opening an issue as per the dev guide. Await further comments. Thanks! ---------- messages: 405910 nosy: appinv priority: normal severity: normal status: open title: Fix Flawfinder C Errors type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:00:06 2021 From: report at bugs.python.org (Pradyun Gedam) Date: Sun, 07 Nov 2021 20:00:06 +0000 Subject: [issue41663] Support Windows pseudoterminals in pty and termios modules In-Reply-To: <1598725687.47.0.96007277971.issue41663@roundup.psfhosted.org> Message-ID: <1636315206.23.0.881860369059.issue41663@roundup.psfhosted.org> Pradyun Gedam added the comment: https://github.com/spyder-ide/pywinpty might be relevant; although it's implemented in Rust. ---------- nosy: +pradyunsg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 15:07:00 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 07 Nov 2021 20:07:00 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636315620.83.0.464210556528.issue45743@roundup.psfhosted.org> Ned Deily added the comment: It seems to me that some (most?) of the macOS-specific workarounds in setup.py were added to make it easy to build with the system-provided copies of the third-party libraries, like zlib and sqlite3 and openssl. At least one of the workarounds, search_paths_first, became the default ld behavior since around macOS 10.6 (Xcode 4). So when building on more recent macOS systems, either the workarounds aren't necessary any more or the third-party library is no longer provided (like openssl) or is otherwise too old (like Tk) so that you can no longer rely on building with just using system-supplied libraries to have a useful Python on macOS. And, if you are building on very old systems (because of hardware requirements or whatever), in most cases, the versions of the system-supplied libraries are so old that you shouldn't be relying on them anyway. So I think that, for 3.11, we could take a stand and say that we no longer support building with specific system-supplied third-party libraries on macOS systems older than, say, macOS 10.9; IOW, you will need to supply your own copies of those libs on older systems. That's essentially the approach the MacPorts project has taken for years; they still support providing current Pythons on old versions of macOS but they also supply current version of the third-party libs, too. And Christian's work here for 3.11 to move away from setup.py and use pkg-config to remove the guesswork on header and lib locations should make life easier for everyone. There is a small issue here in that macOS does not supply a built-in pkg-config but there are implementations available, if you are unable or unwilling to use open source distributors like MacPorts or Homebrew, including an actively-maintained permissive-licensed version with no build dependencies that seems to work on even macOS 10.6 (I didn't try anything older than that!): https://github.com/pkgconf/pkgconf. Ronald, what do you think? If this sounds reasonable, we could draw up a list of libs and document it somewhere in the 3.11 code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 16:12:50 2021 From: report at bugs.python.org (=?utf-8?q?R=C3=A9mi_Lapeyre?=) Date: Sun, 07 Nov 2021 21:12:50 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636319570.0.0.115378955934.issue45644@roundup.psfhosted.org> R?mi Lapeyre added the comment: The proposed path does not work for `python -m json.tool --json-lines test.json test.json`. There is also https://github.com/python/cpython/pull/7865 that aims to fix this bug but I did not have the time to get back to it. ---------- nosy: +remi.lapeyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 16:30:36 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Nov 2021 21:30:36 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636320636.59.0.98211016402.issue45743@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the detailed explanation, Ned. Much appreciated! For non-Mac users: macOS 10.6 was released in 2009 and 10.9 in 2013. IMHO it is reasonable to ask people to provide their own copies of libraries on older system. We also require OpenSSL 1.1.1, which is not available on older systems like CentOS 7 (released 2014). Regarding pkg-config, I like to tidy up setup.py first to get a better understanding what kind of builds and systems I need to support. Thanks for pointing out https://github.com/pkgconf/pkgconf! I keep it in mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 16:38:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Nov 2021 21:38:45 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636321125.94.0.774986271626.issue45743@roundup.psfhosted.org> Christian Heimes added the comment: For reference: https://opensource.apple.com/source/ld64/ld64-242/doc/man/man1/ld.1.auto.html > search_paths_first > This is now the default (in Xcode4 tools). When processing -lx the linker now searches each directory > in its library search paths for `libx.dylib' then `libx.a' before the moving on to the next path > in the library search path. According to Wikipedia, Xcode4 was released in 2011. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 16:39:17 2021 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 07 Nov 2021 21:39:17 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong Message-ID: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> New submission from Skip Montanaro : Just preparing to make a refleaks test run, so I ran: ./python -m test --help The output related to refleaks seemed suspicious: ... Special runs: -l, --findleaks deprecated alias to --fail-env-changed ... --fail-env-changed if a test file alters the environment, mark the test as failed It's not obvious that "--fail-env-changed" has anything to do with "--findleaks". Does the -l/--findleaks message need to be corrected? ---------- components: Build messages: 405916 nosy: skip.montanaro priority: normal severity: normal status: open title: ./python -m test --help output for refleaks seems wrong versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 17:01:31 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Nov 2021 22:01:31 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636322491.6.0.710334212057.issue45745@roundup.psfhosted.org> Dennis Sweeney added the comment: IIUC you're looking for --huntrleaks/-R, not the unrelated --findleaks/-l: In that -m test -h menu: -l, --findleaks deprecated alias to --fail-env-changed -R RUNCOUNTS, --huntrleaks RUNCOUNTS search for reference leaks (needs debug build, very slow). See the section at bottom for more details. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 17:32:17 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sun, 07 Nov 2021 22:32:17 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636324337.09.0.172490142624.issue45743@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 18:09:10 2021 From: report at bugs.python.org (Zachary Ware) Date: Sun, 07 Nov 2021 23:09:10 +0000 Subject: [issue40051] Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1636326550.91.0.175999531601.issue40051@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +27713 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 18:19:03 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 07 Nov 2021 23:19:03 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636327143.96.0.874683682756.issue43656@roundup.psfhosted.org> Andrei Kulakov added the comment: Martin: I'm not sure what is the best way to fix this issue, so I hope someone else will look into this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 19:51:22 2021 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 08 Nov 2021 00:51:22 +0000 Subject: [issue21436] Consider leaving importlib.abc.Loader.load_module() In-Reply-To: <1399291208.69.0.802643633069.issue21436@psf.upfronthosting.co.za> Message-ID: <1636332682.29.0.166795258435.issue21436@roundup.psfhosted.org> Nick Coghlan added the comment: FWIW, I think it would be desirable to retain/restore some form of API that allows the creation of modules from files without requiring the user to know about module specs (or loaders, or anything else). My current preference would be for a "module_from_file_location" counterpart to "spec_from_file_location" that implements Brett's recipe from above. That code is visually short, but conceptually very dense,and hence far from being obvious to most people trying to make the "path to module" leap. Such a function could also cross-reference runpy.run_path for cases where don't want a module at all, just the top level namespace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 20:28:02 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 08 Nov 2021 01:28:02 +0000 Subject: [issue45366] dataclass init=False field with default works but default_factory does not In-Reply-To: <1633378653.41.0.620481624294.issue45366@roundup.psfhosted.org> Message-ID: <1636334882.59.0.183965423507.issue45366@roundup.psfhosted.org> Andrei Kulakov added the comment: I think a good possible solution is to raise an error if `default_factory` is provided on a `init=False` dataclass that doesn't have a `__init__()` defined. However, it will create a slight inconsistency because there will be an error when `__init__` is not defined, but no error otherwise -- to allow calling the factory in custom defined `__init__()`. The error would be "Error: default_factory argument needs `init=True` to be set on dataclass because default_factory value is created in the generated __init__() method". ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 20:49:30 2021 From: report at bugs.python.org (Matthew H. McKenzie) Date: Mon, 08 Nov 2021 01:49:30 +0000 Subject: [issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines Message-ID: <1636336170.65.0.433543407195.issue45746@roundup.psfhosted.org> New submission from Matthew H. McKenzie : Lib/ftplib.py function retrlines Inspired by documentation the following writes a file without line-endings: from ftplib import FTP ftp=FTP() ftp.connect('hostname') ftp.login('user','xxxxxxxx') ftp.sendcmd('pasv') with open('crap2.txt', 'w') as fp: ftp.retrlines('RETR crap.txt', fp.write) Code goes to pains to slice off the line endings, and then print_line does not add them back? Apologies if this has been covered before, or I am not following the documentation correctly. Not going to suggest a fix as there may be a reason it is like this. For RETR. For ascii ---------- components: Library (Lib) files: crap2.txt messages: 405921 nosy: mckenzm priority: normal severity: normal status: open title: ftplib please revisit retrlines('RETR as it produces files without newlines versions: Python 3.11 Added file: https://bugs.python.org/file50429/crap2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 21:44:17 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Nov 2021 02:44:17 +0000 Subject: [issue40051] Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1636339457.51.0.786666941998.issue40051@roundup.psfhosted.org> Terry J. Reedy added the comment: PR-29419 solves the issue in #45717 of not giving a link for _* modules with no doc. It does not solve this issue of giving the proper link for module that need non-standard links, which typically need a '#' suffix, as in '.../library/2to3.html#module-lib2to3'. I suggest to continue calculating standard links as done now as the precalculation needs much space for a trivial time saving. Restrict the new dict to non-standard links. They can be calculated, with the needed suffixes, as they are now for the index. The link logic would be to try the lookup first and if module name does not start with '_', calculate the link. I will add an idlelib section to idle.rst so that 'idlelib' appears in the module index and get entered into the exceptions dict. I don't see how PR-29459 get linked here as it has no reference to this issue. So I will ignore it at least for know. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 22:08:11 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 08 Nov 2021 03:08:11 +0000 Subject: [issue40051] Give proper link in help(idlelib/turtledemo/tkinter.sub/test_*/?) In-Reply-To: <1585026386.04.0.352572849659.issue40051@roundup.psfhosted.org> Message-ID: <1636340891.1.0.098240577671.issue40051@roundup.psfhosted.org> ?ric Araujo added the comment: I think that second PR was linked using the GitHub PR link field present in the bug comment form. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 22:15:25 2021 From: report at bugs.python.org (jiahua wang) Date: Mon, 08 Nov 2021 03:15:25 +0000 Subject: [issue45712] Typo in "control flow" documentation In-Reply-To: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> Message-ID: <1636341325.18.0.565344166483.issue45712@roundup.psfhosted.org> Change by jiahua wang : ---------- keywords: +patch nosy: +180909 nosy_count: 2.0 -> 3.0 pull_requests: +27714 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 22:22:15 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Nov 2021 03:22:15 +0000 Subject: [issue40139] mimetypes module racy In-Reply-To: <1585764080.54.0.0429329888929.issue40139@roundup.psfhosted.org> Message-ID: <1636341735.35.0.0872788980838.issue40139@roundup.psfhosted.org> Terry J. Reedy added the comment: Without assurance that the problem exists in current python, let alone a reproducing code, there is nothing we can do. If this or a related problem occurs again, this can be reopened, or a new issue started. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 7 23:52:26 2021 From: report at bugs.python.org (Rafael Fontenelle) Date: Mon, 08 Nov 2021 04:52:26 +0000 Subject: [issue45741] entry points singular? In-Reply-To: <1636239918.89.0.442271633024.issue45741@roundup.psfhosted.org> Message-ID: <1636347146.3.0.602469957198.issue45741@roundup.psfhosted.org> Change by Rafael Fontenelle : ---------- keywords: +patch pull_requests: +27715 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:03:52 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Nov 2021 06:03:52 +0000 Subject: [issue45741] entry points singular? In-Reply-To: <1636239918.89.0.442271633024.issue45741@roundup.psfhosted.org> Message-ID: <1636351432.72.0.0834510327919.issue45741@roundup.psfhosted.org> miss-islington added the comment: New changeset 19b107e9b52dbd73f4c52adcb91e8185a53b45ae by Rafael Fontenelle in branch 'main': bpo-45741: docs: fix plural (GH-29461) https://github.com/python/cpython/commit/19b107e9b52dbd73f4c52adcb91e8185a53b45ae ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:03:53 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Nov 2021 06:03:53 +0000 Subject: [issue45741] entry points singular? In-Reply-To: <1636239918.89.0.442271633024.issue45741@roundup.psfhosted.org> Message-ID: <1636351433.31.0.637805117897.issue45741@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27716 pull_request: https://github.com/python/cpython/pull/29463 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:31:42 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 08 Nov 2021 06:31:42 +0000 Subject: [issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines In-Reply-To: <1636336170.65.0.433543407195.issue45746@roundup.psfhosted.org> Message-ID: <1636353102.29.0.762099783293.issue45746@roundup.psfhosted.org> Eric V. Smith added the comment: Please tell us: - What the file contains, and what you're expecting it to contain. - What system are you running on? crap2.txt (the source file) is a single line, so I'm not sure what you're expecting to happen. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:32:34 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 08 Nov 2021 06:32:34 +0000 Subject: [issue45741] entry points singular? In-Reply-To: <1636239918.89.0.442271633024.issue45741@roundup.psfhosted.org> Message-ID: <1636353154.8.0.235087534373.issue45741@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 77afb76942ea7067d74d9c07fb4da6f5f23ad2f5 by Miss Islington (bot) in branch '3.10': bpo-45741: docs: fix plural (GH-29461) (GH-29463) https://github.com/python/cpython/commit/77afb76942ea7067d74d9c07fb4da6f5f23ad2f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:33:06 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 08 Nov 2021 06:33:06 +0000 Subject: [issue45741] entry points singular? In-Reply-To: <1636239918.89.0.442271633024.issue45741@roundup.psfhosted.org> Message-ID: <1636353186.77.0.0703759528819.issue45741@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for your contribution! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:49:54 2021 From: report at bugs.python.org (Matthew H. McKenzie) Date: Mon, 08 Nov 2021 06:49:54 +0000 Subject: [issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines In-Reply-To: <1636336170.65.0.433543407195.issue45746@roundup.psfhosted.org> Message-ID: <1636354194.61.0.362121159867.issue45746@roundup.psfhosted.org> Matthew H. McKenzie added the comment: On the face of it it is my mistake for using the write method for my file. But read on. your write_line() adds an EOL, OK, because it wraps print(). So the retrlines() function strips them in anticipation? The error is arguably in my own code as I am passing write() as the callback and it is my fault for not adding line endings back? Nothing at all wrong with write_line as the callback, it echoes perfectly, to the console. But my files have no EOL. I need the EOL in my file writes and that is my own problem. It would be maybe be an enhancement not to strip them from the host, as it should understand ascii as CRLF even if the client is not a CRLF system. But that adds complexity - it needs to work as is for listings. My uploaded file was what was being retrieved. Maybe close this and I'll just do what everybody else does and clone retrlines(). Sorry for your trouble. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 01:51:21 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Mon, 08 Nov 2021 06:51:21 +0000 Subject: [issue45689] Custom Name for ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1636354281.35.0.0825500750809.issue45689@roundup.psfhosted.org> Tangellapalli Sai Hanuma Rahul added the comment: ThreadPool handles tasks concurrently through Threads so users need not worry about the creation/deletion of Threads, it uses reuses threads whenever possible and it can handle any tasks. However, it should be possible for users to at least name/rename according to the tasks that the user submits into the ThreadPool. Advantages: * Good for Debugging (so user can know which thread has caused the issue) * threadName attribute in logging's LogRecord can now use custom Name provided to the Task. Until now thread_name_prefix parameter allows us to name the threads but those are not particular to the Task. Price previously one could write .submit(function_name, *args, **kwargs) but now one should write .submit(function_name, name_of_thread, *args, **kwargs) name_of_thread can be None ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:06:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 07:06:40 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636355200.64.0.885428343278.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 57c50c9c7c701a8301c5a89b2b2d050550f62022 by Christian Heimes in branch 'main': bpo-45723: Add helper macros and more caching to configure.ac (GH-29429) https://github.com/python/cpython/commit/57c50c9c7c701a8301c5a89b2b2d050550f62022 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:23:59 2021 From: report at bugs.python.org (Martin) Date: Mon, 08 Nov 2021 07:23:59 +0000 Subject: [issue39228] traceback.FrameSummary does not handle exceptions from `repr()` In-Reply-To: <1578284065.37.0.657086816746.issue39228@roundup.psfhosted.org> Message-ID: <1636356239.45.0.179046850434.issue39228@roundup.psfhosted.org> Martin added the comment: I submitted a pull request for the related issue43656: https://github.com/python/cpython/pull/29299 It introduces a format_locals parameter that enables the customized formatting of a FrameSummary. This way, a user of traceback could provide a function that handles exceptions within __repr__ if necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 02:52:26 2021 From: report at bugs.python.org (Matthew H. McKenzie) Date: Mon, 08 Nov 2021 07:52:26 +0000 Subject: [issue45746] ftplib please revisit retrlines('RETR as it produces files without newlines In-Reply-To: <1636336170.65.0.433543407195.issue45746@roundup.psfhosted.org> Message-ID: <1636357946.22.0.0288545730497.issue45746@roundup.psfhosted.org> Matthew H. McKenzie added the comment: To answer your original questions : Linux Host and Client, amd MVS (EBCDIC records) to Linux. hacks to overcome (in libftp): def print_line(line): '''Default retrlines callback to print a line.''' print(line, end='') <==== suppress here and... if not line: break if line[-2:] == CRLF: <== left these line = line[:-2] elif line[-1:] == '\n': line = line[:-1] callback(line + '\n') <== added it back here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:11:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 08:11:48 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636359108.6.0.798213327977.issue45743@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27718 pull_request: https://github.com/python/cpython/pull/29464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:29:24 2021 From: report at bugs.python.org (Martin) Date: Mon, 08 Nov 2021 08:29:24 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636360164.2.0.564195337122.issue43656@roundup.psfhosted.org> Martin added the comment: I see two scenarious discussed here: Scenario 1 (Offline / Batch-Mode): A system runs user-supplied jobs that may fail. In the case of an error, the system shouldn't crash but rather store a maximally helpful message and carry on with the next job. Most likely, the relevant information is the situation that lead to the error in the first place, not that repr() has also gone wrong as a result. This could be a a system to automatically test the homework code of your students. Or, like in my case, a framework that runs experiments. You would very likely want a system that does not crash if a __repr__ is wrongly implemented but prints a readable traceback and carries on with the next job. Here, format_locals could be used to fall back to a different representation of an object if repr() fails. This is the use case that my pull request tries to address primarily. Scenario 2 (Online / Write, Test, Repeat): A user frequently rewrites and executes their code until the desired outcome appears. Errors inevitably happen. In this case, a maximally helpful stack trace is needed. Again, the relevant information is the situation that lead to the error in the first place, not that repr() has also gone wrong as a result. Yes, it would be hard for unexperienced users to come up with StackSummary.extract(format_locals=...) by themselves. But, the correct way would be to use a debugger anyway, not some hand-written code to print exceptions on the fly. However, if your students receive a template file where they fill in missing function bodies etc, there might already be a substantial amount of code which they don't understand at first, nor do they need to care. Therefore, a piece of code that formats exceptions nicely would hurt here. I think the most useful change for Scenario 2 (if, for some reason, a proper debugger is not an option) could be to add a command line option (e.g. -X capture_locals) so that a complete stack trace is printed if an exception bubbles up to interpreter level. (Here, it wouldn't hurt to handle exceptions in repr() because the interpreter already stopped exection anyway.) This option would be very easy to teach to inexperienced users. My pull request would provide preparation for this more extensive change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:51:09 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 08:51:09 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636361469.75.0.253172165087.issue45512@roundup.psfhosted.org> Erlend E. Aasland added the comment: IMO, GH-29053 improves readability, mainly because of these factors: - Argument Clinic now takes care of the ref count dance, and as a bonus, it is more self-documenting (stating clearly that it accepts str and None) - Begin statement validation has been refactored out, which IMO helps understanding how isolation level and begin statement is related - The isolation level setter is now greatly simplified; it fits well in a screenful, there are fewer ref count dances - Using get_begin_statement() is much less noisier than the previous string compare code in pysqlite_connection_set_isolation_level() The only thing that still bugs me is the "magical" 6 byte offset needed to convert between isolation level and begin statement. Perhaps a set of conversion functions would make it more readable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 03:53:34 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 08 Nov 2021 08:53:34 +0000 Subject: [issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1636361614.63.0.885894773672.issue45689@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: Custom Name for ThreadPoolExecutor -> Add the ability to give custom names to threads created by ThreadPoolExecutor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 04:06:27 2021 From: report at bugs.python.org (Chris Wesseling) Date: Mon, 08 Nov 2021 09:06:27 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636362387.62.0.53098767367.issue45644@roundup.psfhosted.org> Chris Wesseling added the comment: @Remi I left the current behaviour for --json-lines untouched, on purpose. My reasoning was that the json-lines format is often seen in JSON streaming, and I didn't want to break the case where the input is an endless stream from stdin or a named pipe. And to keep the patch simple with minimal change to the exposed interface. Simplest fix for the case in this current code would be: iff infile equals outfile (minding their types), call list(objs) on the generator[1] to materialise it in one go. The only case where that would break would be when infile == outfile and is a named pipe, but I can't imagine why I would want to both read and write to the same FIFO, other than comedic effect. [1] https://github.com/python/cpython/blob/122ca4d73faba279a579aa2011fa34661ce537a2/Lib/json/tool.py#L65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 04:18:34 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 09:18:34 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636363114.46.0.489809727964.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 04:24:37 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 09:24:37 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636363477.49.0.0502435342896.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27719 pull_request: https://github.com/python/cpython/pull/29466 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 04:26:24 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Nov 2021 09:26:24 +0000 Subject: [issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1636363584.4.0.723110006269.issue45689@roundup.psfhosted.org> Mark Dickinson added the comment: > previously one could write .submit(function_name, *args, **kwargs) > but now one should write > .submit(function_name, name_of_thread, *args, **kwargs) > name_of_thread can be None This approach can't work, I'm afraid: it would be a backwards-incompatible change to the `submit` method signature, and would break many existing uses of submit. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 04:32:39 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Nov 2021 09:32:39 +0000 Subject: [issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators In-Reply-To: <1618338439.83.0.0166317758112.issue43833@roundup.psfhosted.org> Message-ID: <1636363959.95.0.647949332013.issue43833@roundup.psfhosted.org> Guido van Rossum added the comment: Do we have a plan for when this will be turned into a non-silent warning and when into an error? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 05:27:28 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 10:27:28 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac Message-ID: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> New submission from Christian Heimes : setup.py jumps through hoops to detect gdbm, gdbm_compat, ndbm, and bdb (libdb) build dependencies. I propose to simplify our support matrix and detect all dependencies in configure.ac. gdbmmodule.c uses gdbm_open() API, which is provided by gdbm.h and libgdbm dbmmodule.c uses the dbm_open() API, which can be provided by a combination of headers and shared libraries. - gdbm/ndbm.h with libgdbm_compat - gdbm-ndbm.h with libgdbm_compat - ndbm.h with libgdbm_compat - ndbm.h with libndbm - db.h with libdb (lib-5.3 for over a decade) setup.py makes some wrong assumption in regards of libgdbm. The shared library libgdbm does not provide the dbm_open() API on any system I tested. libgdbm_compat is always required. Linking with libgdbm is not needed. libgdbm_compat depends on and wraps libgdbm. setup.py also performs additional steps to locate old versions of libdb-3.x and libdb-4.x. libdb-5.3 has been around for a decade. Even CentOS 7 and Debian oldoldstable ship with libdb version 5.3 and don't offer libdb version 4. I propose to remove support for libdb 4 and libdb 3. ---------- assignee: christian.heimes components: Build messages: 405940 nosy: christian.heimes priority: normal severity: normal status: open title: Detect dbm and gdbm dependencies in configure.ac type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 05:34:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 10:34:21 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac In-Reply-To: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> Message-ID: <1636367661.32.0.383080703593.issue45747@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29467 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 05:58:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 10:58:00 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac In-Reply-To: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> Message-ID: <1636369080.27.0.0997890291502.issue45747@roundup.psfhosted.org> Christian Heimes added the comment: Pablo's macOS ARM64 buildbot does not find libdb-5.3 although it has db.h: https://buildbot.python.org/all/#/builders/721/builds/97/steps/2/logs/stdio macOS X86-64 buildbot has libdb-5.3: https://buildbot.python.org/all/#/builders/311/builds/332/steps/2/logs/stdio ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 06:48:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 11:48:49 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636372129.1.0.14958562073.issue45743@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 24af9a40a8f85af813ea89998aa4e931fcc78cd9 by Christian Heimes in branch 'main': bpo-45743: Move __APPLE_USE_RFC_3542 into socketmodule.c (GH-29456) https://github.com/python/cpython/commit/24af9a40a8f85af813ea89998aa4e931fcc78cd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 07:24:04 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Nov 2021 12:24:04 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636374244.77.0.567135658495.issue45743@roundup.psfhosted.org> Ronald Oussoren added the comment: 1) __APPLE_USE_RFC_3542 should have been in socketmodule.c from the start, not sure why it was added in setup.py. 2) as you and Ned noticed -search_paths_first has been the default for a long while, we can just drop it and anyone building on ancient systems can add the flag to CFLAGs/LDFLAGS as needed. IIRC we added the flag to be able to build with local copies of libraries also shipped in the OS, in particular when using static libraries for those local copies. 3) I don't know about detect_dbm_gdbm, and don't use those libraries myself. It would be nice to be able to open system files created using dbopen etc, but on the other hand there is at least one bug report complaining about data corruption when using one o the dbm extensions linked with the system version of the library. 4/5) Fine by me, although I'm slightly worried about using pkg-config because the system doesn't ship that tool. Something you don't mention is the logic dealing with SDK roots. I haven't checked yet if similar logic would be necessary in configure. With some luck it isn't, but that depends on what's supported by autoconf and the particular probes we want to use. @Ned: Not being able to use system versions of libraries is a bit annoying, but that's something you already have to do due to openssl. Maybe we should also try to clean up and refactor the build-installer.py script to do have a way to build/install those 3th-party dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 07:28:29 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 12:28:29 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636374509.12.0.72206005051.issue45743@roundup.psfhosted.org> Erlend E. Aasland added the comment: > 1) __APPLE_USE_RFC_3542 should have been in socketmodule.c from the start, not sure why it was added in setup.py. FTR, it was added by me in bpo-35569, GH-19526. I moved the check to setup.py because Ned made me do it :P https://github.com/python/cpython/pull/19526#discussion_r415637170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 07:47:36 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 12:47:36 +0000 Subject: [issue21644] Optimize bytearray(int) constructor to use calloc() In-Reply-To: <1401740758.16.0.943124117891.issue21644@psf.upfronthosting.co.za> Message-ID: <1636375656.36.0.407768128557.issue21644@roundup.psfhosted.org> STINNER Victor added the comment: I abandonned the issue because I didn't have time to work on it. If you want, you can open a new issue for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 07:49:38 2021 From: report at bugs.python.org (Ma Lin) Date: Mon, 08 Nov 2021 12:49:38 +0000 Subject: [issue44439] stdlib wrongly uses len() for bytes-like object In-Reply-To: <1623906324.37.0.876825919891.issue44439@roundup.psfhosted.org> Message-ID: <1636375778.86.0.560979801215.issue44439@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +27721 pull_request: https://github.com/python/cpython/pull/29468 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:02:40 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Nov 2021 13:02:40 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac In-Reply-To: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> Message-ID: <1636376560.38.0.767196920491.issue45747@roundup.psfhosted.org> Ronald Oussoren added the comment: dbm_open is in libc on macOS. likely due to being in SUSv2. The implementation in libc appears to be suboptimal (for example: issue33074), although I wouldn't teach configure.ac to ignore the system version of the library. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:03:59 2021 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 08 Nov 2021 13:03:59 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636376639.32.0.768416302683.issue45745@roundup.psfhosted.org> Skip Montanaro added the comment: Thanks, I get that. My issue is with the apparent mismatch between the English meaning of "find leaks" and "fail env changed." It seems to me that the help message(s) for one or both of those options is probably incorrect and needs to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:11:40 2021 From: report at bugs.python.org (Ma Lin) Date: Mon, 08 Nov 2021 13:11:40 +0000 Subject: [issue44439] stdlib wrongly uses len() for bytes-like object In-Reply-To: <1623906324.37.0.876825919891.issue44439@roundup.psfhosted.org> Message-ID: <1636377100.02.0.150871964347.issue44439@roundup.psfhosted.org> Ma Lin added the comment: Serhiy Storchaka: Sorry, I found `zipfile` module also has this bug, fixed in PR29468. This bug was reported & fixed by GitHub user `marcoffee` firstly, so I list him as a co-author, his work: https://github.com/animalize/pyzstd/issues/4 The second commit fixes an omission of issue41735, a very simple fix, I fix it in PR29468 by the way. ---------- resolution: fixed -> later status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:52:29 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Nov 2021 13:52:29 +0000 Subject: [issue43833] Unexpected Parsing of Numeric Literals Concatenated with Boolean Operators In-Reply-To: <1618338439.83.0.0166317758112.issue43833@roundup.psfhosted.org> Message-ID: <1636379549.8.0.78419250323.issue43833@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Unless I am missing something it should be 3.11 non-silent warning and 3.12 syntax error ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:54:44 2021 From: report at bugs.python.org (Thomas Trummer) Date: Mon, 08 Nov 2021 13:54:44 +0000 Subject: [issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10 Message-ID: <1636379684.65.0.582073248809.issue45748@roundup.psfhosted.org> New submission from Thomas Trummer : 3.7 and later are all working fine. First good commit: 55fe1ae9708d81b902b6fe8f6590e2a24b1bd4b0 First bad commit: fdbd01151dbd5feea3e4c0316d102db3d2a2a412 git checkout v3.6.15 #0 0x00007ffff6cc52a0 in PyCFuncPtr_new (type=0x5555559157f8, args=0x7ffff6ce6dd8, kwds=0x0) at /home/tom/pydev/cpython/Modules/_ctypes/_ctypes.c:3557 #1 0x00005555556400f9 in type_call (type=0x5555559157f8, args=0x7ffff6ce6dd8, kwds=0x0) at Objects/typeobject.c:895 #2 0x00005555555db4ca in _PyObject_FastCallDict (func=0x5555559157f8, args=0x7ffff6dc1f48, nargs=1, kwargs=0x0) at Objects/abstract.c:2331 #3 0x00005555556b8e7c in call_function (pp_stack=pp_stack at entry=0x7fffffffcb58, oparg=, kwnames=kwnames at entry=0x0) at Python/ceval.c:4875 #4 0x00005555556bc9d3 in _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3335 #5 0x00005555556b774c in PyEval_EvalFrameEx (throwflag=0, f=0x7ffff6dc1dc8) at Python/ceval.c:754 #6 _PyFunction_FastCall (co=, args=, nargs=nargs at entry=0, globals=) at Python/ceval.c:4933 #7 0x00005555556b9269 in fast_function (kwnames=0x0, nargs=0, stack=, func=0x7ffff6d78378) at Python/ceval.c:4968 #8 call_function (pp_stack=pp_stack at entry=0x7fffffffccf8, oparg=, kwnames=kwnames at entry=0x0) at Python/ceval.c:4872 #9 0x00005555556bc9d3 in _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3335 #10 0x00005555556b83c7 in PyEval_EvalFrameEx (throwflag=0, f=0x5555558d2248) at Python/ceval.c:754 #11 _PyEval_EvalCodeWithName (_co=_co at entry=0x7ffff6cdf660, globals=globals at entry=0x7ffff6dfa438, locals=locals at entry=0x7ffff6dfa438, args=args at entry=0x0, argcount=argcount at entry=0, kwnames=kwnames at entry=0x0, kwargs=0x0, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0, kwstep=2) at Python/ceval.c:4166 #12 0x00005555556b9a25 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=0x7ffff6dfa438, globals=0x7ffff6dfa438, _co=0x7ffff6cdf660) at Python/ceval.c:4187 #13 PyEval_EvalCode (co=co at entry=0x7ffff6cdf660, globals=globals at entry=0x7ffff6dfa438, locals=locals at entry=0x7ffff6dfa438) at Python/ceval.c:731 #14 0x00005555556b611d in builtin_exec_impl (module=, locals=0x7ffff6dfa438, globals=0x7ffff6dfa438, source=0x7ffff6cdf660) at Python/bltinmodule.c:983 #15 builtin_exec (module=, args=) at Python/clinic/bltinmodule.c.h:283 #16 0x000055555562b651 in PyCFunction_Call (func=func at entry=0x7ffff6eb7990, args=args at entry=0x7ffff6cdcd08, kwds=kwds at entry=0x7ffff6d6b288) at Objects/methodobject.c:126 #17 0x00005555556c11af in do_call_core (kwdict=0x7ffff6d6b288, callargs=0x7ffff6cdcd08, func=0x7ffff6eb7990) at Python/ceval.c:5116 #18 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3404 #19 0x00005555556b8d17 in PyEval_EvalFrameEx (throwflag=0, f=0x7ffff6dc2930) at Python/ceval.c:754 #20 _PyEval_EvalCodeWithName (_co=0x7ffff6eabdb0, globals=, locals=, args=, argcount=3, kwnames=0x0, kwargs=0x7ffff6d913c8, kwcount=0, kwstep=1, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x7ffff6e53ad0, qualname=0x7ffff6e53ad0) at Python/ceval.c:4166 ---------- components: ctypes messages: 405950 nosy: Thomas Trummer priority: normal severity: normal status: open title: "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 08:57:11 2021 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 08 Nov 2021 13:57:11 +0000 Subject: [issue23041] csv needs more quoting rules In-Reply-To: <1418402205.61.0.685044268577.issue23041@psf.upfronthosting.co.za> Message-ID: <1636379831.69.0.0967025886591.issue23041@roundup.psfhosted.org> Change by Skip Montanaro : ---------- pull_requests: +27722 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29469 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:02:34 2021 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 08 Nov 2021 14:02:34 +0000 Subject: [issue23041] csv needs more quoting rules In-Reply-To: <1418402205.61.0.685044268577.issue23041@psf.upfronthosting.co.za> Message-ID: <1636380154.8.0.0691024003158.issue23041@roundup.psfhosted.org> Skip Montanaro added the comment: Note to @samwyse and @krypten: I updated the patches and created a pull request on GitHub, but I have no way of knowing if at least krypten has signed a CLA for Python. Since you're the author of the original patches, we need to verify that you have. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:09:58 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 14:09:58 +0000 Subject: [issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10 In-Reply-To: <1636379684.65.0.582073248809.issue45748@roundup.psfhosted.org> Message-ID: <1636380598.77.0.767436185746.issue45748@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:11:30 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 14:11:30 +0000 Subject: [issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10 In-Reply-To: <1636379684.65.0.582073248809.issue45748@roundup.psfhosted.org> Message-ID: <1636380690.42.0.87903770729.issue45748@roundup.psfhosted.org> Erlend E. Aasland added the comment: Python 3.6 is in security-fix only mode. I'm sorry, but I don't think this counts as a security issue. ---------- nosy: +erlendaasland status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:12:00 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 14:12:00 +0000 Subject: [issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10 In-Reply-To: <1636379684.65.0.582073248809.issue45748@roundup.psfhosted.org> Message-ID: <1636380720.12.0.253054324027.issue45748@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +ned.deily -serhiy.storchaka status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:51:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 14:51:30 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac In-Reply-To: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> Message-ID: <1636383090.62.0.462371190925.issue45747@roundup.psfhosted.org> Christian Heimes added the comment: Thanks Ronald. I was not aware that macOS has dbm_open in libc. AC_CHECK_LIB() always tries to link with an external library. The macro should skip the symbol from libc. Could you please run the PR locally and upload your config.log? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 09:59:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 14:59:54 +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: <1636383594.2.0.776111475914.issue40170@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +27723 pull_request: https://github.com/python/cpython/pull/29470 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 10:43:49 2021 From: report at bugs.python.org (Ross Burton) Date: Mon, 08 Nov 2021 15:43:49 +0000 Subject: [issue45749] Silently fails to build hashlib if openssl has disabled algorithms Message-ID: <1636386229.74.0.966794635117.issue45749@roundup.psfhosted.org> New submission from Ross Burton : If my openssl is built with no-scrypt then the Python build of hashlib fails (as EVP_PBE_scrypt isn't present), but the overall compile succeeds. ---------- components: Build messages: 405954 nosy: rossburton2 priority: normal severity: normal status: open title: Silently fails to build hashlib if openssl has disabled algorithms _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 10:43:57 2021 From: report at bugs.python.org (Ross Burton) Date: Mon, 08 Nov 2021 15:43:57 +0000 Subject: [issue45749] Silently fails to build hashlib if openssl has disabled algorithms In-Reply-To: <1636386229.74.0.966794635117.issue45749@roundup.psfhosted.org> Message-ID: <1636386237.92.0.653763723378.issue45749@roundup.psfhosted.org> Change by Ross Burton : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:18:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 16:18:21 +0000 Subject: [issue45749] Silently fails to build hashlib if openssl has disabled algorithms In-Reply-To: <1636386229.74.0.966794635117.issue45749@roundup.psfhosted.org> Message-ID: <1636388301.84.0.0153601931639.issue45749@roundup.psfhosted.org> Christian Heimes added the comment: This is by design. As of PEP 644, Python 3.10 requires a full OpenSSL 1.1.1 build. See bpo-45627 for a discussion why we need a full build. Traditionally we also don't fail the entire build if one or more optional modules fail to build. You only get error output on stdout/stderr. Python 3.10.1 will perform additional checks in the configure step, see bpo-45536. ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> OpenSSL 1.1.1 still implements some disable-flags for Blake2, Scrypt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:42:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:42:08 +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: <1636389728.49.0.223149310819.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 99c7e9853fa13af414168f179213e3d2fae03a45 by Victor Stinner in branch 'main': bpo-40170: Update What's New in Python 3.9 (GH-29470) https://github.com/python/cpython/commit/99c7e9853fa13af414168f179213e3d2fae03a45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:42:17 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Nov 2021 16:42:17 +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: <1636389737.14.0.0174900342803.issue40170@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27725 pull_request: https://github.com/python/cpython/pull/29472 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:42:09 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Nov 2021 16:42:09 +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: <1636389729.01.0.363437894331.issue40170@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27724 pull_request: https://github.com/python/cpython/pull/29471 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:43:34 2021 From: report at bugs.python.org (Ross Burton) Date: Mon, 08 Nov 2021 16:43:34 +0000 Subject: [issue45749] Silently fails to build hashlib if openssl has disabled algorithms In-Reply-To: <1636386229.74.0.966794635117.issue45749@roundup.psfhosted.org> Message-ID: <1636389814.47.0.34342710888.issue45749@roundup.psfhosted.org> Ross Burton added the comment: Cool, glad to see the additional checks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:46:46 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 16:46:46 +0000 Subject: [issue45749] Silently fails to build hashlib if openssl has disabled algorithms In-Reply-To: <1636386229.74.0.966794635117.issue45749@roundup.psfhosted.org> Message-ID: <1636390006.94.0.14946196114.issue45749@roundup.psfhosted.org> Christian Heimes added the comment: Out of curiosity, which vendor / platform provides OpenSSL builds without scrypt? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:46:42 2021 From: report at bugs.python.org (Jose Ville) Date: Mon, 08 Nov 2021 16:46:42 +0000 Subject: [issue45750] "SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets Message-ID: <1636390002.55.0.0752334780562.issue45750@roundup.psfhosted.org> New submission from Jose Ville : https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the following two code snippets both of which fail with ""SyntaxError: 'await' outside function" when I run them in Python 3.9.7 Snippet 1: ``` async def foo(): return 42 coro = foo() done, pending = await asyncio.wait({coro}) if coro in done: # This branch will never be run! pass # I added this to prevent IndentationError ``` Snippet 2: ``` async def foo(): return 42 task = asyncio.create_task(foo()) done, pending = await asyncio.wait({task}) if task in done: # Everything will work as expected now. pass # I added this to prevent IndentationError ``` ---------- components: asyncio messages: 405958 nosy: asvetlov, joseville, yselivanov priority: normal severity: normal status: open title: "SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:47:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:47:04 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1636390024.73.0.880407447787.issue42967@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:47:21 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:47:21 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1636390041.68.0.496907589329.issue2771@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:47:44 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:47:44 +0000 Subject: [issue45436] test_tk.test_configure_type() fails with Tcl/Tk 8.6.11 In-Reply-To: <1633984027.59.0.32532195896.issue45436@roundup.psfhosted.org> Message-ID: <1636390064.84.0.542082773116.issue45436@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:47:59 2021 From: report at bugs.python.org (Jose Ville) Date: Mon, 08 Nov 2021 16:47:59 +0000 Subject: [issue45751] "SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets Message-ID: <1636390079.55.0.533458820823.issue45751@roundup.psfhosted.org> New submission from Jose Ville : https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the following two code snippets both of which fail with ""SyntaxError: 'await' outside function" when I run them in Python 3.9.7 Snippet 1: ``` async def foo(): return 42 coro = foo() done, pending = await asyncio.wait({coro}) if coro in done: # This branch will never be run! pass # I added this to prevent IndentationError ``` Snippet 2: ``` async def foo(): return 42 task = asyncio.create_task(foo()) done, pending = await asyncio.wait({task}) if task in done: # Everything will work as expected now. pass # I added this to prevent IndentationError ``` ---------- components: asyncio messages: 405960 nosy: asvetlov, joseville, yselivanov priority: normal severity: normal status: open title: "SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:50:02 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:50:02 +0000 Subject: [issue22097] Linked list API for ordereddict In-Reply-To: <1406583029.35.0.857255601544.issue22097@psf.upfronthosting.co.za> Message-ID: <1636390202.76.0.362156103325.issue22097@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:51:12 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Nov 2021 16:51:12 +0000 Subject: [issue45712] Typo in "control flow" documentation In-Reply-To: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> Message-ID: <1636390272.43.0.505960939944.issue45712@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +27726 pull_request: https://github.com/python/cpython/pull/29473 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:51:09 2021 From: report at bugs.python.org (Zachary Ware) Date: Mon, 08 Nov 2021 16:51:09 +0000 Subject: [issue45712] Typo in "control flow" documentation In-Reply-To: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> Message-ID: <1636390269.73.0.101668271795.issue45712@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 7484a5c82a2dfc106bb1e4b060cad2df00521bfd by 180909 in branch 'main': Closes bpo-45712: Add missing word in control flow tutorial (GH-29460) https://github.com/python/cpython/commit/7484a5c82a2dfc106bb1e4b060cad2df00521bfd ---------- nosy: +zach.ware resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:53:12 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Mon, 08 Nov 2021 16:53:12 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays Message-ID: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> New submission from Stefan Pochmann : The doc https://docs.python.org/3/library/copy.html says: "This module does not copy types like module, method, stack trace, stack frame, file, socket, window, array, or any similar types." But it does copy arrays just fine: import copy, array a = array.array('i', [1, 2]) b = copy.copy(a) a[0] = 3 print(a) print(b) Output: array('i', [3, 2]) array('i', [1, 2]) ---------- assignee: docs at python components: Documentation messages: 405962 nosy: Stefan Pochmann, docs at python priority: normal severity: normal status: open title: copy module doc wrongly says it doesn't copy arrays versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:54:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:54:37 +0000 Subject: [issue45319] Possible regression in __annotations__ descr for heap type subclasses In-Reply-To: <1632916299.97.0.729247269758.issue45319@roundup.psfhosted.org> Message-ID: <1636390477.14.0.372193022334.issue45319@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:56:41 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:56:41 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1636390601.6.0.766755815873.issue17239@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 11:57:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 16:57:10 +0000 Subject: [issue13703] Hash collision security issue In-Reply-To: <1325619410.45.0.862265945379.issue13703@psf.upfronthosting.co.za> Message-ID: <1636390630.11.0.666750561101.issue13703@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:04:52 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 17:04:52 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1636391092.99.0.234359076629.issue45688@roundup.psfhosted.org> STINNER Victor added the comment: Oh right, Tools/scripts/generate_stdlib_module_names.py runs "./python setup.py -q build --list-module-names" which skips modules which are only built on specific platforms. On the Python CI, generate_stdlib_module_names.py is run on Linux. Nicely spotted, and thanks for the fix! Oh, it's hard to really know what the "stdlib" contains ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:05:22 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Nov 2021 17:05:22 +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: <1636391122.39.0.160005923988.issue40170@roundup.psfhosted.org> miss-islington added the comment: New changeset 69b3de65adc691cc5ad66e70e5c7caf61c202c79 by Miss Islington (bot) in branch '3.10': bpo-40170: Update What's New in Python 3.9 (GH-29470) https://github.com/python/cpython/commit/69b3de65adc691cc5ad66e70e5c7caf61c202c79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:05:56 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 17:05:56 +0000 Subject: [issue45688] stdlib_module_names.h is missing _scproxy In-Reply-To: <1635841445.61.0.662562018122.issue45688@roundup.psfhosted.org> Message-ID: <1636391156.32.0.12616699625.issue45688@roundup.psfhosted.org> STINNER Victor added the comment: On Python 3.11.0a2+, I now get: $ ./python -c 'import sys; print(len(sys.stdlib_module_names))' 304 One more module ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:10:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 17:10:49 +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: <1636391449.85.0.772022907948.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 80580f5ab85e3c45c8c5e8999963a891598d10bf by Miss Islington (bot) in branch '3.9': bpo-40170: Update What's New in Python 3.9 (GH-29470) (GH-29472) https://github.com/python/cpython/commit/80580f5ab85e3c45c8c5e8999963a891598d10bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:13:08 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 08 Nov 2021 17:13:08 +0000 Subject: [issue45712] Typo in "control flow" documentation In-Reply-To: <1636028224.13.0.297564810423.issue45712@roundup.psfhosted.org> Message-ID: <1636391588.35.0.326679986097.issue45712@roundup.psfhosted.org> miss-islington added the comment: New changeset 2c4792264f9218692a1bd87398a60591f756b171 by Miss Islington (bot) in branch '3.10': Closes bpo-45712: Add missing word in control flow tutorial (GH-29460) https://github.com/python/cpython/commit/2c4792264f9218692a1bd87398a60591f756b171 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:16:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Nov 2021 17:16:37 +0000 Subject: [issue43760] The DISPATCH() macro is not as efficient as it could be (move PyThreadState.use_tracing) In-Reply-To: <1617788149.78.0.581729826447.issue43760@roundup.psfhosted.org> Message-ID: <1636391797.22.0.318696130262.issue43760@roundup.psfhosted.org> STINNER Victor added the comment: greenlet now uses PyThreadState_EnterTracing() and PyThreadState_LeaveTracing() rather than accessing directly use_tracing: https://github.com/python-greenlet/greenlet/commit/9b49da5c7e4808bd61b992e40f5b5243bfa9be6f On Python 3.10, it implements these functions with: --- // bpo-43760 added PyThreadState_EnterTracing() to Python 3.11.0a2 #if PY_VERSION_HEX < 0x030B00A2 && !defined(PYPY_VERSION) static inline void PyThreadState_EnterTracing(PyThreadState *tstate) { tstate->tracing++; #if PY_VERSION_HEX >= 0x030A00A1 tstate->cframe->use_tracing = 0; #else tstate->use_tracing = 0; #endif } #endif // bpo-43760 added PyThreadState_LeaveTracing() to Python 3.11.0a2 #if PY_VERSION_HEX < 0x030B00A2 && !defined(PYPY_VERSION) static inline void PyThreadState_LeaveTracing(PyThreadState *tstate) { tstate->tracing--; int use_tracing = (tstate->c_tracefunc != NULL || tstate->c_profilefunc != NULL); #if PY_VERSION_HEX >= 0x030A00A1 tstate->cframe->use_tracing = use_tracing; #else tstate->use_tracing = use_tracing; #endif } #endif --- This code was copied from my https://github.com/pythoncapi/pythoncapi_compat project. (I wrote the greenlet change.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:17:55 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 08 Nov 2021 17:17:55 +0000 Subject: [issue45753] Further speed up Python-to-Python calls. Message-ID: <1636391875.36.0.891525405866.issue45753@roundup.psfhosted.org> New submission from Mark Shannon : There are three things we want to do: 1. Speed up pushing and popping frames. See https://github.com/faster-cpython/ideas/issues/111 for details. 2. Avoid tracing and other admin overhead on entering and leaving. See https://github.com/faster-cpython/ideas/issues/112. 3. Keep the remaining recursion depth in the cframe, to reduce the work for a recursion check from `++tstate->recursion_depth > tstate->interp->ceval.recursion_limit` to `cframe.recursion_overhead-- > 0` ---------- assignee: Mark.Shannon components: Interpreter Core messages: 405970 nosy: Mark.Shannon priority: normal severity: normal status: open title: Further speed up Python-to-Python calls. type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:26:45 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Nov 2021 17:26:45 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636392405.03.0.755075699211.issue45732@roundup.psfhosted.org> Steve Dower added the comment: I guess I've actually got to fix my build process now :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:40:01 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 17:40:01 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length Message-ID: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> New submission from Erlend E. Aasland : In Modules/_sqlite/statement.c pysqlite_statement_create() and Modules/_sqlite/cursor.c pysqlite_cursor_executescript_impl(), we incorrectly use SQLITE_LIMIT_LENGTH to check statement length. However, the correct limit is *SQLITE_LIMIT_SQL_LENGTH*. ### Alternative 1: Quick fix is to check against SQLITE_LIMIT_SQL_LENGTH instead of SQLITE_LIMIT_LENGTH. ### Alternative 2: Let SQLite do the check for us, and instead add integer overflow check, since Py_ssize_t may be larger than int (sqlite3_prepare_v2() uses an int as the max statement length parameter). ### Alternative 3: As alternative 2, but alter the sqlite3_prepare_v2() call to accept _any_ length (max statement length = -1). See also: - https://sqlite.org/limits.html - https://sqlite.org/c3ref/c_limit_attached.html - https://sqlite.org/c3ref/prepare.html ---------- messages: 405975 nosy: erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:40:32 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 17:40:32 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636393232.34.0.220022111336.issue45754@roundup.psfhosted.org> Erlend E. Aasland added the comment: BTW, this only affects the code in main. ---------- components: +Extension Modules type: -> behavior versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 12:58:32 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 17:58:32 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636394312.03.0.884781639199.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 9bd0cf5970997b63d296e30d51e7bb9a15dcabaf by Erlend Egeberg Aasland in branch 'main': bpo-45723: Add macro for disabling/enabling CC warnings (GH-29466) https://github.com/python/cpython/commit/9bd0cf5970997b63d296e30d51e7bb9a15dcabaf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:31:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Nov 2021 18:31:22 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636396282.89.0.649800241267.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset cbab997efb3ba5123dc8d9f706184fa8e634b3ec by Christian Heimes in branch 'main': bpo-45723: Prepare support for autoconf 2.71 (GH-29441) https://github.com/python/cpython/commit/cbab997efb3ba5123dc8d9f706184fa8e634b3ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:35:17 2021 From: report at bugs.python.org (Berker Peksag) Date: Mon, 08 Nov 2021 18:35:17 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1636396517.44.0.0738299062544.issue2771@roundup.psfhosted.org> Change by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:47:26 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Nov 2021 18:47:26 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636397246.6.0.425566607523.issue45754@roundup.psfhosted.org> Serhiy Storchaka added the comment: In alternative 1 we control the type and the message of exception. In alternative 3 we left this to the SQLite3 engine. It is difficult to keep consistency in alternative 2, errors raised for sizes less and larger than INT_MAX can be different. I think this is a serious drawback of this alternative. What happens if set SQLITE_LIMIT_SQL_LENGTH to 0 or negative value? Would it be interpreted as "no limit"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 13:50:26 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Nov 2021 18:50:26 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1636397426.4.0.813619732082.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Are we missing something here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:30:49 2021 From: report at bugs.python.org (Kevin Jamieson) Date: Mon, 08 Nov 2021 19:30:49 +0000 Subject: [issue45755] Mock spec with a specialized generic class does not mock class attributes Message-ID: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> New submission from Kevin Jamieson : This worked in Python 3.6, but in Python 3.7 and later creating a mock with a spec specifying a subscripted generic class does not mock any of the attributes of the class, because those attributes are not returned by dir(). For example: # cat test.py from typing import Generic, TypeVar from unittest import mock T = TypeVar('T') class Foo(Generic[T]): def bar(self) -> None: pass m = mock.MagicMock(spec=Foo[int]) m.bar() # python3.11 test.py Traceback (most recent call last): File "/root/test.py", line 11, in m.bar() ^^^^^^^ File "/usr/lib/python3.11/unittest/mock.py", line 635, in __getattr__ raise AttributeError("Mock object has no attribute %r" % name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: Mock object has no attribute 'bar' ---------- components: Library (Lib) messages: 405981 nosy: kjamieson priority: normal severity: normal status: open title: Mock spec with a specialized generic class does not mock class attributes type: behavior versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 14:47:53 2021 From: report at bugs.python.org (Kevin Jamieson) Date: Mon, 08 Nov 2021 19:47:53 +0000 Subject: [issue45756] mock raises exception when using a spec with an attribute that raises exception on access Message-ID: <1636400873.51.0.88200985051.issue45756@roundup.psfhosted.org> New submission from Kevin Jamieson : In Python 3.8 and later creating a mock with a spec specifying an object containing a property that happens to raise an exception when accessed will fail, because _mock_add_spec calls getattr() on every attribute of the spec. This did not happen in Python 3.6/3.7. This is likely a fairly unusual scenario (and in the particular case where I encountered this I could just use a class instead of an instance for the spec), but it was surprising. For example: # cat test.py from unittest import mock class Foo: @property def bar(self) -> str: raise Exception('xxx') m = mock.MagicMock(spec=Foo()) # python3.11 test.py Traceback (most recent call last): File "/root/test.py", line 8, in m = mock.MagicMock(spec=Foo()) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/unittest/mock.py", line 2069, in __init__ _safe_super(MagicMixin, self).__init__(*args, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/unittest/mock.py", line 1087, in __init__ _safe_super(CallableMixin, self).__init__( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/unittest/mock.py", line 442, in __init__ self._mock_add_spec(spec, spec_set, _spec_as_instance, _eat_self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/unittest/mock.py", line 497, in _mock_add_spec if iscoroutinefunction(getattr(spec, attr, None)): ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/test.py", line 6, in bar raise Exception('xxx') ^^^^^^^^^^^^^^^^^^^^^^ Exception: xxx ---------- messages: 405982 nosy: kjamieson priority: normal severity: normal status: open title: mock raises exception when using a spec with an attribute that raises exception on access type: behavior versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:02:43 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 08 Nov 2021 20:02:43 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636401763.71.0.316651721989.issue45754@roundup.psfhosted.org> Erlend E. Aasland added the comment: I'm leaning towards alt 1. It is also easy to test all paths with that option. But I also think alt 3 is ok. It makes for easier code to maintain. Alt 2 is, as you say, the weakest alternative. > What happens if set SQLITE_LIMIT_SQL_LENGTH to 0 or negative value? Would it be interpreted as "no limit"? I'm not sure about 0; I'll try to find out. If you supply -1, you are querying the limit category, not setting it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 15:26:01 2021 From: report at bugs.python.org (Aaron Meurer) Date: Mon, 08 Nov 2021 20:26:01 +0000 Subject: [issue42109] Use hypothesis for testing the standard library, falling back to stubs In-Reply-To: <1603301913.79.0.22425692211.issue42109@roundup.psfhosted.org> Message-ID: <1636403161.63.0.188665852838.issue42109@roundup.psfhosted.org> Change by Aaron Meurer : ---------- nosy: +asmeurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:45:42 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 08 Nov 2021 21:45:42 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1636407942.68.0.421170261152.issue38006@roundup.psfhosted.org> Neil Schemenauer added the comment: Closing since I believe the bug is fixed and there is an appropriate unit test. ---------- assignee: -> nascheme resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 16:56:39 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 08 Nov 2021 21:56:39 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636408599.5.0.92431798336.issue45732@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +27727 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29477 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:09:34 2021 From: report at bugs.python.org (Chris Wesseling) Date: Mon, 08 Nov 2021 22:09:34 +0000 Subject: [issue45644] Make json.tool soak up input before opening output for writing In-Reply-To: <1635425947.02.0.769956758277.issue45644@roundup.psfhosted.org> Message-ID: <1636409374.92.0.272473812364.issue45644@roundup.psfhosted.org> Change by Chris Wesseling : ---------- pull_requests: +27729 pull_request: https://github.com/python/cpython/pull/29478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:09:34 2021 From: report at bugs.python.org (Chris Wesseling) Date: Mon, 08 Nov 2021 22:09:34 +0000 Subject: [issue33927] Allow json.tool to have identical infile and outfile In-Reply-To: <1529577940.46.0.56676864532.issue33927@psf.upfronthosting.co.za> Message-ID: <1636409374.37.0.804941218493.issue33927@roundup.psfhosted.org> Change by Chris Wesseling : ---------- nosy: +CharString nosy_count: 6.0 -> 7.0 pull_requests: +27728 pull_request: https://github.com/python/cpython/pull/29478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:12:53 2021 From: report at bugs.python.org (Rok Mandeljc) Date: Mon, 08 Nov 2021 22:12:53 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence Message-ID: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> New submission from Rok Mandeljc : dis module incorrectly handles the instruction sequence where EXTENDED_ARG is followed by NOP, e.g.,: EXTENDED_ARG 0x01 NOP EXTENDED_ARG 0x01 LOAD_CONST 0x29 The above sequence loads the constant from index 0x0129, whereas dis attempts to load it from index 0x010129, resulting in "IndexError: tuple index out of range error" when attempting to iterate over instructions returned by dis.get_instructions(). Complete example: # *** example.py begin *** import types import dis # Create a test code object... constants = [None] * (0x000129 + 1) constants[0x000129] = "Hello world!" code = types.CodeType( 0, # argcount 0, # posonlyargcount 0, # kwonlyargcount 0, # nlocals 1, # stacksize 64, # flags bytes([ 0x90, 0x01, # EXTENDED_ARG 0x01 0x09, 0xFF, # NOP 0xFF 0x90, 0x01, # EXTENDED_ARG 0x01 0x64, 0x29, # LOAD_CONST 0x29 0x53, 0x00, # RETURN_VALUE 0x00 ]), # codestring= tuple(constants), # constants (), # names (), # varnames '', # filename 'code', # name 1, # firstlineno b'' # linetable ) # ... and eval it to show that NOP resets EXTENDED_ARG print("Output:", eval(code)) # Try to list all instructions via dis print(list(dis.get_instructions(code))) # *** example.py end *** Running the example gives us: Output: Hello world! Traceback (most recent call last): File "/home/rok/example.py", line 35, in print(list(dis.get_instructions(code))) File "/usr/lib64/python3.10/dis.py", line 338, in _get_instructions_bytes argval, argrepr = _get_const_info(arg, constants) File "/usr/lib64/python3.10/dis.py", line 292, in _get_const_info argval = const_list[const_index] IndexError: tuple index out of range To fix the problem on dis side, the extended_arg in dis._unpack_opargs should be reset to 0 when NOP (or perhaps any opcode without argument) is encountered. I.e., by adding "extended_arg = 0" here: https://github.com/python/cpython/blob/91275207296c39e495fe118019a757c4ddefede8/Lib/dis.py#L525 The problematic behavior was reported by users of PyInstaller under python 3.10; it seems that python 3.10 generates bytecode involving EXTENDED_ARG + NOP for telegram.message.py: https://raw.githubusercontent.com/python-telegram-bot/python-telegram-bot/v13.7/telegram/message.py The original PyInstaller issue with preliminary analysis is here: https://github.com/pyinstaller/pyinstaller/issues/6301 ---------- components: Library (Lib) messages: 405985 nosy: rok.mandeljc priority: normal severity: normal status: open title: dis module incorrectly handles EXTENDED_ARG + NOP sequence type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:28:03 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 08 Nov 2021 22:28:03 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1636410483.98.0.668485530051.issue45680@roundup.psfhosted.org> Change by Alex Waygood : ---------- pull_requests: +27730 pull_request: https://github.com/python/cpython/pull/29479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 17:45:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 08 Nov 2021 22:45:59 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636411559.16.0.296423169802.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: Thanks for the report. This should fix it, I'll create a patch: @@ -428,6 +428,7 @@ def _unpack_opargs(code): extended_arg = (arg << 8) if op == EXTENDED_ARG else 0 else: arg = None + extended_arg = 0 yield (i, op, arg) ---------- nosy: +iritkatriel, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:07:35 2021 From: report at bugs.python.org (Victor Milovanov) Date: Mon, 08 Nov 2021 23:07:35 +0000 Subject: [issue45758] Crash on Py_DecRef'ing builtin object from previous run Message-ID: <1636412855.25.0.884802984088.issue45758@roundup.psfhosted.org> New submission from Victor Milovanov : Trying to Py_DecRef owned reference to builtin "iter" crashes if the reference was alive when runtime was reinitialized. Py_Initialize(); PyObject* builtins = PyEval_GetBuiltins(); PyObject* iter = PyDict_GetItemString(builtins, "iter"); Py_IncRef(iter); Py_Finalize(); // ----- new run starts, iter should still be alive Py_Initialize(); Py_DecRef(iter); Py_Finalize(); // fails inside PyGC_Collect -> validate_list Related on StackOverflow: https://stackoverflow.com/questions/69890182/is-it-safe-to-call-py-decref-on-an-object-created-before-the-last-py-initializ ---------- components: C API messages: 405987 nosy: Victor Milovanov priority: normal severity: normal status: open title: Crash on Py_DecRef'ing builtin object from previous run type: crash versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:16:13 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 08 Nov 2021 23:16:13 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636413373.13.0.555605510926.issue45757@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:19:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 08 Nov 2021 23:19:47 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636413587.72.0.169416757829.issue45757@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +27731 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:25:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 08 Nov 2021 23:25:29 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636413929.94.0.28562177007.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: + Mark for FYI. The behaviour of dis is not new, I wonder if generating code with EXTENDED_ARG + NOP is new? ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:33:11 2021 From: report at bugs.python.org (Rok Mandeljc) Date: Mon, 08 Nov 2021 23:33:11 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636414391.65.0.467382945258.issue45757@roundup.psfhosted.org> Rok Mandeljc added the comment: The EXTENDED_ARG + NOP sequence seems to be specific to python 3.10; we could not reproduce the original bug (dis failing on telegram.message) with earlier python versions. The combination makes little sense, so perhaps it is a bug on its own? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 18:51:38 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Mon, 08 Nov 2021 23:51:38 +0000 Subject: [issue45759] `elif` inside `if` block is a `SyntaxError` Message-ID: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> New submission from theeshallnotknowethme : While fixing errors in a program, I encountered this: if a == b + 2: c = sqrt(b) + a**2 elif a == b + 3: ^^^^ SyntaxError: Invalid syntax It should be giving an `IndentationError` or a better error message at least. ---------- components: Parser messages: 405990 nosy: February291948, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: `elif` inside `if` block is a `SyntaxError` type: behavior versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:02:46 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 00:02:46 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636416166.3.0.663236960445.issue45757@roundup.psfhosted.org> Brandt Bucher added the comment: I have a hunch that this is caused in optimize_basic_block. In general, we don't bother clearing the oparg when peepholing instructions into NOPs. We could either start becoming more principled about that and fix all of the existing NOPs, or just update instrsize and write_op_arg to ignore args for instructions that don't use them. The latter seems easier and less error-prone. ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:05:41 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Tue, 09 Nov 2021 00:05:41 +0000 Subject: [issue45759] `elif` inside `if` block is a `SyntaxError` In-Reply-To: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> Message-ID: <1636416341.42.0.701057394885.issue45759@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- keywords: +patch pull_requests: +27732 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29481 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:49:15 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 00:49:15 +0000 Subject: [issue45760] Remove "PyNumber_InMatrixMultiply" Message-ID: <1636418955.82.0.973177651555.issue45760@roundup.psfhosted.org> New submission from Brandt Bucher : Here's a weird one: for the last 8 years, we've defined a function called "PyNumber_InMatrixMultiply" in abstract.c. It's a pretty clear misspelling of "PyNumber_InPlaceMatrixMultiply", which is *also* defined in that file. There's no documentation or tests for it, which further suggests that its inclusion was a mistake. Any new contributors interested in deleting that one line? :) ---------- components: C API keywords: easy (C) messages: 405992 nosy: brandtbucher priority: low severity: normal status: open title: Remove "PyNumber_InMatrixMultiply" versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 19:58:05 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Tue, 09 Nov 2021 00:58:05 +0000 Subject: [issue45760] Remove "PyNumber_InMatrixMultiply" In-Reply-To: <1636418955.82.0.973177651555.issue45760@roundup.psfhosted.org> Message-ID: <1636419485.07.0.738346183971.issue45760@roundup.psfhosted.org> theeshallnotknowethme added the comment: Also with this, could anyone also remove the unused `VISIT_SLICE` macro in 'Python/compile.c'? Thanks. ---------- nosy: +February291948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:07:23 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 01:07:23 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1636420043.76.0.524568782542.issue45636@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +27733 pull_request: https://github.com/python/cpython/pull/29482 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 20:55:02 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 09 Nov 2021 01:55:02 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636422902.66.0.618024876663.issue43656@roundup.psfhosted.org> Andrei Kulakov added the comment: Martin: I have a couple of concerns: - Generally (AFAIK) Python is very conservative about silencing arbitrary exceptions. There are a few functions with args like `ignore_errors`, but those are for errors in the logic of respective functions. I don't recall examples where any error would be silenced via an argument, but if there are such cases, it would be interesting to look into how the design decision was made. In this case of course arbitrary exceptions coming any objects' __repr__ may be silenced. There is a clear and very explicit way to catch exceptions via try/except and as a dev, I would really want to be able to look at a module, look at all try/except clauses and be confident that exceptions are not silenced elsewhere. - You are targeting this fix to production use, but realistically, if merged, it will be used both in testing and production. Which means, by not seeing these exceptions in testing, you will have a higher chance of deploying them to production where they can surface in other circumstances. IOW, as a dev I might prefer to see these errors early and often, rather than have a mechanism that ends up silencing errors more broadly than intended. I'm not saying this fix should be rejected, but that there's a tricky balance here -- and I don't feel confident enough about this solution to approve the PR if I reviewed it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 21:20:47 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 09 Nov 2021 02:20:47 +0000 Subject: [issue45171] stacklevel handling in logging module is inconsistent In-Reply-To: <1631366238.78.0.687157218809.issue45171@roundup.psfhosted.org> Message-ID: <1636424447.19.0.616741397356.issue45171@roundup.psfhosted.org> Andrei Kulakov added the comment: The stacklevel arg was added 3+ years ago, wouldn't fixing this break a lot of code in a way that's hard to detect? That is to say, logs will look just fine, but when you try to debug an issue, you will realise it's pointing to an unhelpful location? ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 21:50:04 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Nov 2021 02:50:04 +0000 Subject: [issue45755] Mock spec with a specialized generic class does not mock class attributes In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1636426204.17.0.804058781263.issue45755@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:15:20 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Nov 2021 04:15:20 +0000 Subject: [issue45748] "import ctypes" segfaults on Python 3.6 and Ubuntu 21.10 In-Reply-To: <1636379684.65.0.582073248809.issue45748@roundup.psfhosted.org> Message-ID: <1636431320.62.0.265751447613.issue45748@roundup.psfhosted.org> Ned Deily added the comment: > Python 3.6 is in security-fix only mode. And besides that, it's not clear what problem you are reporting without more context. As far as I can tell, neither the "good" nor the "bad" commit ids you reference are in or were backported to the 3.6 branch. Without more information, it is hard to speculate, however one thing that *might* be relevant is the version of libffi you are trying to use. There have been several issues reported against other branches of Python when trying to use libffi's recent 3.4.2 release. In any case, as Erlend noted, this doesn't appear to be a security-related issue; in general, changes for newer versions of operating systems or third-party libraries are out-of-scope for Python versions in the security-fix phase of their life cycles. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 8 23:28:31 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Tue, 09 Nov 2021 04:28:31 +0000 Subject: [issue45759] non-matching `elif`/`else` statements with uninformative errors In-Reply-To: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> Message-ID: <1636432111.27.0.289924621209.issue45759@roundup.psfhosted.org> theeshallnotknowethme added the comment: I'd like to expand this to more than just `elif`/`else statements inside `if` statement blocks and make an error for other cases as well. I currently have a PR that has a general error to accommodate those cases. ---------- title: `elif` inside `if` block is a `SyntaxError` -> non-matching `elif`/`else` statements with uninformative errors _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 00:07:55 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Nov 2021 05:07:55 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636434475.37.0.199991939166.issue45743@roundup.psfhosted.org> Ned Deily added the comment: >> 1) __APPLE_USE_RFC_3542 should have been in socketmodule.c from the start, not sure why it was added in setup.py. > FTR, it was added by me in bpo-35569, GH-19526. I moved the check to setup.py because Ned made me do it :P Yeah, well, it seemed like a good thing at the time :) > Something you don't mention is the logic dealing with SDK roots. I haven't checked yet if similar logic would be necessary in configure. With some luck it isn't, but that depends on what's supported by autoconf and the particular probes we want to use. I haven't looked closely at it in this context but I believe most, if not all, of the SDK root shenanigans in setup.py shouldn't be necessary in autoconf tests where the Apple compiler driver handles the SDK details and the few other cases, like for when there was only a 32-bit version of Tk for macOS, are no longer relevant. In any case, that's something for us to follow up on once Christian's changes are merged and stabilized on other platforms. > @Ned: Not being able to use system versions of libraries is a bit annoying, but that's something you already have to do due to openssl. Maybe we should also try to clean up and refactor the build-installer.py script to do have a way to build/install those 3th-party dependencies. Yes. I want to pull the third-party lib building out of build-installer.py into a simple separate build step, probably just using make, that can produce the minimum sets of third-party libs for use by both installer builds and by developers so that there is no dependency on other third-party distributors like Homebrew or MacPorts. With a little bit of care, it wouldn't have to be limited to just macOS builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 01:35:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 06:35:56 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636439756.25.0.829910748663.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: We should also verify that the interpreter doesn?t have its own version of the dis bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 02:06:02 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Tue, 09 Nov 2021 07:06:02 +0000 Subject: [issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1636441562.44.0.587576581479.issue45689@roundup.psfhosted.org> Tangellapalli Sai Hanuma Rahul added the comment: There is a new function submit_with_name in _base.Executor that can accept name parameters before args and kwargs, submit can continue to be used as before. submit internally calls submit_with_name with name as None. Calling submit_with_name in Executor causes a NotImplementedError, it was only implemented in ThreadPoolExecutor, but it could be implemented in any Executor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 02:52:47 2021 From: report at bugs.python.org (Jouke Witteveen) Date: Tue, 09 Nov 2021 07:52:47 +0000 Subject: [issue45171] stacklevel handling in logging module is inconsistent In-Reply-To: <1631366238.78.0.687157218809.issue45171@roundup.psfhosted.org> Message-ID: <1636444367.86.0.546265954953.issue45171@roundup.psfhosted.org> Jouke Witteveen added the comment: I would expect the opposite. Since the issue is visible only in certain cases (shortcut calls such as `logging.info` over `logger.info`, or redirected calls such as `logger.warn` which adds a stack frame for redirecting to `logger.warning`), any code that uses the stacklevel argument is probably broken in subtle ways. It will work fine for the anticipated case, but for instance behave weirdly in interactive sessions such as in a debugger. Added to this, if we want to fix the documentation instead of the logging module code, we have to come up with an understandable description of a behavior that is really inconsistent and odd. We would probably spend most of the documentation explaining edge cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:06:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Nov 2021 08:06:50 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636445210.53.0.0363801447125.issue45743@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 8fefaad242f45b3bd97e000a00f2aac16d935315 by Christian Heimes in branch 'main': bpo-45743: -Wl,-search_paths_first is no longer needed (GH-29464) https://github.com/python/cpython/commit/8fefaad242f45b3bd97e000a00f2aac16d935315 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:16:37 2021 From: report at bugs.python.org (Evan Greenup) Date: Tue, 09 Nov 2021 08:16:37 +0000 Subject: [issue45761] recursive ProcessPoolExecutor invoke unable to return result In-Reply-To: <1636445750.09.0.78640644256.issue45761@roundup.psfhosted.org> Message-ID: <1636445797.55.0.574319036886.issue45761@roundup.psfhosted.org> Change by Evan Greenup : Added file: https://bugs.python.org/file50432/hello.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:15:50 2021 From: report at bugs.python.org (Evan Greenup) Date: Tue, 09 Nov 2021 08:15:50 +0000 Subject: [issue45761] recursive ProcessPoolExecutor invoke unable to return result Message-ID: <1636445750.09.0.78640644256.issue45761@roundup.psfhosted.org> New submission from Evan Greenup : Read the hello.py in attachment. This simple shallow recursion will never return result. ---------- components: Library (Lib) files: hello.py messages: 406003 nosy: evan0greenup priority: normal severity: normal status: open title: recursive ProcessPoolExecutor invoke unable to return result type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file50431/hello.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:18:16 2021 From: report at bugs.python.org (Matteo Bertucci) Date: Tue, 09 Nov 2021 08:18:16 +0000 Subject: [issue45762] Missing `list` symbols in the object inventory Message-ID: <1636445896.9.0.441408433097.issue45762@roundup.psfhosted.org> New submission from Matteo Bertucci : Sphinx generates a quite useful inventory file, listing all the different symbols available inside the documentation. You can find the docs.python.org inventory over at https://docs.python.org/objects.inv. The syntax of this file can be found here https://sphobjinv.readthedocs.io/en/latest/syntax.html. We use it over at Python Discord to power up our `!docs` command. It allows us to look up symbols such as `asyncio.run`, have nicely formatted documentation and links to the web page. The problem is due to where the `list` method documentations are located, inside `/tutorial/datastructures` (https://docs.python.org/3/tutorial/datastructures.html), no symbol is exported for those, making commands such as `!docs list.append` fail, which is quite a bummer. It would be very nice to have access to those. ---------- assignee: docs at python components: Documentation messages: 406004 nosy: Akarys, docs at python priority: normal severity: normal status: open title: Missing `list` symbols in the object inventory versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:23:42 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Tue, 09 Nov 2021 08:23:42 +0000 Subject: [issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1636446222.7.0.936743617344.issue45689@roundup.psfhosted.org> Tangellapalli Sai Hanuma Rahul added the comment: In summary; ========== Current Problem: ------------------ ThreadPoolExecutor handles all threads-related activities so the user needs to just submit tasks and set max_workers and other Executor settings if necessary. If ThreadPoolExecutor allowed us to name/rename threads, that would be great. Of Course, there's a workaround that requires the user to change the name of the current Thread inside the Task, but that requires the user to access the current thread which I believe is not the goal of Thread Pool Executor. Request; ---------- Changes Made: ~~~~~~~~~~~ In this Pull request, _work_queue puts tuple of Future Object and name (name can be None). i.e, typing.Tuple[_base.Future, typing. Optional[str]] which was just a _base.Future before. So, inside the _worker function, When it gets the elements and If its name is None, it will either use the thread_name_prefix or custom Name of task that was used before. else it sets the name of the current Thread with the given name. Problems it solves ~~~~~~~~~~~~~ Currently, ThreadExecutor uses thread_name_prefix + index number for the Internal Thread which is not enough for debugging when we try to submit different types of Tasks (types here mean general callable). So, using this Optional Feature which allows users to submit tasks with names it allows them to easily find issues using the name of Thread either in Logger or in the debugger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 03:56:25 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Nov 2021 08:56:25 +0000 Subject: [issue45743] Cleanup and simplify setup.py In-Reply-To: <1636303044.3.0.982065996937.issue45743@roundup.psfhosted.org> Message-ID: <1636448185.18.0.713541169888.issue45743@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 6a1cc8bf8a0d88af9c7891c6577508ae9f70e3ef by Christian Heimes in branch 'main': bpo-45743: Remove workaround for zlib CVE from 2002 (GH-29457) https://github.com/python/cpython/commit/6a1cc8bf8a0d88af9c7891c6577508ae9f70e3ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 04:13:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Nov 2021 09:13:49 +0000 Subject: [issue45763] Detect compression libraries in configure Message-ID: <1636449229.48.0.616836518237.issue45763@roundup.psfhosted.org> New submission from Christian Heimes : Detect the presence of header files and development libraries for zlib, bz2, and lzma in configure.ac. Also see bpo-45747 ---------- components: Build messages: 406007 nosy: christian.heimes priority: normal severity: normal status: open title: Detect compression libraries in configure type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 04:20:59 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 09 Nov 2021 09:20:59 +0000 Subject: [issue45759] non-matching `elif`/`else` statements with uninformative errors In-Reply-To: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> Message-ID: <1636449659.93.0.368723232758.issue45759@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 04:22:30 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 09 Nov 2021 09:22:30 +0000 Subject: [issue45759] Improve error messages for non-matching `elif`/`else` statements In-Reply-To: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> Message-ID: <1636449750.22.0.494886184602.issue45759@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: non-matching `elif`/`else` statements with uninformative errors -> Improve error messages for non-matching `elif`/`else` statements _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 05:28:01 2021 From: report at bugs.python.org (Martin) Date: Tue, 09 Nov 2021 10:28:01 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636453681.78.0.0686153508785.issue43656@roundup.psfhosted.org> Martin added the comment: Just to avoid misunderstandings: My pull request is not at all about silencing exceptions. It is about customizing the output of the traceback module. (Just like the introduction of capture_locals previously: #22936) (-X capture_locals, on the other hand, is a hypothetical idea that might help with debugging, but we don't have to discuss this now.) My main argument for the proposed change is that traceback is useless in certain situations, because capture_locals is not "robust" (it *might* raise exceptions; I could handle these in the calling code but that would again hide the stack trace that I was about to investigate) and might dump sensitive data like passwords into logfiles (msg237320, msg237323). Nothing is taken away or hidden, but flexibility is added. (The only other option to resolve these issues would be to re-implement much of the current functionality of traceback in a third-party module, which would lead to maintainability problems and fragmentation.) ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 05:30:16 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Nov 2021 10:30:16 +0000 Subject: [issue45763] Detect compression libraries in configure In-Reply-To: <1636449229.48.0.616836518237.issue45763@roundup.psfhosted.org> Message-ID: <1636453816.61.0.710474655256.issue45763@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27734 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 05:53:40 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2021 10:53:40 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1636455220.41.0.0670289471507.issue45703@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 05:57:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2021 10:57:11 +0000 Subject: [issue45354] test_winconsoleio fails on Windows 11 In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org> Message-ID: <1636455431.69.0.217775742624.issue45354@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue: test_winconsoleio fails on the "AMD64 Windows11 3.x" buildbot, whereas the purpose of this issue was to get test_winconsoleio pass on Windows 11. First AMD64 Windows11 3.x failure: https://buildbot.python.org/all/#/builders/733/builds/243 ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:15:43 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Tue, 09 Nov 2021 11:15:43 +0000 Subject: [issue45764] Parse error improvement forgetting ( after def Message-ID: <1636456543.8.0.11859375898.issue45764@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : Something I see beginners make occasionally when defining functions without arguments is this: def f: ... Right now it just gives an "invalid syntax", would be nice to get an "expected '('". I will try to give this a go! Should be a matter of making the '(' token an expected one. ---------- messages: 406010 nosy: Carl.Friedrich.Bolz priority: normal severity: normal status: open title: Parse error improvement forgetting ( after def _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:20:03 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 09 Nov 2021 11:20:03 +0000 Subject: [issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames In-Reply-To: <1635377190.26.0.872789937299.issue45637@roundup.psfhosted.org> Message-ID: <1636456803.68.0.145071535564.issue45637@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f4c03484da59049eb62a9bf7777b963e2267d187 by Pablo Galindo Salgado in branch 'main': bpo-45637: Remove broken fallback in gdb helpers to obtain frame variable (GH-29257) https://github.com/python/cpython/commit/f4c03484da59049eb62a9bf7777b963e2267d187 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:24:33 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Tue, 09 Nov 2021 11:24:33 +0000 Subject: [issue45764] Parse error improvement forgetting ( after def In-Reply-To: <1636456543.8.0.11859375898.issue45764@roundup.psfhosted.org> Message-ID: <1636457073.58.0.451006700815.issue45764@roundup.psfhosted.org> Change by Carl Friedrich Bolz-Tereick : ---------- keywords: +patch pull_requests: +27735 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29484 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:29:11 2021 From: report at bugs.python.org (Andre Roberge) Date: Tue, 09 Nov 2021 11:29:11 +0000 Subject: [issue45759] Improve error messages for non-matching `elif`/`else` statements In-Reply-To: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> Message-ID: <1636457351.55.0.639187188426.issue45759@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:49:01 2021 From: report at bugs.python.org (Martin) Date: Tue, 09 Nov 2021 11:49:01 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636458541.07.0.73593920704.issue43656@roundup.psfhosted.org> Martin added the comment: I improved the example in traceback.rst to illustrate how format_locals works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 06:57:11 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 09 Nov 2021 11:57:11 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636459031.94.0.53894370864.issue43656@roundup.psfhosted.org> Change by Ken Jin : ---------- nosy: -kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:06:46 2021 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 09 Nov 2021 12:06:46 +0000 Subject: [issue23041] csv needs more quoting rules In-Reply-To: <1418402205.61.0.685044268577.issue23041@psf.upfronthosting.co.za> Message-ID: <1636459606.38.0.723768319046.issue23041@roundup.psfhosted.org> Skip Montanaro added the comment: Further question... All the discussion has been on the writer side of the csv module. Is there any reason that using QUOTE_STRINGS or QUOTE_NOTNULL should have an effect when reading? For example, should this line on input "",,1,'a' produce this list ["", None, "1", "a"] with QUOTE_NOTNULL in effect, and ["", "", 1, "a"] or ["", None, 1, "a"] with QUOTE_STRINGS in effect? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:23:44 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 09 Nov 2021 12:23:44 +0000 Subject: [issue45354] test_winconsoleio fails on Windows 11 In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org> Message-ID: <1636460624.82.0.417428921128.issue45354@roundup.psfhosted.org> Eryk Sun added the comment: The embedded manifest in python[_d].exe is missing, so the process is running with Windows 8 compatibility mode (i.e. 6.2.9200), and thus the check for Windows 11+ (10.0.22000+) is false. It's disappointing that compatibility mode doesn't restore the old DOS device behavior, but whatever. bpo-45220 removed the winuser.h include from the PC\*.rc files, so the RT_MANIFEST resource type macro isn't defined. It needs to be defined in the file or a common header. For example: #define RT_MANIFEST 24 1 RT_MANIFEST "python.manifest" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:33:11 2021 From: report at bugs.python.org (=?utf-8?q?Miha_=C5=A0etina?=) Date: Tue, 09 Nov 2021 12:33:11 +0000 Subject: [issue23041] csv needs more quoting rules In-Reply-To: <1418402205.61.0.685044268577.issue23041@psf.upfronthosting.co.za> Message-ID: <1636461191.09.0.952041798324.issue23041@roundup.psfhosted.org> Miha ?etina added the comment: I would say that it should follow a rule: both cases values of None are output as an empty field so empty filed should map to None with both QUOTE_NOTNULL and QUOTE_STRINGS that would make: ["", None, 1, "a"] for QUOTE_STRINGS in effect. This would also make it possible to have circular usage. Export with one quoting rule should be able to read with the same rule and produce same data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:42:31 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 09 Nov 2021 12:42:31 +0000 Subject: [issue45354] test_winconsoleio fails on Windows 11 In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org> Message-ID: <1636461751.44.0.857346855812.issue45354@roundup.psfhosted.org> Eryk Sun added the comment: It would also work to add RT_MANIFEST=24 to the ResourceCompile PreprocessorDefinitions in PCbuild\pyproject.props. Though to me, adding the definition there is obscure compared to including a private header, such as "resourcetype.h". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:48:53 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 12:48:53 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636462133.71.0.265561939458.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27736 pull_request: https://github.com/python/cpython/pull/29485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 07:51:14 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Nov 2021 12:51:14 +0000 Subject: [issue23041] csv needs more quoting rules In-Reply-To: <1418402205.61.0.685044268577.issue23041@psf.upfronthosting.co.za> Message-ID: <1636462274.21.0.798260222039.issue23041@roundup.psfhosted.org> Serhiy Storchaka added the comment: The quoting style affects not only the CSV formatting, but also the CSV parsing. How QUOTE_NOTNULL and QUOTE_STRINGS will affect parsing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 08:10:54 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 13:10:54 +0000 Subject: [issue45354] test_winconsoleio fails on Windows 11 In-Reply-To: <1636460624.82.0.417428921128.issue45354@roundup.psfhosted.org> Message-ID: Steve Dower added the comment: > bpo-45220 removed the winuser.h include from the PC\*.rc files, so the RT_MANIFEST resource type macro isn't defined. It needs to be defined in the file or a common header. For example: > > #define RT_MANIFEST 24 > 1 RT_MANIFEST "python.manifest" I vote for this approach, since apparently RC doesn't complain about undefined macros. Otherwise I'd put it in the build scripts. It's weird that the WinSDK breaks RC with the winuser.h header, but since it does, we don't really have a choice but to hard-code the value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 08:15:20 2021 From: report at bugs.python.org (swgmma) Date: Tue, 09 Nov 2021 13:15:20 +0000 Subject: [issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows In-Reply-To: <1492363586.51.0.498152844874.issue30082@psf.upfronthosting.co.za> Message-ID: <1636463720.48.0.674802570141.issue30082@roundup.psfhosted.org> swgmma added the comment: Just squashed all the commits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 08:18:28 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2021 13:18:28 +0000 Subject: [issue45354] test_winconsoleio fails on Windows 11 In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org> Message-ID: <1636463908.81.0.657455929501.issue45354@roundup.psfhosted.org> STINNER Victor added the comment: > #define RT_MANIFEST 24 If possible, add a comment with a reference to this issue (bpo-45354) to help future readers ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 08:39:09 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 13:39:09 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636465149.26.0.551272640181.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27737 pull_request: https://github.com/python/cpython/pull/29486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 08:45:36 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 13:45:36 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636465536.65.0.21570415727.issue45723@roundup.psfhosted.org> Erlend E. Aasland added the comment: AC_CHECK_TYPE is obsolete and it's use is discouraged. There are some gotchas we need to check before switching to AC_CHECK_TYPES. See: - https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Obsolete-Macros.html - https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/Generic-Types.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 08:54:51 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Nov 2021 13:54:51 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path Message-ID: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> New submission from Jason R. Coombs : Reported in https://github.com/python/importlib_metadata/issues/353, importlib.metadata fails to find distributions in the path "". A fix was applied to importlib_metadata 2.1.2 and 4.8.2. Let's apply that fix and backport it to supported Pythons. ---------- messages: 406022 nosy: jaraco priority: normal severity: normal status: open title: importlib.metadata fails to find distributions in empty path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 08:57:16 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 13:57:16 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636466236.56.0.64882394823.issue45754@roundup.psfhosted.org> Erlend E. Aasland added the comment: > > What happens if set SQLITE_LIMIT_SQL_LENGTH to 0 [...] In this case, the limit is actually zero: >>> cx.setlimit(sqlite3.SQLITE_LIMIT_SQL_LENGTH, 0) 1024 >>> cx.execute("select 1") Traceback (most recent call last): File "", line 1, in sqlite3.DataError: string or blob too big ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:02:13 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Nov 2021 14:02:13 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636466533.84.0.222857667817.issue45765@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- assignee: -> jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:03:43 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Nov 2021 14:03:43 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636466623.54.0.876718276696.issue45765@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +27738 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29487 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:03:36 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 14:03:36 +0000 Subject: [issue45764] Parse error improvement forgetting ( after def In-Reply-To: <1636456543.8.0.11859375898.issue45764@roundup.psfhosted.org> Message-ID: <1636466616.75.0.922608819697.issue45764@roundup.psfhosted.org> miss-islington added the comment: New changeset 2819e98d1048238bf94dc2ba88ae2455d01861bc by Carl Friedrich Bolz-Tereick in branch 'main': bpo-45764: improve error message when missing '(' after 'def' (GH-29484) https://github.com/python/cpython/commit/2819e98d1048238bf94dc2ba88ae2455d01861bc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:43:02 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2021 14:43:02 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1636468982.79.0.390726458673.issue39026@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +27739 pull_request: https://github.com/python/cpython/pull/29488 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:44:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Nov 2021 14:44:35 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1636469075.5.0.662628610778.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: I wrote a different fix: PR 29488. Can someone please check if it fix the issue with Xcode? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 09:50:31 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 14:50:31 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636469431.77.0.0385385199509.issue45754@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- keywords: +patch pull_requests: +27740 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29489 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:16:23 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Nov 2021 15:16:23 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() Message-ID: <1636470983.21.0.286113384782.issue45766@roundup.psfhosted.org> New submission from Raymond Hettinger : Signature: def linear_regression(x, y, /, *, proportional=False): Additional docstring with example: If *proportional* is true, the independent variable *x* and the dependent variable *y* are assumed to be directly proportional. The data is fit to a line passing through the origin. Since the *intercept* will always be 0.0, the underlying linear function simplifies to: y = slope * x + noise >>> y = [3 * x[i] + noise[i] for i in range(5)] >>> linear_regression(x, y, proportional=True) #doctest: +ELLIPSIS LinearRegression(slope=3.0244754248461283, intercept=0.0) See Wikipedia entry for regression without an intercept term: https://en.wikipedia.org/wiki/Simple_linear_regression#Simple_linear_regression_without_the_intercept_term_(single_regressor) Compare with the *const* parameter in MS Excel's linest() function: https://support.microsoft.com/en-us/office/linest-function-84d7d0d9-6e50-4101-977a-fa7abf772b6d Compare with the *IncludeConstantBasis* option in Mathematica: https://reference.wolfram.com/language/ref/IncludeConstantBasis.html ---------- components: Library (Lib) messages: 406026 nosy: rhettinger, steven.daprano priority: normal severity: normal status: open title: Add direct proportion option to statistics.linear_regression() versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:21:36 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Nov 2021 15:21:36 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() In-Reply-To: <1636470983.21.0.286113384782.issue45766@roundup.psfhosted.org> Message-ID: <1636471296.29.0.122305348068.issue45766@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +27741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29490 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:33:10 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 15:33:10 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636471990.23.0.213758058074.issue45723@roundup.psfhosted.org> miss-islington added the comment: New changeset 185533639d6eddd42a28f9e3517067bd877e34c5 by Erlend Egeberg Aasland in branch 'main': bpo-45723: Remove obsolete AC_EXEEXT from configure.ac (GH-29486) https://github.com/python/cpython/commit/185533639d6eddd42a28f9e3517067bd877e34c5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 10:43:01 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Nov 2021 15:43:01 +0000 Subject: [issue45763] Detect compression libraries in configure In-Reply-To: <1636449229.48.0.616836518237.issue45763@roundup.psfhosted.org> Message-ID: <1636472581.63.0.560279651044.issue45763@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 5b7c7cb104163a178e9d70cb3c80cbfa6af8fbfc by Christian Heimes in branch 'main': bpo-45763: Detect compression build deps in configure (GH-29483) https://github.com/python/cpython/commit/5b7c7cb104163a178e9d70cb3c80cbfa6af8fbfc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:02:02 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Nov 2021 16:02:02 +0000 Subject: [issue45763] Detect compression libraries in configure In-Reply-To: <1636449229.48.0.616836518237.issue45763@roundup.psfhosted.org> Message-ID: <1636473722.09.0.105495748548.issue45763@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:47:36 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 16:47:36 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636476456.0.0.669491407125.issue45732@roundup.psfhosted.org> Steve Dower added the comment: New changeset bcc4e46832010469bb35a97c1d1e962a82ee7fd9 by Steve Dower in branch 'main': bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477) https://github.com/python/cpython/commit/bcc4e46832010469bb35a97c1d1e962a82ee7fd9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 11:49:16 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 16:49:16 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636476556.23.0.591270681038.issue45732@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27742 pull_request: https://github.com/python/cpython/pull/29493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:13:09 2021 From: report at bugs.python.org (Dmitry Marakasov) Date: Tue, 09 Nov 2021 17:13:09 +0000 Subject: [issue45767] Fix types for dev_t processing in posix module Message-ID: <1636477989.19.0.839413468229.issue45767@roundup.psfhosted.org> New submission from Dmitry Marakasov : So, I was investigating a test failure of python 3.11 and 3.10 on FreeBSD (but it likely applies to all python versions): ====================================================================== FAIL: test_makedev (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/ports/lang/python311/work/Python-3.11.0a1/Lib/test/test_posix.py", line 686, in test_makedev self.assertGreaterEqual(dev, 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: -5228656221359548839 not greater than or equal to 0 ---------------------------------------------------------------------- The test checks that posix.stat(somepath).st_dev >= 0, but negative value was returned. Python uses PyLong_FromLongLong to convert from dev_t C type which st_dev is: https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L2410 https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L901 POSIX does not seem to define signedness of dev_t, https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/sys_types.h.html only saying it shall be an "integer type". However on practice on both FreeBSD and Linux it's unsigned: FreeBSD: typedef __dev_t dev_t; // sys/types.h typedef __uint64_t __dev_t; // sys/_types.h Linux (Ubuntu 18.04): typedef __dev_t dev_t; // sys/stat.h __STD_TYPE __DEV_T_TYPE __dev_t; // sys/types.h #define __DEV_T_TYPE __UQUAD_TYPE; // sys/typesizes.h So I suggest the attached patch to switch _PyLong_FromDev to PyLong_FromUnsignedLongLong which also makes it consistent with _Py_Dev_Converter which converts the other way with PyLong_AsUnsignedLongLong. This change fixes the mentioned test, but another test failure is unmasked: ====================================================================== ERROR: test_makedev (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/ports/lang/python311/work/Python-3.11.0a1/Lib/test/test_posix.py", line 704, in test_makedev self.assertEqual(posix.makedev(major, minor), dev) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ OverflowError: Python int too large to convert to C int ---------------------------------------------------------------------- This problem needs couple more trivial changes, but I'm not sure how to make them correctly (and I'm also confused by how this file relates with clinic/posixmodule.c). The problems are that: - os_major_impl/os_minor_impl and os_makedev_impl are inconsistent in their argument/return types for major/minor dev numbers: the former use `unsigned int`, while the latter uses `int`. - the correct type is platform dependent, for instance Linux uses `unsigned int` and FreeBSD uses `int` (from `man makedev`). I guess that to fix this failure one needs to add a macro/typedef for the type for minor/major dev numbers like #if defined(__FreeBSD__) #define DEVICE_MAJORMINOR_T int #else #define DEVICE_MAJORMINOR_T unsigned int #endif and use it in the named functions: static DEVICE_MAJORMINOR_T os_major_impl(PyObject *module, dev_t device) static DEVICE_MAJORMINOR_T os_minor_impl(PyObject *module, dev_t device) static dev_t os_makedev_impl(PyObject *module, DEVICE_MAJORMINOR_T major, DEVICE_MAJORMINOR_T minor) ---------- components: Extension Modules, FreeBSD files: posixmodule.c.patch keywords: patch messages: 406030 nosy: AMDmi3, koobs priority: normal severity: normal status: open title: Fix types for dev_t processing in posix module type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file50433/posixmodule.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:15:03 2021 From: report at bugs.python.org (Dmitry Marakasov) Date: Tue, 09 Nov 2021 17:15:03 +0000 Subject: [issue45767] Fix types for dev_t processing in posix module In-Reply-To: <1636477989.19.0.839413468229.issue45767@roundup.psfhosted.org> Message-ID: <1636478103.79.0.1201924347.issue45767@roundup.psfhosted.org> Change by Dmitry Marakasov : ---------- pull_requests: +27743 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:24:08 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 17:24:08 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636478648.83.0.3620344314.issue45757@roundup.psfhosted.org> Brandt Bucher added the comment: I don't think that it does, since oparg gets totally reassigned each time we load a new instruction. EXTENDED_ARG actually needs to hack around this by advancing the instruction itself, updating oparg, and jumping straight into the next opcode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:32:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 17:32:00 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636479120.19.0.142537483354.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +27745 pull_request: https://github.com/python/cpython/pull/29495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:39:33 2021 From: report at bugs.python.org (Jose Ville) Date: Tue, 09 Nov 2021 17:39:33 +0000 Subject: [issue45768] SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets Message-ID: <1636479573.9.0.0363424339507.issue45768@roundup.psfhosted.org> New submission from Jose Ville : https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the following two code snippets both of which fail with ""SyntaxError: 'await' outside function" when I run them in Python 3.9.7 Snippet 1: ``` async def foo(): return 42 coro = foo() done, pending = await asyncio.wait({coro}) if coro in done: # This branch will never be run! pass # I added this to prevent IndentationError ``` Snippet 2: ``` async def foo(): return 42 task = asyncio.create_task(foo()) done, pending = await asyncio.wait({task}) if task in done: # Everything will work as expected now. pass # I added this to prevent IndentationError ``` ---------- messages: 406032 nosy: joseville priority: normal severity: normal status: open title: SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:41:18 2021 From: report at bugs.python.org (Jose Ville) Date: Tue, 09 Nov 2021 17:41:18 +0000 Subject: [issue45769] SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets Message-ID: <1636479678.52.0.397131484588.issue45769@roundup.psfhosted.org> New submission from Jose Ville : https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the following two code snippets both of which fail with ""SyntaxError: 'await' outside function" when I run them in Python 3.9.7 Snippet 1: ``` async def foo(): return 42 coro = foo() done, pending = await asyncio.wait({coro}) if coro in done: # This branch will never be run! pass # I added this to prevent IndentationError ``` Snippet 2: ``` async def foo(): return 42 task = asyncio.create_task(foo()) done, pending = await asyncio.wait({task}) if task in done: # Everything will work as expected now. pass # I added this to prevent IndentationError ``` ---------- messages: 406033 nosy: joseville priority: normal severity: normal status: open title: SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:43:49 2021 From: report at bugs.python.org (Jose Ville) Date: Tue, 09 Nov 2021 17:43:49 +0000 Subject: [issue45770] SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets Message-ID: <1636479829.16.0.0308838926524.issue45770@roundup.psfhosted.org> New submission from Jose Ville : https://docs.python.org/3/library/asyncio-task.html#asyncio.wait has the following two code snippets both of which fail with ""SyntaxError: 'await' outside function" when I run them in Python 3.9.7 Snippet 1: ``` async def foo(): return 42 coro = foo() done, pending = await asyncio.wait({coro}) if coro in done: # This branch will never be run! pass # I added this to prevent IndentationError ``` Snippet 2: ``` async def foo(): return 42 task = asyncio.create_task(foo()) done, pending = await asyncio.wait({task}) if task in done: # Everything will work as expected now. pass # I added this to prevent IndentationError ``` ---------- messages: 406034 nosy: joseville priority: normal severity: normal status: open title: SyntaxError: 'await' outside function" in "asyncio-task.html#waiting-primitives" code snippets type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:48:57 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 17:48:57 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636480137.26.0.455610564197.issue45732@roundup.psfhosted.org> Steve Dower added the comment: New changeset 340ecafdf3bfb1377a1b8584addbb8e7bb423459 by Steve Dower in branch '3.10': bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477) https://github.com/python/cpython/commit/340ecafdf3bfb1377a1b8584addbb8e7bb423459 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:51:14 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 Nov 2021 17:51:14 +0000 Subject: [issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1636480274.93.0.526879487517.issue45689@roundup.psfhosted.org> Mark Dickinson added the comment: Sorry Rahul: I'm not the right person to help you push this forward. I'm sympathetic to the problem: I've encountered similar issues in "Real Code", where we needed to associate log outputs generated by worker pool threads with the actual tasks that generated those logs. But I'm not convinced either that setting the thread name is the right mechanism to get that association (it doesn't extend nicely to other executor types, for example), or that the API you propose is the right one (I find the duplication between `submit` and `submit_with_name` to be a bit much). I'm wondering whether there's some way that executors could use contextvars to provide a per-task context. Then a task "name" could potentially be part of that context, and possibly you could write a custom log handler that read the name from the context when emitting log messages. If you want to find someone to help push this forward, it may be worth posting on the python-ideas mailing list to get discussion going. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 12:54:29 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 17:54:29 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636480469.46.0.765514491567.issue45732@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27746 pull_request: https://github.com/python/cpython/pull/29496 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 13:08:57 2021 From: report at bugs.python.org (Caleb Collins-Parks) Date: Tue, 09 Nov 2021 18:08:57 +0000 Subject: [issue42411] respect cgroups limits when trying to allocate memory In-Reply-To: <1605806290.38.0.199386148713.issue42411@roundup.psfhosted.org> Message-ID: <1636481337.68.0.589197769856.issue42411@roundup.psfhosted.org> Caleb Collins-Parks added the comment: @christian.heimes following up on this - we have been having frequent memory issues with Python 3.7 in Kubernetes. It could just be the code, but if it does turn out this is a bug then fixing it could be very beneficial. ---------- nosy: +caleb2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 13:39:42 2021 From: report at bugs.python.org (Michael Thorpe) Date: Tue, 09 Nov 2021 18:39:42 +0000 Subject: [issue45771] urllib.request.urlopen can leak socket.timeout to callers Message-ID: <1636483182.35.0.0840810707208.issue45771@roundup.psfhosted.org> New submission from Michael Thorpe : urllib.request.urlopen can raise socket.timeout, outside of the documented contract, if reading response data times out. ---------- components: Library (Lib) messages: 406038 nosy: thorpe-dev priority: normal severity: normal status: open title: urllib.request.urlopen can leak socket.timeout to callers type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 13:55:27 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Nov 2021 18:55:27 +0000 Subject: [issue45701] Add tuple tests to `functools.lru_cache` In-Reply-To: <1635936448.66.0.888386290275.issue45701@roundup.psfhosted.org> Message-ID: <1636484127.88.0.499343646232.issue45701@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +rhettinger nosy_count: 1.0 -> 2.0 pull_requests: +27747 pull_request: https://github.com/python/cpython/pull/29498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:10:11 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 19:10:11 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636485011.79.0.0700905695359.issue45754@roundup.psfhosted.org> Erlend E. Aasland added the comment: Also, SQLITE_LIMIT_LENGTH and SQLITE_LIMIT_SQL_LENGTH is inclusive in SQLite. We should treat them likewise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:13:01 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 19:13:01 +0000 Subject: [issue45732] Update python.org Windows and macOS installers to use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636485181.09.0.597444251294.issue45732@roundup.psfhosted.org> Steve Dower added the comment: New changeset 4d1cdd7006def053c815c354bd6f266b4850bd97 by Steve Dower in branch '3.9': bpo-45732: Update bundled Tcl/Tk on Windows to 8.6.12 (GH-29477) https://github.com/python/cpython/commit/4d1cdd7006def053c815c354bd6f266b4850bd97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:13:34 2021 From: report at bugs.python.org (Michael Thorpe) Date: Tue, 09 Nov 2021 19:13:34 +0000 Subject: [issue45771] urllib.request.urlopen can leak socket.timeout to callers In-Reply-To: <1636483182.35.0.0840810707208.issue45771@roundup.psfhosted.org> Message-ID: <1636485214.21.0.710431431177.issue45771@roundup.psfhosted.org> Change by Michael Thorpe : ---------- keywords: +patch pull_requests: +27748 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:15:35 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 19:15:35 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636485335.86.0.893782668843.issue45754@roundup.psfhosted.org> Erlend E. Aasland added the comment: I believe it is best to go with alternative 1. The error strings produced by SQLite may change from release to release, so for example a buildbot update may suddenly break the CI. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:27:26 2021 From: report at bugs.python.org (Joe Wells) Date: Tue, 09 Nov 2021 19:27:26 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636486046.77.0.681328216806.issue43656@roundup.psfhosted.org> Joe Wells added the comment: Some quick comments on Martin's pull request. 1. The changes are sufficient to let the user make things work the way it is requested that they work and anyone who does not start using the new format_locals parameter will get the old behavior. 2. A side comment: I just noticed that the docstring for FrameSummary.__init__ does not document the filename, lineno, and name parameters. Perhaps this could be fixed at the same time? 3. The new parameter format_locals is slightly confusingly named, because it does not format a single string from all the locals but instead gives a dictionary of strings with one string for each local. 4. I personally think it would be better to include something like the example value for format_locals as an extra attribute of the traceback module so everybody doesn't have to write the same function. That said, the documented example is sufficient. 5. It is not clear to me why this stringify-ing of the locals can't be done in StackSummary._extract_from_extended_frame_gen. It passes the dictionary of locals and also the function to transform it to FrameSummary. It would make more sense to transform it first. I suppose there might be some user somewhere who is directly calling FrameSummary so the interface needs to stay. 6. I fantasize that the new format_locals parameter would have access to the frame object. In order for this to happen, the frame object would have to be passed to FrameSummary instead of the 3 values (locals, name, filename) that are extracted from it. I think the current interface of FrameSummary was designed to interoperate with very old versions of Python. Oh well. 7. If anyone wanted to ever refactor FrameSummary (e.g., to enable my fantasy in point #6 just above), it becomes harder after this. This change has the effect of exposing details of the interface of FrameSummary to users of StackSummary.extract and TracebackException. The four parameters that the new parameter format_locals takes are most of the parameters of FrameSummary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:34:03 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 19:34:03 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636486443.16.0.268443361726.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27749 pull_request: https://github.com/python/cpython/pull/29500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:35:56 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 19:35:56 +0000 Subject: [issue45354] test_winconsoleio fails on Windows 11 In-Reply-To: <1633272148.77.0.0556992237798.issue45354@roundup.psfhosted.org> Message-ID: <1636486556.08.0.470601360715.issue45354@roundup.psfhosted.org> Steve Dower added the comment: FYI, adding a fix for this on issue45220 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:41:54 2021 From: report at bugs.python.org (Gaige Paulsen) Date: Tue, 09 Nov 2021 19:41:54 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1636486914.86.0.0281659003267.issue39026@roundup.psfhosted.org> Gaige Paulsen added the comment: I'll try to check that in the next day or two. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:42:51 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 19:42:51 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636486971.81.0.809235171079.issue45220@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27750 pull_request: https://github.com/python/cpython/pull/29501 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:55:56 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Tue, 09 Nov 2021 19:55:56 +0000 Subject: [issue45772] socket.socket should be a class instead of a function Message-ID: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> New submission from Oleg Iarygin : Found a twice stale bpo-less but useful pull request 23960, so publish it here: > Currently socket.socket is documented as a function, but it is really a class (and thus has function-like usage to construct an object). This correction would ensure that Python projects that are interlinking Python's documentation can properly locate socket.socket as a type. ---------- assignee: docs at python components: Documentation messages: 406045 nosy: arhadthedev, docs at python, xuhdev priority: normal pull_requests: 27751 severity: normal status: open title: socket.socket should be a class instead of a function versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 14:56:22 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 19:56:22 +0000 Subject: [issue45773] Compiler hangs during jump elimination Message-ID: <1636487782.5.0.379047434297.issue45773@roundup.psfhosted.org> New submission from Brandt Bucher : The following code hangs during compilation on 3.11 and 3.10: >>> while True or spam: pass Our peepholer gets stuck in a loop, repeatedly "optimizing" instruction 4 (POP_JUMP_IF_TRUE -> JUMP_ABSOLUTE): 1 0 JUMP_ABSOLUTE 0 (to 0) 2 LOAD_NAME 0 (spam) 4 POP_JUMP_IF_TRUE 0 (to 0) After optimizing jumps to jumps like these, we always back up and attempt to optimize the same instruction again (which makes it possible to optimize three or more chained jumps on the same line). The issue is that this particular optimization doesn't actually change the instruction, since both jumps target the same exact block. Since nothing changes, we loop forever. The fix is really simple: just skip the optimization if instr->i_target == target->i_target. We already do this for several other types of jumps; it just looks like POP_JUMP_IF_TRUE and POP_JUMP_IF_FALSE might have been missed. I'll have a PR up soon. ---------- assignee: brandtbucher components: Interpreter Core messages: 406046 nosy: Mark.Shannon, brandtbucher priority: high severity: normal status: open title: Compiler hangs during jump elimination type: crash versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:07:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 20:07:46 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636488466.31.0.607866567155.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: New changeset cb414cf0e207668300c4fe3f310c0bd249153273 by Irit Katriel in branch 'main': bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG before a no-arg opcode (GH-29480) https://github.com/python/cpython/commit/cb414cf0e207668300c4fe3f310c0bd249153273 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:08:01 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 20:08:01 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636488481.67.0.760584631218.issue45757@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27752 pull_request: https://github.com/python/cpython/pull/29502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:13:01 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 20:13:01 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636488781.51.0.466458141015.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: The 3.9 backport had a conflict, but I think it's not worth worrying about because this scenario only showed up in 3.10. ---------- versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:13:05 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 20:13:05 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636488785.45.0.206280994802.issue45220@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27753 pull_request: https://github.com/python/cpython/pull/29503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:13:32 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 20:13:32 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636488812.77.0.759570482297.issue45220@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27754 pull_request: https://github.com/python/cpython/pull/29504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:13:02 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Nov 2021 20:13:02 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636488782.14.0.18714936236.issue45220@roundup.psfhosted.org> Steve Dower added the comment: New changeset a56fbad85ea655631bce68d4c0f47f1a8b500abd by Steve Dower in branch 'main': bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501) https://github.com/python/cpython/commit/a56fbad85ea655631bce68d4c0f47f1a8b500abd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:43:20 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 20:43:20 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636490600.32.0.767839823457.issue45220@roundup.psfhosted.org> miss-islington added the comment: New changeset d29f591dd6b1dcd4f36b5b49761cf8225be690bd by Miss Islington (bot) in branch '3.10': bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501) https://github.com/python/cpython/commit/d29f591dd6b1dcd4f36b5b49761cf8225be690bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:44:44 2021 From: report at bugs.python.org (Dmitry Marakasov) Date: Tue, 09 Nov 2021 20:44:44 +0000 Subject: [issue45767] Fix types for dev_t processing in posix module In-Reply-To: <1636477989.19.0.839413468229.issue45767@roundup.psfhosted.org> Message-ID: <1636490684.87.0.51257685644.issue45767@roundup.psfhosted.org> Dmitry Marakasov added the comment: In case you're curious, here are some st_dev values which are encountered on my FreeBSD: - 0xac2308de99d1f699 - ZFS - 0x7100ff00 - devfs - 0xffffffff8700ff01 - tmpfs - 0x2900ff4e - nullfs I suspect Linux uses smaller numbers which do not cause overflows so tese tests hasn't fired on Linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 15:50:17 2021 From: report at bugs.python.org (dgw) Date: Tue, 09 Nov 2021 20:50:17 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636491017.47.0.971561012596.issue45235@roundup.psfhosted.org> dgw added the comment: Can confirm that this patch DOES cause backward compatibility issues, as paul.j3's gut feeling said it could. One of my projects, testing against 3.6-3.9, now fails its test suite on Python 3.9.8, which includes this change. Arguments passed to a subparser are indeed ignored in lieu of default values. We are tracking the problem in our own issue, https://github.com/sopel-irc/sopel/issues/2210 I, for one, am not amused that 7-year-old behavior was "clobbered" (as previously described in this thread) in a patch release. ---------- nosy: +dgw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:03:34 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 21:03:34 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac In-Reply-To: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> Message-ID: <1636491814.83.0.783643476208.issue45747@roundup.psfhosted.org> Erlend E. Aasland added the comment: AC_SEARCH_LIBS() will search libc before checking external libraries, FWIW. ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:06:06 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 21:06:06 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636491966.72.0.983855867802.issue45723@roundup.psfhosted.org> miss-islington added the comment: New changeset 49171aa91ab78c2608a26e5a75cdceab3bad6176 by Erlend Egeberg Aasland in branch 'main': bpo-45723: Remove dead code for obsolete `--with-dyld` option (GH-29500) https://github.com/python/cpython/commit/49171aa91ab78c2608a26e5a75cdceab3bad6176 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:12:23 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 21:12:23 +0000 Subject: [issue43773] macOS official installer builds not respecting DYLD_LIBRARY_PATH environment variable. In-Reply-To: <1617888716.6.0.448516461166.issue43773@roundup.psfhosted.org> Message-ID: <1636492343.44.0.456875618699.issue43773@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher nosy_count: 3.0 -> 4.0 pull_requests: +27755 pull_request: https://github.com/python/cpython/pull/29505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:13:45 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 21:13:45 +0000 Subject: [issue45773] Compiler hangs during jump elimination In-Reply-To: <1636487782.5.0.379047434297.issue45773@roundup.psfhosted.org> Message-ID: <1636492425.35.0.90345259086.issue45773@roundup.psfhosted.org> Change by Brandt Bucher : ---------- keywords: +patch pull_requests: +27756 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:16:56 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 21:16:56 +0000 Subject: [issue43773] macOS official installer builds not respecting DYLD_LIBRARY_PATH environment variable. In-Reply-To: <1617888716.6.0.448516461166.issue43773@roundup.psfhosted.org> Message-ID: <1636492616.49.0.895697520866.issue43773@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: -27755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:17:02 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 21:17:02 +0000 Subject: [issue43773] macOS official installer builds not respecting DYLD_LIBRARY_PATH environment variable. In-Reply-To: <1617888716.6.0.448516461166.issue43773@roundup.psfhosted.org> Message-ID: <1636492622.94.0.452230293553.issue43773@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: -brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:19:06 2021 From: report at bugs.python.org (RhinosF1) Date: Tue, 09 Nov 2021 21:19:06 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636492746.81.0.188941017927.issue45235@roundup.psfhosted.org> Change by RhinosF1 : ---------- nosy: +RhinosF1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:37:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 21:37:35 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636493855.23.0.997201182276.issue45757@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +27757 pull_request: https://github.com/python/cpython/pull/29506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 16:52:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 21:52:55 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636494775.38.0.92693663473.issue45745@roundup.psfhosted.org> Irit Katriel added the comment: That's probably why --findleaks was deprecated (in 3.8, PR12951). We could remove it now. + vstinner ---------- nosy: +iritkatriel, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:05:39 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 22:05:39 +0000 Subject: [issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636495539.22.0.747348396727.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: New changeset c5bfb88eb6f82111bb1603ae9d78d0476b552d66 by Irit Katriel in branch '3.10': [3.10] bpo-45757: Fix bug where dis produced an incorrect oparg on EXTENDED_ARG before a no-arg opcode (GH-29480) (GH-29506) https://github.com/python/cpython/commit/c5bfb88eb6f82111bb1603ae9d78d0476b552d66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:14:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 22:14:11 +0000 Subject: [issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10 In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636496051.74.0.794677203573.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: > I don't think that it does, since oparg gets totally reassigned each time > we load a new instruction. EXTENDED_ARG actually needs to hack around > this by advancing the instruction itself, updating oparg, and jumping > straight into the next opcode. Right, it's like this: TARGET(EXTENDED_ARG) { int oldoparg = oparg; NEXTOPARG(); oparg |= oldoparg << 8; PRE_DISPATCH_GOTO(); DISPATCH_GOTO(); } It's seems correct (the next arg will be NOP so nothing happens). But it's wasteful. ---------- title: dis module incorrectly handles EXTENDED_ARG + NOP sequence -> compiler emits EXTENDED_ARG + NOP sequence in 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:22:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 22:22:41 +0000 Subject: [issue44813] generate specialization stat names list into opcode.h In-Reply-To: <1627921025.25.0.316615064433.issue44813@roundup.psfhosted.org> Message-ID: <1636496561.75.0.331019132056.issue44813@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:22:22 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Nov 2021 22:22:22 +0000 Subject: [issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10 In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636496542.15.0.464812146003.issue45757@roundup.psfhosted.org> Brandt Bucher added the comment: Indeed. Do you plan on removing the extra EXTENDED_ARGs in instrsize and write_op_arg? I can take care of it if not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:26:46 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 22:26:46 +0000 Subject: [issue45774] Detect SQLite in configure.ac Message-ID: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> New submission from Erlend E. Aasland : "Autoconfiscate" SQLite detection. Plan: - Detect header/library using AC_CHECK_HEADERS/AC_CHECK_LIB - Check required version using AC_COMPILE_IFELSE - Use AC_CHECK_LIB to check if sqlite3_load_extension is present, and if the result harmonises with --enable-loadable-sqlite-extensions; bail if not Nice side effect: configure will bail if --enable-loadable-sqlite-extensions is used and the target SQLite library was compiled with SQLITE_OMIT_LOAD_EXTENSION, even if we are not on macOS. ---------- components: Build messages: 406059 nosy: christian.heimes, erlendaasland priority: normal severity: normal status: open title: Detect SQLite in configure.ac versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:29:01 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 22:29:01 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1636496941.93.0.204917099569.issue45774@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- keywords: +patch pull_requests: +27758 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:30:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 22:30:18 +0000 Subject: [issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10 In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636497018.28.0.286625278122.issue45757@roundup.psfhosted.org> Irit Katriel added the comment: That sounds like a good idea. Please go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:39:55 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 09 Nov 2021 22:39:55 +0000 Subject: [issue34498] Python 3.7+ break on singledispatch_function.register(pseudo_type), which Python 3.6 accepted In-Reply-To: <1535199569.5.0.56676864532.issue34498@psf.upfronthosting.co.za> Message-ID: <1636497595.41.0.508914618915.issue34498@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch nosy: +AlexWaygood nosy_count: 8.0 -> 9.0 pull_requests: +27759 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:46:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Nov 2021 22:46:50 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1636498010.52.0.401098376238.issue45774@roundup.psfhosted.org> Christian Heimes added the comment: Your solution looks very similar to my WIP patch: AC_CHECK_HEADERS([sqlite3.h], [AC_SEARCH_LIBS([sqlite3_version], [sqlite3])] ) AS_VAR_IF([ac_cv_search_sqlite3_version], [no], [], [ # found a working sqlite3.h and sqlite3 library # ac_cv_search_sqlite3_version != no LIBS="$LIBS $ac_cv_search_sqlite3_version" AC_CACHE_CHECK([for sqlite3 version >= 3.7.15], [ac_cv_lib_sqlite3_supported], [ AC_LINK_IFELSE([ AC_LANG_PROGRAM([ #include #if SQLITE_VERSION_NUMBER < 3007015 #error "sqlite version is too old" #endif], [] ) ], [ac_cv_lib_sqlite3_supported=yes], [ac_cv_lib_sqlite3_supported=no]) ]) AC_CACHE_CHECK([for sqlite3_enable_load_extension], [ac_cv_lib_sqlite3_sqlite3_enable_load_extension], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [void *x = sqlite3_enable_load_extension])], [ac_cv_lib_sqlite3_sqlite3_enable_load_extension=yes], [ac_cv_lib_sqlite3_sqlite3_enable_load_extension=no]) ]) ]) LIBS=$LIBS_SAVE AS_VAR_IF([ac_cv_lib_sqlite3_supported], [yes], [AC_DEFINE([HAVE_LIBSQLITE3], [1], [Define to 1 if you have the `sqlite3' library (-lsqlite3).])] ) AS_VAR_IF([ac_cv_lib_sqlite3_sqlite3_enable_load_extension], [yes], [AC_DEFINE([HAVE_SQLITE3_ENABLE_LOAD_EXTENSION], [1], [Define to 1 if `sqlite3' library supports sqlite3_enable_load_extension.])] ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:47:09 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 09 Nov 2021 22:47:09 +0000 Subject: [issue40464] functools.singledispatch doesn't verify annotation is on FIRST parameter In-Reply-To: <1588316641.36.0.617194746525.issue40464@roundup.psfhosted.org> Message-ID: <1636498029.9.0.704907689449.issue40464@roundup.psfhosted.org> Alex Waygood added the comment: Reproduced on 3.11. ---------- nosy: +AlexWaygood, lukasz.langa, rhettinger versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 17:51:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 22:51:33 +0000 Subject: [issue15967] Slaves don't seem to clean up their /tmp mess if a step fails. In-Reply-To: <1347994629.04.0.316608804637.issue15967@psf.upfronthosting.co.za> Message-ID: <1636498293.67.0.206882660399.issue15967@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> regrtest: when interrupted, temporary directory is not removed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:01:34 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 09 Nov 2021 23:01:34 +0000 Subject: [issue45701] Add tuple tests to `functools.lru_cache` In-Reply-To: <1635936448.66.0.888386290275.issue45701@roundup.psfhosted.org> Message-ID: <1636498894.17.0.49754226104.issue45701@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 912a4ccc3a523e2990cc501393adfc661614c73a by Raymond Hettinger in branch 'main': bpo-45701: Improve documentation for *typed* parameter (GH-29498) https://github.com/python/cpython/commit/912a4ccc3a523e2990cc501393adfc661614c73a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:01:39 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 23:01:39 +0000 Subject: [issue45701] Add tuple tests to `functools.lru_cache` In-Reply-To: <1635936448.66.0.888386290275.issue45701@roundup.psfhosted.org> Message-ID: <1636498899.09.0.49955743537.issue45701@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27760 pull_request: https://github.com/python/cpython/pull/29509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:03:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Nov 2021 23:03:12 +0000 Subject: [issue32679] concurrent.futures should store full sys.exc_info() In-Reply-To: <1516976610.0.0.467229070634.issue32679@psf.upfronthosting.co.za> Message-ID: <1636498992.82.0.383899465041.issue32679@roundup.psfhosted.org> Irit Katriel added the comment: The SO link seems to refer to Python 2, but on this issue the version are Python 3. In Python 3 the traceback is accessible from the exception via its __traceback__ attribute. Does that not give you what you need? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:49:47 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Nov 2021 23:49:47 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636501787.07.0.568459154396.issue45765@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c by Jason R. Coombs in branch 'main': [bpo-45765] Fix distribution discovery on empty path. (#29487) https://github.com/python/cpython/commit/6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:49:52 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 09 Nov 2021 23:49:52 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636501792.52.0.528288632518.issue45765@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +27761 pull_request: https://github.com/python/cpython/pull/29510 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:58:06 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 09 Nov 2021 23:58:06 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636502286.6.0.876595447455.issue45765@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +27762 pull_request: https://github.com/python/cpython/pull/29511 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 18:58:42 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 09 Nov 2021 23:58:42 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1636502322.44.0.818121891869.issue45774@roundup.psfhosted.org> Erlend E. Aasland added the comment: Nice. I think I'll steal some of your ideas tomorrow :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:06:44 2021 From: report at bugs.python.org (Thomas Stolarski) Date: Wed, 10 Nov 2021 00:06:44 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa Message-ID: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> New submission from Thomas Stolarski : Since the implementation of `rgb_to_yiq` roughly 30 years ago now, the advent of HDTV has resulted in most broadcasting and video processing having moved towards Rec 709 (or BT.709). While I know colorsys has been on the chopping block for a while, it seemed a little silly that what is now arguably the most common color space used in video editors isn't available as part of this module, despite being a matrix mapping like much of the others. YUV is a bit more contentious on its definition than YIQ is, but it is still widely used to refer to Rec 709 and this is the ATSC standardization for HDTV. I've written a PR for both conversions and will add it to this ticket once it's up. ---------- components: Library (Lib) messages: 406067 nosy: thomas.stolarski priority: normal severity: normal status: open title: Implementation of colorsys.rgb_to_yuv and vice versa type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 19:21:09 2021 From: report at bugs.python.org (Thomas Stolarski) Date: Wed, 10 Nov 2021 00:21:09 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1636503669.16.0.456877122983.issue45775@roundup.psfhosted.org> Change by Thomas Stolarski : ---------- keywords: +patch pull_requests: +27763 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 22:33:12 2021 From: report at bugs.python.org (junyixie) Date: Wed, 10 Nov 2021 03:33:12 +0000 Subject: [issue44532] multi subinterpreters use _PyStructSequence_InitType failed. In-Reply-To: <1624949622.19.0.942644638958.issue44532@roundup.psfhosted.org> Message-ID: <1636515192.67.0.193691596779.issue44532@roundup.psfhosted.org> junyixie added the comment: Include/internal/pycore_structseq.h: 10 11 12: PyAPI_FUNC(int) _PyStructSequence_InitType( 13 PyTypeObject *type, 14 PyStructSequence_Desc *desc, Modules/_cursesmodule.c: 4794 /* ncurses_version */ 4795 if (NcursesVersionType.tp_name == NULL) { 4796: if (_PyStructSequence_InitType(&NcursesVersionType, 4797 &ncurses_version_desc, 4798 Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) { Objects/structseq.c: 463 464 int 465: _PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc, 466 unsigned long tp_flags) 467 { ... 527 PyStructSequence_InitType2(PyTypeObject *type, PyStructSequence_Desc *desc) 528 { 529: return _PyStructSequence_InitType(type, desc, 0); 530 } 531 Python/sysmodule.c: 2813 /* version_info */ 2814 if (VersionInfoType.tp_name == NULL) { 2815: if (_PyStructSequence_InitType(&VersionInfoType, 2816 &version_info_desc, 2817 Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) { .... 2827 // sys.flags: updated in-place later by _PySys_UpdateConfig() 2828 if (FlagsType.tp_name == 0) { 2829: if (_PyStructSequence_InitType(&FlagsType, &flags_desc, 2830 Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) { 2831 goto type_init_failed; .... 2837 /* getwindowsversion */ 2838 if (WindowsVersionType.tp_name == 0) { 2839: if (_PyStructSequence_InitType(&WindowsVersionType, 2840 &windows_version_desc, 2841 Py_TPFLAGS_DISALLOW_INSTANTIATION) < 0) { ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 22:34:53 2021 From: report at bugs.python.org (junyixie) Date: Wed, 10 Nov 2021 03:34:53 +0000 Subject: [issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash. In-Reply-To: <1616400572.08.0.67077600893.issue43588@roundup.psfhosted.org> Message-ID: <1636515293.25.0.570301380979.issue43588@roundup.psfhosted.org> junyixie added the comment: About PEP How is the progress? Where can I track it? Is there any relevant plan? thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 23:32:48 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Nov 2021 04:32:48 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636518768.51.0.669834933406.issue45220@roundup.psfhosted.org> Eryk Sun added the comment: Steve, instead of manually defining RT_MANIFEST, try including "winresrc.h" in the resource definition files. This SDK header includes "winuser.rh" (note the ".rh" extension), which, among other things, includes the following RC_INVOKED definitions from "winuser.h": #ifdef RC_INVOKED #define RT_MANIFEST 24 #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 #define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 #define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3 #define ISOLATIONPOLICY_MANIFEST_RESOURCE_ID 4 #define ISOLATIONPOLICY_BROWSER_MANIFEST_RESOURCE_ID 5 #define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 /* inclusive */ #define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 /* inclusive */ ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 23:39:19 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Nov 2021 04:39:19 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636519159.37.0.351926518122.issue45220@roundup.psfhosted.org> Eryk Sun added the comment: Also, I suggest using CREATEPROCESS_MANIFEST_RESOURCE_ID (1) and ISOLATIONAWARE_MANIFEST_RESOURCE_ID (2) instead of hard-coded resource IDs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 9 23:41:25 2021 From: report at bugs.python.org (Itamar Ostricher) Date: Wed, 10 Nov 2021 04:41:25 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1636519285.83.0.235481972406.issue30533@roundup.psfhosted.org> Itamar Ostricher added the comment: interested in this too - came here to see if I can implement, but found that a patch is already available (GH-20911), and applies cleanly on latest main branch (see my PR comments) would be great if it gets merged! ---------- nosy: +itamaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 00:51:06 2021 From: report at bugs.python.org (Tangellapalli Sai Hanuma Rahul) Date: Wed, 10 Nov 2021 05:51:06 +0000 Subject: [issue45689] Add the ability to give custom names to threads created by ThreadPoolExecutor In-Reply-To: <1635844522.2.0.423855204781.issue45689@roundup.psfhosted.org> Message-ID: <1636523466.45.0.701187545565.issue45689@roundup.psfhosted.org> Tangellapalli Sai Hanuma Rahul added the comment: Yes, it's true, it's so naive method, Contextvars! may be inside the Future Object? ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 01:54:36 2021 From: report at bugs.python.org (Steve Canny) Date: Wed, 10 Nov 2021 06:54:36 +0000 Subject: [issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows Message-ID: <1636527276.55.0.818316908818.issue45776@roundup.psfhosted.org> New submission from Steve Canny : On CPython 3.10.0 on Windows but not MacOS, AttributeError is raised when referencing `abc` on collections (instead of importing `collections.abc`). >>> import collections >>> collections.abc.Container AttributeError: module 'collections' has no attribute 'abc' This works on MacOS CPython 3.10.0 and also works on Windows CPython 3.9.6. It's possibly interesting this coincides with collection ABCs being made unavailable directly from `collections` with this 3.9 -> 3.10 version change, but that's just a guess, for whatever it's worth. ---------- components: Windows messages: 406074 nosy: paul.moore, stcanny, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: abc submodule not an attribute of collections on Python 3.10.0 on Windows type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 02:01:02 2021 From: report at bugs.python.org (Hai Shi) Date: Wed, 10 Nov 2021 07:01:02 +0000 Subject: [issue45758] Crash on Py_DecRef'ing builtin object from previous run In-Reply-To: <1636412855.25.0.884802984088.issue45758@roundup.psfhosted.org> Message-ID: <1636527662.18.0.253867453474.issue45758@roundup.psfhosted.org> Hai Shi added the comment: Hi, Victor Milovanov. The memory allocated by interpreter will be freed after calling Py_Finalize(). ---------- nosy: +pablogsal, shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 03:08:29 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 08:08:29 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1636531709.74.0.404906558289.issue45774@roundup.psfhosted.org> Christian Heimes added the comment: I saw your message concerning sqlite3 on the FreeBSD buildbot. It's hard to tell why configure on FreeBSD doesn't find sqlite3.h without access to config.log or a shell. Maybe sqlite3 is installed in /usr/local ? ``configure`` does not use /usr/local/include and /usr/local/lib by default. ``setup.py`` extends the search paths for headers and libraries by non-standard locations. A "config.site" file should do the trick: $ mkdir -p /usr/local/etc $ cat > /usr/local/etc/config.site << EOF test -z "$CPPFLAGS" && CPPFLAGS="-I$/usr/local/include" test -z "$LDFLAGS" && LDFLAGS="-L/usr/local/lib" EOF ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 04:01:13 2021 From: report at bugs.python.org (Hai Shi) Date: Wed, 10 Nov 2021 09:01:13 +0000 Subject: [issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash. In-Reply-To: <1616400572.08.0.67077600893.issue43588@roundup.psfhosted.org> Message-ID: <1636534873.78.0.451241128926.issue43588@roundup.psfhosted.org> Change by Hai Shi : ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 04:42:25 2021 From: report at bugs.python.org (mike mcleod) Date: Wed, 10 Nov 2021 09:42:25 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1636537345.89.0.935100641432.issue10483@roundup.psfhosted.org> mike mcleod added the comment: Should I go ahead and make the changes as per msg122208 ? on my local copy and test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 04:48:51 2021 From: report at bugs.python.org (Abdullah Alnajim) Date: Wed, 10 Nov 2021 09:48:51 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update Message-ID: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> New submission from Abdullah Alnajim : After updating python to the latest version, an issue related to reading files in long paths (>256 letters) is arisen. Whenever I try to read such a file in Windows 11, I got an exception telling me that the file is not there, even though it?s there and I allowed windows 11 to accept long paths (> Max_Path). Absolute and relative paths did not work. Projects that were working before normally, are no longer working. The exception is ?FileNotFoundError: [Errno 2] No such file or directory: The_Long_Path_To_The_File, ---------- messages: 406078 nosy: Alnajim priority: normal severity: normal status: open title: Issue in reading files with a path longer than 256 letters after latest update type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 04:50:27 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Wa=C5=82ejko?=) Date: Wed, 10 Nov 2021 09:50:27 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636537827.26.0.897098526711.issue45235@roundup.psfhosted.org> ?ukasz Wa?ejko added the comment: I can also confirm that there is an regression in Python 3.9.8 regarding argparse For example, using watchdog 2.1.6 package Python 3.9.7 (correct behaviour) In [1]: from watchdog import watchmedo In [2]: watchmedo.cli.parse_args(["auto-restart", "echo", "123"]) Out[2]: Namespace(command='echo', command_args=['123'], directories=None, patterns='*', ignore_patterns='', ignore_directories=False, recursive=False, timeout=1.0, signal='SIGINT', debug_force_polling=False, kill_after=10.0, func=) Python 3.9.8 (incorrect behaviour) In [1]: from watchdog import watchmedo In [2]: watchmedo.cli.parse_args(["auto-restart", "echo", "123"]) Out[2]: Namespace(command='auto-restart', command_args=['123'], directories=None, patterns='*', ignore_patterns='', ignore_directories=False, recursive=False, timeout=1.0, signal='SIGINT', debug_force_polling=False, kill_after=10.0, func=) ---------- nosy: +lwalejko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 05:22:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2021 10:22:49 +0000 Subject: [issue43588] [Subinterpreters]: use static variable under building Python with --with-experimental-isolated-subinterpreters cause crash. In-Reply-To: <1616400572.08.0.67077600893.issue43588@roundup.psfhosted.org> Message-ID: <1636539769.68.0.0579343535854.issue43588@roundup.psfhosted.org> STINNER Victor added the comment: So far, no PEP has been written. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 05:38:15 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Wed, 10 Nov 2021 10:38:15 +0000 Subject: [issue45759] Improve error messages for non-matching `elif`/`else` statements In-Reply-To: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> Message-ID: <1636540695.79.0.145842975193.issue45759@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- pull_requests: +27765 pull_request: https://github.com/python/cpython/pull/29513 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 06:00:13 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Nov 2021 11:00:13 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636542013.65.0.17064226797.issue45777@roundup.psfhosted.org> Change by Eric V. Smith : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 06:03:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2021 11:03:43 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636542223.82.0.952114697557.issue45745@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +27766 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 06:07:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2021 11:07:06 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636542426.4.0.691279192496.issue45745@roundup.psfhosted.org> STINNER Victor added the comment: In Python 3.6, regrtest failed if --findleaks was used and gc.garbage was not empty after a test completed. I modified regrtest to always run this check: --findleaks is now ignored. But I also modified --findleaks to make it an alias to the --fail-env-changed option: non-zero exit code if a test fails with "ENV CHANGED" status. I wrote PR 29514 to clarify the situation: remove --findleaks :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 06:08:29 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2021 11:08:29 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636542509.86.0.178982348767.issue45745@roundup.psfhosted.org> STINNER Victor added the comment: To check for reference leaks, memory leaks and file descriptor leaks: --huntrleaks/-R should be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 06:48:28 2021 From: report at bugs.python.org (=?utf-8?q?David_Luke=C5=A1?=) Date: Wed, 10 Nov 2021 11:48:28 +0000 Subject: [issue43923] Can't create generic NamedTuple as of py3.9 In-Reply-To: <1619194976.58.0.205362589455.issue43923@roundup.psfhosted.org> Message-ID: <1636544908.65.0.106982022542.issue43923@roundup.psfhosted.org> David Luke? added the comment: This is unfortunate, especially since it used to work... Going forward, is the intention not to support this use case? Or is it possible that support for generic NamedTuples will be re-added in the future? ---------- nosy: +dlukes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:00:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 12:00:22 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636545622.33.0.622478666161.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: We can detect majority of our dependencies with pkg-config. The use of pkg-config has some benefits: * Distro's provide the .pc files in their -dev / -devel packages. The presence of a .pc file indicates that all development dependencies are available. * pkg-config does the right thing for non-standard include and libraries directories as well as multiarch builds. In case a library or header is not on the default search path, pkg-config returns necessary -I and -L flags. * At least the pkgconf implementation of pkg-config standard search /usr/local and ~/.local/ directories for .pc files. Cases like https://github.com/python/cpython/pull/29507 are handled correctly. On FreeBSD "pkgconf sqlite3 --cflags --libs" returns "-I/usr/local/include -L/usr/local/lib -lsqlite3". * pkg-config understands dependencies. For example "pkg-config --libs tk" returns linker flags for TK *and* TCL. * pkg-config can check for module version, e.g. "pkg-config sqlite3 --atleast-version=3.7.15" pkg-config modules: readline, libedit ncursesw, ncurses, panel, tinfo sqlite3 zlib bzip2 liblzma expat uuid (Linux's util-linux uuid) libffi libnsl, libtirpc libcrypt tcl, tk openssl, libssl, libcrypto modules / libraries without pkg-config modules: decimal: libmpdec gdbm: gdbm dbm: gdbm_compat, ndbm, libdb (bdb) To simplify use of flags in Modules/Setup, I propose to add two make variables for each module that needs cflags and ldflags: f"MODULE_{ext.name.upper()}_CFLAGS" f"MODULE_{ext.name.upper()}_LDFLAGS" e.g. for the _ssl module: MODULE__SSL_CFLAGS= MODULE__SSL_LDFLAGS=-lssl -lcrypto Then use the flags from Makefile in setup.py: def update_extension_flags(self, ext): name = ext.name.upper() cflags = sysconfig.get_config_var(f"MODULE_{name}_CFLAGS") if cflags: ext.extra_compile_args.extend(shlex.split(cflags)) ldflags = sysconfig.get_config_var(f"MODULE_{name}_LDFLAGS") if ldflags: ext.extra_link_args.extend(shlex.split(ldflags)) return ext Finally update Modules/makesetup to use the new variables, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:09:13 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 10 Nov 2021 12:09:13 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636546153.24.0.257996544301.issue45573@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:11:49 2021 From: report at bugs.python.org (Matthias Klose) Date: Wed, 10 Nov 2021 12:11:49 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) Message-ID: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> New submission from Matthias Klose : [reported in Debian as https://bugs.debian.org/998854] 3.9.8, compared to 3.9.7 introduces a regression, making at least one third party extension fail at runtime. The symbol changes in 3.9.8 are: - _PyUnicode_DecodeUnicodeEscape at Base + _PyUnicode_DecodeRawUnicodeEscapeStateful at Base + _PyUnicode_DecodeUnicodeEscapeInternal at Base + _PyUnicode_DecodeUnicodeEscapeStateful at Base Affected at least is the typed-ast extension. Yes, you can rebuild the extension with 3.9.8, but then it doesn't work with earlier 3.9 versions. Just dropping the symbol on a stable branch is suboptimal. ---------- components: Interpreter Core keywords: 3.9regression messages: 406085 nosy: doko, lukasz.langa priority: release blocker severity: normal status: open title: libpython.so 3.9.8 drops symbol used by third party extension module(s) type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:23:53 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Nov 2021 12:23:53 +0000 Subject: [issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames In-Reply-To: <1635377190.26.0.872789937299.issue45637@roundup.psfhosted.org> Message-ID: <1636547033.7.0.636709920525.issue45637@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27767 pull_request: https://github.com/python/cpython/pull/29515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:25:22 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Nov 2021 12:25:22 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636547122.51.0.740497099549.issue45778@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Aren't these private symbols? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:27:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 12:27:48 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636547268.11.0.823303647262.issue45778@roundup.psfhosted.org> Christian Heimes added the comment: Yes, they are private symbols. 3rd parties should not use them. The symbol _PyUnicode_DecodeUnicodeEscape was replace in GH-28953: "bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec". ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:29:25 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Nov 2021 12:29:25 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636547365.76.0.895836853185.issue45778@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Yeah, the ABI guarantees are for the public C-API (both the restricted/limited and the general one) but not for private symbols. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:34:42 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 12:34:42 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636547682.73.0.144133513744.issue45778@roundup.psfhosted.org> Christian Heimes added the comment: Matthias mentions the upstream tickets https://github.com/python/typed_ast/issues/169 https://github.com/python/typed_ast/issues/170 on the BDO. The issue affects typed-ast and indirectly older versions of black. Upstream is considering to EOL typed-ast package. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:36:20 2021 From: report at bugs.python.org (mike mcleod) Date: Wed, 10 Nov 2021 12:36:20 +0000 Subject: [issue21501] docs: mmap example for use in documentation In-Reply-To: <1400008733.4.0.146542624997.issue21501@psf.upfronthosting.co.za> Message-ID: <1636547780.98.0.430058263747.issue21501@roundup.psfhosted.org> mike mcleod added the comment: I would like to help with this issue. I note that a few changes need to be made to the code example for compatibility for the latest version of Python. I can get this working but I am not sure this is a good example. Also, the example is more about threads and messaging between threads rather than mmap. So my question is is this a good example? And the suggestion of adding detailed explanation of the code, again, as to what it does not seem to be that relevant to mmap. ---------- nosy: +mikecmcleod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 07:39:12 2021 From: report at bugs.python.org (Matthias Klose) Date: Wed, 10 Nov 2021 12:39:12 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636547952.92.0.226422141325.issue45778@roundup.psfhosted.org> Matthias Klose added the comment: the two users of typed-ast (at least in Debian) are black and mypy. Apparently black stopped using typed-ast recently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:05:42 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Nov 2021 13:05:42 +0000 Subject: [issue45753] Further speed up Python-to-Python calls. In-Reply-To: <1636391875.36.0.891525405866.issue45753@roundup.psfhosted.org> Message-ID: <1636549542.58.0.444222327009.issue45753@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +27768 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:19:04 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Nov 2021 13:19:04 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636550344.96.0.426884372017.issue45777@roundup.psfhosted.org> Eryk Sun added the comment: Ensure that the system has LongPathsEnabled set to 1. For example, in PowerShell with administrator (elevated) access: PS C:\> $p = "HKLM:\System\CurrentControlSet\Control\Filesystem" PS C:\> get-itempropertyvalue $p LongPathsEnabled 0 It was set to 0, so change it to 1: PS C:\> set-itemproperty $p LongPathsEnabled 1 PS C:\> get-itempropertyvalue $p LongPathsEnabled 1 Every new process initially checks this registry setting, so you don't have to logoff or reboot for it take effect. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:25:10 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 10 Nov 2021 13:25:10 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636550710.06.0.942935982486.issue45778@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:25:19 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 10 Nov 2021 13:25:19 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636550719.23.0.041800701233.issue45778@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:34:50 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Nov 2021 13:34:50 +0000 Subject: [issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows In-Reply-To: <1636527276.55.0.818316908818.issue45776@roundup.psfhosted.org> Message-ID: <1636551290.51.0.477281838281.issue45776@roundup.psfhosted.org> Steve Dower added the comment: Since collections.abc is a module, it should work if you import it: >>> import collections.abc >>> collections.abc.Container Submodules being implicitly imported is not part of any API guarantee, which will be why somebody changed it without considering this impact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:36:44 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Nov 2021 13:36:44 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636551404.25.0.647012185474.issue45777@roundup.psfhosted.org> Steve Dower added the comment: I wonder if the Windows 11 upgrade process disables this registry key when it's set directly? That's not something we can fix (I don't think?), so we may just have to list it as an option. If you can, check whether running a Repair of your Python install offers the button at the end to enable it again. If so, that may be the best thing for us to suggest (if this turns out to be widespread). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:39:03 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Nov 2021 13:39:03 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636551543.57.0.658784200236.issue45777@roundup.psfhosted.org> Steve Dower added the comment: Oh, no, wait. Did my accidental breakage of the resource files make it into the last 3.9 release? If so, we probably lost the manifest option to opt-in to supporting long paths, and perhaps Windows 11 has decided to start honouring that (Windows 10 ignored it). (+RM just in case it matters enough to accelerate the next patch release.) ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:41:32 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Nov 2021 13:41:32 +0000 Subject: [issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames In-Reply-To: <1635377190.26.0.872789937299.issue45637@roundup.psfhosted.org> Message-ID: <1636551692.0.0.730761541021.issue45637@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 20205ad2b5be7eb3361224fd2502d1ba09c8ae4a by Pablo Galindo Salgado in branch 'main': bpo-45637: Fix cframe-based fallback in the gdb helpers (GH-29515) https://github.com/python/cpython/commit/20205ad2b5be7eb3361224fd2502d1ba09c8ae4a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:41:53 2021 From: report at bugs.python.org (Abdullah Alnajim) Date: Wed, 10 Nov 2021 13:41:53 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636551713.02.0.782991390668.issue45777@roundup.psfhosted.org> Abdullah Alnajim added the comment: LongPathsEnabled value was already one. This issue comes with the new update (3.9.8) [Windows Store version]. I reinstalled the same version (3.9.8) from Windows Store, and the issue was still there. When I tried versions (3.10) and (3.9.7) from (https://www.python.org/downloads/), the problem is gone. ---------- nosy: -lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:44:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Nov 2021 13:44:27 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636551867.39.0.015829270967.issue45777@roundup.psfhosted.org> Steve Dower added the comment: > Did my accidental breakage of the resource files make it into the last 3.9 release? Turns out, no, it didn't. So this is something else. When I get to work later today I'll take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:50:11 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Nov 2021 13:50:11 +0000 Subject: [issue45637] The fallback to find the current frame in the gdb helpers fails for inlined frames In-Reply-To: <1635377190.26.0.872789937299.issue45637@roundup.psfhosted.org> Message-ID: <1636552211.59.0.161890557809.issue45637@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 08:57:35 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Nov 2021 13:57:35 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636552655.36.0.518518966448.issue45777@roundup.psfhosted.org> Eryk Sun added the comment: > Did my accidental breakage of the resource files make it > into the last 3.9 release? Yep, version 3.9.8 of the store app was built last Friday, the day after removing "winuser.h" from the resource definition files. I just installed it and can confirm that there's no embedded manifest in "C:\Program Files\WindowApps\PythonSoftwareFoundation.Python.3.9<...>\python.exe". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 09:02:39 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2021 14:02:39 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636552959.86.0.605258470471.issue45778@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to close this issue. We are free to remove private functions in minor releases (3.9.x) without any warning. Private functions are excluded from the backward compatibility warranty. For example: "Names prefixed by an underscore, such as _Py_InternalState, are private API that can change without notice even in patch releases." https://docs.python.org/dev/c-api/stable.html#stable In C, it's easy to call the decode() method of a string object and pass the expected encoding and error handler. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 09:02:59 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2021 14:02:59 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636552979.97.0.657636236285.issue45778@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 09:05:12 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 10 Nov 2021 14:05:12 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636553112.92.0.0659375095296.issue45778@roundup.psfhosted.org> STINNER Victor added the comment: - _PyUnicode_DecodeUnicodeEscape at Base Removed by: commit 7c722e32bf582108680f49983cf01eaed710ddb9 Author: Serhiy Storchaka Date: Thu Oct 14 20:03:29 2021 +0300 [3.9] bpo-45461: Fix IncrementalDecoder and StreamReader in the "unicode-escape" codec (GH-28939) (GH-28945) They support now splitting escape sequences between input chunks. Add the third parameter "final" in codecs.unicode_escape_decode(). It is True by default to match the former behavior. (cherry picked from commit c96d1546b11b4c282a7e21737cb1f5d16349656d) Co-authored-by: Serhiy Storchaka ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 09:11:03 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 10 Nov 2021 14:11:03 +0000 Subject: [issue45778] libpython.so 3.9.8 drops symbol used by third party extension module(s) In-Reply-To: <1636546309.5.0.657250310979.issue45778@roundup.psfhosted.org> Message-ID: <1636553463.53.0.19950902813.issue45778@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 09:41:33 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 10 Nov 2021 14:41:33 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1636555293.57.0.857333790872.issue10483@roundup.psfhosted.org> ?ric Araujo added the comment: It?s not clear to me if CGI support in http.server is a relic or still something useful and in wide use. You can for sure make a pull request and see if a core dev will review and merge it, or you could raise the question on Discuss to see what people think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 09:49:02 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Nov 2021 14:49:02 +0000 Subject: [issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows In-Reply-To: <1636527276.55.0.818316908818.issue45776@roundup.psfhosted.org> Message-ID: <1636555742.29.0.79631037964.issue45776@roundup.psfhosted.org> Raymond Hettinger added the comment: > this coincides with collection ABCs being made unavailable directly from `collections` with this 3.9 -> 3.10 version change Direct access from collections was removed after being deprecated for almost almost a decade ago: "Using or importing the ABCs from 'collections' instead " "of from 'collections.abc' is deprecated since Python 3.3, " "and in 3.10 it will stop working" So Windows is correctly reporting an AttributeError. The mystery is why it is still accessible on a Mac. That seems like a bug. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 10:06:38 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 15:06:38 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636556798.54.0.820316697466.issue45723@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27769 pull_request: https://github.com/python/cpython/pull/29517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 10:30:28 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 15:30:28 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636558228.09.0.705144363412.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 76d14fac72479e0f5f5b144d6968ecd9e594db34 by Erlend Egeberg Aasland in branch 'main': bpo-45723: Improve and simplify more configure.ac checks (GH-29485) https://github.com/python/cpython/commit/76d14fac72479e0f5f5b144d6968ecd9e594db34 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 10:53:21 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Nov 2021 15:53:21 +0000 Subject: [issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows In-Reply-To: <1636527276.55.0.818316908818.issue45776@roundup.psfhosted.org> Message-ID: <1636559601.17.0.760832874149.issue45776@roundup.psfhosted.org> Mark Dickinson added the comment: On Mac, collections.abc is imported at startup time via site.py (which imports rlcompleter, which imports inspect, which imports collections.abc). I'd guess it's the same on Linux. mdickinson at mirzakhani cpython % ./python.exe Python 3.11.0a2+ (heads/main:76d14fac72, Nov 10 2021, 15:43:54) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys; "collections.abc" in sys.modules True >>> ^D mdickinson at mirzakhani cpython % ./python.exe -S Python 3.11.0a2+ (heads/main:76d14fac72, Nov 10 2021, 15:43:54) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin >>> import sys; "collections.abc" in sys.modules False >>> ^D ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 10:54:40 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Nov 2021 15:54:40 +0000 Subject: [issue21501] docs: mmap example for use in documentation In-Reply-To: <1400008733.4.0.146542624997.issue21501@psf.upfronthosting.co.za> Message-ID: <1636559680.12.0.970236201412.issue21501@roundup.psfhosted.org> Guido van Rossum added the comment: We would need the OP to sign a CLA in order to be able to use (a modified version of) his code. I presume this page is where the example was supposed to go? https://docs.python.org/3/library/mmap.html Let me ask first -- does that page really need another example? If so, is the OP's example (made working) really the best one? Perhaps there are blog posts that cover how to use mmap already, and the reference docs don't need such an extensive example? In that case we could just close this (ancient) issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:38:29 2021 From: report at bugs.python.org (Martin) Date: Wed, 10 Nov 2021 16:38:29 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1636562309.98.0.966118809664.issue43656@roundup.psfhosted.org> Martin added the comment: Thanks Joe! > 1. The changes are sufficient to let the user make things work the way it is requested that they work and anyone who does not start using the new format_locals parameter will get the old behavior. That was my goal :) > 2. A side comment: I just noticed that the docstring for FrameSummary.__init__ does not document the filename, lineno, and name parameters. Perhaps this could be fixed at the same time? I agree and already updated the pull request. > 3. The new parameter format_locals is slightly confusingly named, because it does not format a single string from all the locals but instead gives a dictionary of strings with one string for each local. I think format_locals is OK here (local*s*: plural), but I'm open to better suggestions. > 4. I personally think it would be better to include something like the example value for format_locals as an extra attribute of the traceback module so everybody doesn't have to write the same function. That said, the documented example is sufficient. I sort of agree, but I also don't know what such a general-purpose function would entail. Suggestions? > 5. It is not clear to me why this stringify-ing of the locals can't be done in StackSummary._extract_from_extended_frame_gen. It passes the dictionary of locals and also the function to transform it to FrameSummary. It would make more sense to transform it first. I suppose there might be some user somewhere who is directly calling FrameSummary so the interface needs to stay. I agree! In principle, FrameSummary has been little more than a container without (much) logic of its own. Memory efficiency requires that that FrameSummary does not hold references to the original locals, thats why repr() was used. I think as well that it would have been better to keep FrameSummary as a mere container and do the conversion of the locals elsewhere. But at this point, this shouldn't be changed anymore. > 6. I fantasize that the new format_locals parameter would have access to the frame object. In order for this to happen, the frame object would have to be passed to FrameSummary instead of the 3 values (locals, name, filename) that are extracted from it. I think the current interface of FrameSummary was designed to interoperate with very old versions of Python. Oh well. Do you have a use case for that? I have no clue what you would do with the frame object at this point. > 7. If anyone wanted to ever refactor FrameSummary (e.g., to enable my fantasy in point #6 just above), it becomes harder after this. This change has the effect of exposing details of the interface of FrameSummary to users of StackSummary.extract and TracebackException. The four parameters that the new parameter format_locals takes are most of the parameters of FrameSummary. Previously, I totally misread your request to "not just the local variable values, but also the name of the local variable and maybe also the stack frame it is in". This is why I included filename, lineno and name as parameters to format_locals which now seems totally useless to me and I'll remove them (if nobody objects). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:47:54 2021 From: report at bugs.python.org (Zhang Zheng) Date: Wed, 10 Nov 2021 16:47:54 +0000 Subject: [issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon Message-ID: <1636562874.34.0.208720566335.issue45779@roundup.psfhosted.org> New submission from Zhang Zheng : Hi, I have encountered an error when working with concurrent.futures.ProcessPoolExecutor API, with CPython 3.9.6 on Apple Silicon, the error can not be reproduced with CPython 3.9.6 Linux/X86 build, so I think this might be related to the arch. I have created a github repo with the code in poc.py file, and the error message in README, please let me know if there's anything more I can provide to help the investigation to the problem. ---------- components: Library (Lib) messages: 406108 nosy: zhangzheng priority: normal severity: normal status: open title: multiprocessing initializer error with CPython 3.9.6 on Apple Silicon type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:48:31 2021 From: report at bugs.python.org (Zhang Zheng) Date: Wed, 10 Nov 2021 16:48:31 +0000 Subject: [issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon In-Reply-To: <1636562874.34.0.208720566335.issue45779@roundup.psfhosted.org> Message-ID: <1636562911.03.0.545793207601.issue45779@roundup.psfhosted.org> Zhang Zheng added the comment: Hi, I have encountered an error when working with concurrent.futures.ProcessPoolExecutor API, with CPython 3.9.6 on Apple Silicon, the error can not be reproduced with CPython 3.9.6 Linux/X86 build, so I think this might be related to the arch. I have created a github repo with the code in poc.py file, and the error message in README, please let me know if there's anything more I can provide to help the investigation to the problem. https://github.com/simsicon/multiprocessing-initializer ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:48:31 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Nov 2021 16:48:31 +0000 Subject: [issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows In-Reply-To: <1636527276.55.0.818316908818.issue45776@roundup.psfhosted.org> Message-ID: <1636562911.97.0.111649044213.issue45776@roundup.psfhosted.org> Raymond Hettinger added the comment: > On Mac, collections.abc is imported at startup time > via site.py (which imports rlcompleter, which imports > inspect, which imports collections.abc). In inspect.py, the import of collections.abc is only used inside isawaitable(). We could make that a deferred import. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:54:27 2021 From: report at bugs.python.org (mike mcleod) Date: Wed, 10 Nov 2021 16:54:27 +0000 Subject: [issue21501] docs: mmap example for use in documentation In-Reply-To: <1400008733.4.0.146542624997.issue21501@psf.upfronthosting.co.za> Message-ID: <1636563267.05.0.97533909205.issue21501@roundup.psfhosted.org> mike mcleod added the comment: One of the things I did when the example code didn't work was to see what other examples could be found and there are I would argue plenty or just enough, eg: https://medium.com/analytics-vidhya/memory-mapping-files-and-mmap-module-in-python-with-lot-of-examples-d1a9a45fe9a3 And google will fetch more if needed. May I suggest back in 2014 when the issue was raised that this may have been a good example, but mmap is not so new and in the intervening time anybody who needed further examples simply googled them. Hence, I suggest its not needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:55:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 16:55:11 +0000 Subject: [issue44319] setup openssl failed on linux In-Reply-To: <1622922030.41.0.294175639013.issue44319@roundup.psfhosted.org> Message-ID: <1636563311.56.0.934441009653.issue44319@roundup.psfhosted.org> Christian Heimes added the comment: Update: I came up with a hack that lets you use the openssl11 module from EPEL with Python: https://discuss.python.org/t/modulenotfounderror-no-module-named-mysql-in-python-3-10-0-default-nov-6-2021-1425-gcc-4-8-5-20150623-red-hat-4-8-5-44-on-linux/11823/5?u=tiran sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:56:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Nov 2021 16:56:54 +0000 Subject: [issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows In-Reply-To: <1636527276.55.0.818316908818.issue45776@roundup.psfhosted.org> Message-ID: <1636563414.23.0.3388931274.issue45776@roundup.psfhosted.org> Raymond Hettinger added the comment: Also, the collections module could simply delete abc if it already exists due to collections.abc being imported first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:57:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 10 Nov 2021 16:57:23 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636563443.53.0.765780059401.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 05fbd60147456d77a7aecf29dddd86c5bde5872f by Irit Katriel in branch 'main': bpo-45711: Use _PyErr_ClearExcState instead of setting only exc_value to NULL (GH-29404) https://github.com/python/cpython/commit/05fbd60147456d77a7aecf29dddd86c5bde5872f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 11:57:52 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Nov 2021 16:57:52 +0000 Subject: [issue21501] docs: mmap example for use in documentation In-Reply-To: <1400008733.4.0.146542624997.issue21501@psf.upfronthosting.co.za> Message-ID: <1636563472.68.0.149921219609.issue21501@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks for the research! I will close the issue now. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 12:00:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Nov 2021 17:00:27 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636552655.36.0.518518966448.issue45777@roundup.psfhosted.org> Message-ID: Steve Dower added the comment: > I just installed it and can confirm that there's no embedded manifest in "C:\Program Files\WindowApps\PythonSoftwareFoundation.Python.3.9<...>\python.exe". Strange, because when I inspect the files that I published, it's there. It's also in the version that I installed on another machine from the Store. How are you checking whether it's there or not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 12:32:13 2021 From: report at bugs.python.org (mike mcleod) Date: Wed, 10 Nov 2021 17:32:13 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1636565533.82.0.0995230940505.issue10483@roundup.psfhosted.org> mike mcleod added the comment: I have put the question on Discuss and wait for (any) responses, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 12:37:02 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 10 Nov 2021 17:37:02 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636565822.62.0.424984281346.issue45777@roundup.psfhosted.org> Eryk Sun added the comment: > How are you checking whether it's there or not? The desktop distribution of 3.9.8 is the most obvious case, since it causes sys.getwindowsversion() to report Windows 8.0 (6.2.9200): C:\Temp>"C:\Program Files\Python39\python.exe" -q >>> import sys >>> sys.getwindowsversion() sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='') But I checked for the manifest directly using the SDK manifest tool, mt.exe. It's missing in 3.9.8: C:\Temp>set file=C:\Program Files\Python39\python.exe C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest mt : general error c101008c: Failed to read the manifest from the resource of file "C:\Program Files\Python39\python.exe". The specified resource type cannot be found in the image file. C:\Temp>set file=C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0\python.exe C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest mt : general error c101008c: Failed to read the manifest from the resource of file "C:\Program Files\WindowsApps \PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0 \python.exe". The specified resource type cannot be found in the image file. For comparison, the manifest is present in 3.10, which was built over a month ago: C:\Temp>set file=C:\Program Files\Python310\python.exe C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest C:\Temp>findstr longPathAware python.manifest true C:\Temp>set file=C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.240.0_x64__qbz5n2kfra8p0\python.exe C:\Temp>mt -nologo -inputresource:"%file%";#1 -out:python.manifest C:\Temp>findstr longPathAware python.manifest true ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 12:46:37 2021 From: report at bugs.python.org (Steve Canny) Date: Wed, 10 Nov 2021 17:46:37 +0000 Subject: [issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows In-Reply-To: <1636527276.55.0.818316908818.issue45776@roundup.psfhosted.org> Message-ID: <1636566397.25.0.910221489742.issue45776@roundup.psfhosted.org> Steve Canny added the comment: The resolution for me (the python-pptx and python-docx libraries) is clear, to add a separate `import collections.abc` statement rather than assuming (hoping) that the `collections.abc` module is available on an `abc` attribute of the `collections` module. I chalk that up to a gap in my knowledge of the guarantees provided by module imports and falling into trusting my method just because it worked :) But I will argue for maintenance of backward compatibility here, just for the sake of those unable or unwilling to modify existing code. 1. Removing the availability of e.g. `Container` directly from `collections` is not the same as removing the availability of `abc` from collections. The deprecation warning we have all seen many times admits both interpretations. So I would argue we have at least not _explicitly_ stated that `import collections; collections.abc` would stop working. 2. `import collections; collections.abc` worked in Windows Python 3.9.6. As such, it was part of the de-facto spec. When we publish a behavior, a certain number of folks will come to depend on it, whether it is stated or not. So there will be breakage here. It's not my place to judge whether the breakage or restoration of the behavior is the greater value; my claim is only that there will be breakage cost. That would include the time to deal with additional issue reports from folks who don't find this issue before reporting. So I've said my piece on this. I'm grateful for your attention to this conversation and will cheerfully accept whatever resolution you decide on. Thanks to all of you for participating in this great project that empowers so many; I'm very proud to be a small part of it :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 13:08:41 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Nov 2021 18:08:41 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636567721.84.0.534097447487.issue45711@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 4cdeee5978ee3f8ea7fe95172ae04d866cd88177 by Irit Katriel in branch 'main': bpo-45711: remove unnecessary DUP_TOP and POP in exception handling (GH-29495) https://github.com/python/cpython/commit/4cdeee5978ee3f8ea7fe95172ae04d866cd88177 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 13:22:48 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Nov 2021 18:22:48 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636568568.76.0.337825365306.issue45235@roundup.psfhosted.org> Guido van Rossum added the comment: This has caused a regression, also reported here: https://github.com/Azure/azure-cli/issues/20269 Global Arguments stop working in Python 3.9.8 Can we please get some attention from @rhettinger and @ambv? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 13:46:20 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 10 Nov 2021 18:46:20 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636569980.21.0.0519094083007.issue45754@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c1323d4b8cb010a06c11bace6e681bea7f895851 by Erlend Egeberg Aasland in branch 'main': bpo-45754: Use correct SQLite limit when checking statement length (GH-29489) https://github.com/python/cpython/commit/c1323d4b8cb010a06c11bace6e681bea7f895851 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 13:50:09 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Nov 2021 18:50:09 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636570209.28.0.581412430542.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: Unless anyone objects, I'll revert this across all affected branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 13:57:26 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Nov 2021 18:57:26 +0000 Subject: [issue43923] Can't create generic NamedTuple as of py3.9 In-Reply-To: <1619194976.58.0.205362589455.issue43923@roundup.psfhosted.org> Message-ID: <1636570646.6.0.380120072636.issue43923@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 for reverting this change and restoring the previous behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:17:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 10 Nov 2021 19:17:44 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636571864.39.0.597459404233.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +27770 pull_request: https://github.com/python/cpython/pull/29518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:24:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Nov 2021 19:24:27 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636572267.08.0.729144552453.issue45777@roundup.psfhosted.org> Steve Dower added the comment: Oh I think I know what happened. Because RT_MANIFEST wasn't defined, it was added as a resource tagged with that as a string. So the manifest is still embedded, just not under the right type constant, so it has no effect. Yeah, I think we should do a fresh release. Perhaps combined with the recent Tk updates for macOS we'll have more releases soon anyway? ---------- keywords: +3.9regression nosy: +lukasz.langa versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:25:07 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Nov 2021 19:25:07 +0000 Subject: [issue45777] Issue in reading files with a path longer than 256 letters after latest update In-Reply-To: <1636537731.96.0.00930160338556.issue45777@roundup.psfhosted.org> Message-ID: <1636572307.56.0.337897835699.issue45777@roundup.psfhosted.org> Steve Dower added the comment: Marking this as fixed, because the fix is already checked in. Release scheduling is a separate conversation, so keep an eye out for the next release. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:27:04 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 19:27:04 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac In-Reply-To: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> Message-ID: <1636572424.58.0.706240885058.issue45747@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 0a9f69539be27acf1cddf1b58d02a88d02e5008d by Christian Heimes in branch 'main': bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467) https://github.com/python/cpython/commit/0a9f69539be27acf1cddf1b58d02a88d02e5008d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:32:49 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 10 Nov 2021 19:32:49 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636572769.04.0.453031608691.issue45235@roundup.psfhosted.org> ?ukasz Langa added the comment: Go for it, Raymond. ---------- nosy: +lukasz.langa resolution: fixed -> stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:51:57 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 10 Nov 2021 19:51:57 +0000 Subject: [issue45053] MD5SumTests.test_checksum_fodder fails on Windows In-Reply-To: <1630347779.05.0.821089086925.issue45053@roundup.psfhosted.org> Message-ID: <1636573917.61.0.719669955679.issue45053@roundup.psfhosted.org> Andrei Kulakov added the comment: This was fixed in https://github.com/python/cpython/commit/dd7b816ac87, perhaps this should be closed as fixed? It sounds like the general solution is beyond the scope of this issue and doesn't need to be tracked here. ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:54:32 2021 From: report at bugs.python.org (Brandt Bucher) Date: Wed, 10 Nov 2021 19:54:32 +0000 Subject: [issue45757] compiler emits EXTENDED_ARG + NOP sequence in 3.10 In-Reply-To: <1636409573.19.0.31373204469.issue45757@roundup.psfhosted.org> Message-ID: <1636574072.77.0.561939181459.issue45757@roundup.psfhosted.org> Brandt Bucher added the comment: Here's a (more) minimal reproducer I've been able to create: ``` # First, "use up" 256 unique constants: spam=0x00;spam=0x01;spam=0x02;spam=0x03;spam=0x04;spam=0x05;spam=0x06;spam=0x07; spam=0x08;spam=0x09;spam=0x0a;spam=0x0b;spam=0x0c;spam=0x0d;spam=0x0e;spam=0x0f; spam=0x10;spam=0x11;spam=0x12;spam=0x13;spam=0x14;spam=0x15;spam=0x16;spam=0x17; spam=0x18;spam=0x19;spam=0x1a;spam=0x1b;spam=0x1c;spam=0x1d;spam=0x1e;spam=0x1f; spam=0x20;spam=0x21;spam=0x22;spam=0x23;spam=0x24;spam=0x25;spam=0x26;spam=0x27; spam=0x28;spam=0x29;spam=0x2a;spam=0x2b;spam=0x2c;spam=0x2d;spam=0x2e;spam=0x2f; spam=0x30;spam=0x31;spam=0x32;spam=0x33;spam=0x34;spam=0x35;spam=0x36;spam=0x37; spam=0x38;spam=0x39;spam=0x3a;spam=0x3b;spam=0x3c;spam=0x3d;spam=0x3e;spam=0x3f; spam=0x40;spam=0x41;spam=0x42;spam=0x43;spam=0x44;spam=0x45;spam=0x46;spam=0x47; spam=0x48;spam=0x49;spam=0x4a;spam=0x4b;spam=0x4c;spam=0x4d;spam=0x4e;spam=0x4f; spam=0x50;spam=0x51;spam=0x52;spam=0x53;spam=0x54;spam=0x55;spam=0x56;spam=0x57; spam=0x58;spam=0x59;spam=0x5a;spam=0x5b;spam=0x5c;spam=0x5d;spam=0x5e;spam=0x5f; spam=0x60;spam=0x61;spam=0x62;spam=0x63;spam=0x64;spam=0x65;spam=0x66;spam=0x67; spam=0x68;spam=0x69;spam=0x6a;spam=0x6b;spam=0x6c;spam=0x6d;spam=0x6e;spam=0x6f; spam=0x70;spam=0x71;spam=0x72;spam=0x73;spam=0x74;spam=0x75;spam=0x76;spam=0x77; spam=0x78;spam=0x79;spam=0x7a;spam=0x7b;spam=0x7c;spam=0x7d;spam=0x7e;spam=0x7f; spam=0x80;spam=0x81;spam=0x82;spam=0x83;spam=0x84;spam=0x85;spam=0x86;spam=0x87; spam=0x88;spam=0x89;spam=0x8a;spam=0x8b;spam=0x8c;spam=0x8d;spam=0x8e;spam=0x8f; spam=0x90;spam=0x91;spam=0x92;spam=0x93;spam=0x94;spam=0x95;spam=0x96;spam=0x97; spam=0x98;spam=0x99;spam=0x9a;spam=0x9b;spam=0x9c;spam=0x9d;spam=0x9e;spam=0x9f; spam=0xa0;spam=0xa1;spam=0xa2;spam=0xa3;spam=0xa4;spam=0xa5;spam=0xa6;spam=0xa7; spam=0xa8;spam=0xa9;spam=0xaa;spam=0xab;spam=0xac;spam=0xad;spam=0xae;spam=0xaf; spam=0xb0;spam=0xb1;spam=0xb2;spam=0xb3;spam=0xb4;spam=0xb5;spam=0xb6;spam=0xb7; spam=0xb8;spam=0xb9;spam=0xba;spam=0xbb;spam=0xbc;spam=0xbd;spam=0xbe;spam=0xbf; spam=0xc0;spam=0xc1;spam=0xc2;spam=0xc3;spam=0xc4;spam=0xc5;spam=0xc6;spam=0xc7; spam=0xc8;spam=0xc9;spam=0xca;spam=0xcb;spam=0xcc;spam=0xcd;spam=0xce;spam=0xcf; spam=0xd0;spam=0xd1;spam=0xd2;spam=0xd3;spam=0xd4;spam=0xd5;spam=0xd6;spam=0xd7; spam=0xd8;spam=0xd9;spam=0xda;spam=0xdb;spam=0xdc;spam=0xdd;spam=0xde;spam=0xdf; spam=0xe0;spam=0xe1;spam=0xe2;spam=0xe3;spam=0xe4;spam=0xe5;spam=0xe6;spam=0xe7; spam=0xe8;spam=0xe9;spam=0xea;spam=0xeb;spam=0xec;spam=0xed;spam=0xee;spam=0xef; spam=0xf0;spam=0xf1;spam=0xf2;spam=0xf3;spam=0xf4;spam=0xf5;spam=0xf6;spam=0xf7; spam=0xf8;spam=0xf9;spam=0xfa;spam=0xfb;spam=0xfc;spam=0xfd;spam=0xfe;spam=0xff; # Then, define a function with at least two default positional arguments that: # - are all constants # - span multiple lines # - include a previously unused constant value def foo( bar=0x100, # <-- This becomes EXTENDED_ARG(1) + NOP(0). baz=0x00, ): pass # The peephole pass will fold the constant default value tuple construction for # the function definition, but leave behind NOPs that cannot be removed (because # it would break tracing guarantees). One of these NOPs will still have a # "large" oparg. ``` It's not really that hard to create unused arguments... it's just hard to make them large enough to need an EXTENDED_ARG! For example, `a, b = b, a` creates a ROT_TWO with an unused argument. Given the pretty tight coupling (and speed/simplicity) of instrsize and write_op_arg, I now think the best fix would instead just be adding another pass immediately before assemble_jump_offsets that does something like this: ``` static void fix_opargs(struct assembler *a) { for (basicblock *b = a->a_entry; b != NULL; b = b->b_next) { for (int i = 0; i < b->b_iused; i++) { if (b->b_instr[i].i_opcode < HAVE_ARGUMENT) { // Opcodes with unused arguments may have been introduced during // the optimization process: b->b_instr[i].i_oparg = 0; } } } } ``` Even though it's quite straightforward to fix, I only really think it's worth doing if it annoys us enough that many non-argument-using instructions are indeed emitted with nonzero arguments. I'm starting to feel like it will only complicate things and possibly slow down compilation times (granted, probably by a very small amount, but it's not nothing). Besides the above example, (which was informed by the linked PyInstaller discussion, thanks Rok), I haven't actually been able to coax the compiler into emitting these extra EXTENDED_ARGs in *any* other situation. TL;DR: This is super rare, doesn't actually cause any problems, and incurs a small compile-time cost to "fix". Close as "won't fix"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:57:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Nov 2021 19:57:38 +0000 Subject: [issue45696] "Deep-freeze": skip the marshal step by generating C code In-Reply-To: <1635898596.2.0.043840127306.issue45696@roundup.psfhosted.org> Message-ID: <1636574258.76.0.314994330525.issue45696@roundup.psfhosted.org> Guido van Rossum added the comment: After PR 29118 is merged we get the benefits on UNIXy systems. We have several TODOs left then: - (Definitely:) Generate Windows build files - (Probably:) Find a way to avoid having to regenerate everything whenever any source file changes (any source file -> _bootstrap_python -> all generated files) - (Maybe:) Consider putting all generated code together in one file, for more savings (and build simplification) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 14:58:15 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 19:58:15 +0000 Subject: [issue45747] Detect dbm and gdbm dependencies in configure.ac In-Reply-To: <1636367248.6.0.316133977839.issue45747@roundup.psfhosted.org> Message-ID: <1636574295.7.0.250254782339.issue45747@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 15:55:42 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 10 Nov 2021 20:55:42 +0000 Subject: [issue45091] inspect.Parameter.__str__ does not include subscripted types in annotations In-Reply-To: <1630632332.35.0.622998937307.issue45091@roundup.psfhosted.org> Message-ID: <1636577742.72.0.171268639442.issue45091@roundup.psfhosted.org> Andrei Kulakov added the comment: I have confirmed and tested -- this was fixed in https://github.com/python/cpython/pull/29212 and so I'm closing it as fixed. ---------- nosy: +andrei.avk, kj resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:14:59 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Nov 2021 21:14:59 +0000 Subject: [issue45780] dict. keys view behavious diverges from set() Message-ID: <1636578899.28.0.498722487366.issue45780@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- components: Interpreter Core nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: dict. keys view behavious diverges from set() type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:16:36 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Nov 2021 21:16:36 +0000 Subject: [issue45780] dict. keys view behavious diverges from set() Message-ID: <1636578996.91.0.826982592986.issue45780@roundup.psfhosted.org> New submission from Gregory P. Smith : Python 3.9.7 (default, Sep 24 2021, 09:43:00) [GCC 10.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> dict(a=3,b=5).keys() dict_keys(['a', 'b']) >>> dict(a=3,b=5).keys() - 'a' {'b'} >>> dict(a=3,b=5).keys() - 'ab' set() >>> set(('a', 'b')) {'b', 'a'} >>> set(('a', 'b')) - 'ab' Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for -: 'set' and 'str' >>> set(('a', 'b')).difference('ab') set() basically it looks like the keys view treats - as .difference() whereas set() avoids bugs in its operators by requiring both to be sets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:17:27 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Nov 2021 21:17:27 +0000 Subject: [issue45780] dict. keys view behaviour diverges from set() In-Reply-To: <1636578996.91.0.826982592986.issue45780@roundup.psfhosted.org> Message-ID: <1636579047.36.0.242786929554.issue45780@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- title: dict. keys view behavious diverges from set() -> dict. keys view behaviour diverges from set() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:24:16 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Nov 2021 21:24:16 +0000 Subject: [issue45780] dict. keys view behaviour diverges from set() In-Reply-To: <1636578996.91.0.826982592986.issue45780@roundup.psfhosted.org> Message-ID: <1636579456.21.0.519157877442.issue45780@roundup.psfhosted.org> Gregory P. Smith added the comment: Joshua pointed out that https://bugs.python.org/issue26973 appears to cover this. we rejected the idea of changing it at the time. it'd still be nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:35:25 2021 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Nov 2021 21:35:25 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636580125.2.0.837839486758.issue45573@roundup.psfhosted.org> Brett Cannon added the comment: SGTM! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:40:29 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 10 Nov 2021 21:40:29 +0000 Subject: [issue45754] [sqlite3] SQLITE_LIMIT_LENGTH is incorrectly used to check statement length In-Reply-To: <1636393200.96.0.803607204185.issue45754@roundup.psfhosted.org> Message-ID: <1636580429.75.0.893084655336.issue45754@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 16:43:07 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Nov 2021 21:43:07 +0000 Subject: [issue45780] dict. keys view behaviour diverges from set() In-Reply-To: <1636578996.91.0.826982592986.issue45780@roundup.psfhosted.org> Message-ID: <1636580587.09.0.474557618004.issue45780@roundup.psfhosted.org> Raymond Hettinger added the comment: This is a bug dictviews_sub(). It that incorrectly calls difference_update() instead of set_isub() which would perform the requisite type check. Note the KeysView ABC is correct and implements the type check. This situation is unfortunate. Adding the type check will help prevent future bugs; however, it will likely also break some existing code that is currently working correctly. My recommendation is to leave it as-is and live with it. That is what we did with list.iadd() which has the same problem. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 17:02:27 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 22:02:27 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1636581747.31.0.524603820769.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset fc9b62281931da8d20f85d5ed44cfc24f068d3f4 by Christian Heimes in branch 'main': bpo-45723: Add --with-pkg-config to configure (GH-29517) https://github.com/python/cpython/commit/fc9b62281931da8d20f85d5ed44cfc24f068d3f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 17:48:33 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Nov 2021 22:48:33 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636584513.27.0.618936530224.issue45573@roundup.psfhosted.org> Ned Deily added the comment: SGTM,2 This all sounds great. I think a goal here should be to remove all header and lib file searching from setup.py as that has always been a bug magnet. Perhaps one workaround for those libs that don't (yet) provide .pc files would be for us to supply reasonable default .pc for them, if possible, so that most builders wouldn't have to set the MODULE_xxx_*FLAGS variables while still removing the header/lib file searching from setup.py? Also it would be great to document how using pkg-config works in generic cross-compiling cases; we should strive to make at least the most common cases just work with minimal tweaking of configure arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 18:15:18 2021 From: report at bugs.python.org (Alex Waygood) Date: Wed, 10 Nov 2021 23:15:18 +0000 Subject: [issue43923] Can't create generic NamedTuple as of py3.9 In-Reply-To: <1619194976.58.0.205362589455.issue43923@roundup.psfhosted.org> Message-ID: <1636586118.13.0.281604265097.issue43923@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 18:43:10 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 10 Nov 2021 23:43:10 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636587790.58.0.575578389169.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: gdbmmodule and dbmmodule need special treatment anyway. macOS has dbm-API build into libc. Linux has either libgdbm_compat, libndbm, or libdb. The --with-dbmliborder makes it even more interesting. Users can override in which order they want to probe for gdbm, ndbm, and libdb. We have to keep the "manual" library and header checks. Cross-compilation with pkg-config uses a trivial wrapper script, https://autotools.io/pkgconfig/cross-compiling.html . The build system has to create and provide a script with correct sysroot setting. Is traditional cross-compiling work still useful these days anyway? Emulation has made big leaps in the last decade. Emulated cross compiling with qemu has become widespread. It also has the big advantage that you can run the test suite on the emulated hardware and verify that your binaries work. AFAIK Fedora's build system uses qemu for a bunch of hardware targets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 18:59:10 2021 From: report at bugs.python.org (CoolCat467) Date: Wed, 10 Nov 2021 23:59:10 +0000 Subject: [issue45357] Idle does not check user config for extention configuration In-Reply-To: <1633297342.93.0.20149347886.issue45357@roundup.psfhosted.org> Message-ID: <1636588750.56.0.991580348881.issue45357@roundup.psfhosted.org> CoolCat467 added the comment: In a classroom circumstance, yes, that kind of makes sense, but at the moment, if you want to add an extension you have to either manually edit the file, or let a automated script touch your entire system with root permissions that could be doing who knows what else. And trying to install extensions on windows has proved nearly impossible for me. No matter what I've tried, I haven't been able to change the system config file. Now, on Linux everything is fine, but still. I would think that people who use IDLE in general would benefit from this change, and could potentially make extension use more popular instead of going to third party and potentially closed source editors. I don't like that other, more popular editors have more capabilities just because writing extensions might be easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 19:16:38 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 11 Nov 2021 00:16:38 +0000 Subject: [issue45550] Increase the information content and robustness of tp_version_tag. In-Reply-To: <1634811413.15.0.703765256195.issue45550@roundup.psfhosted.org> Message-ID: <1636589798.28.0.0545781699547.issue45550@roundup.psfhosted.org> Change by Mark Shannon : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 20:53:52 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 11 Nov 2021 01:53:52 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() In-Reply-To: <1636470983.21.0.286113384782.issue45766@roundup.psfhosted.org> Message-ID: <1636595632.71.0.0619922419384.issue45766@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi Raymond, I'm conflicted by this. Regression through the origin is clearly a thing which is often desired. In that sense, I'm happy to see it added, and thank you. But on the other hand, this may open a can of worms that I personally don't feel entirely competent to deal with. Are you happy to hold off a few days while I consult with some statistics experts? - There is some uncertainty as to the correct method of calculation, with many stats packages giving different results for the same data, e.g. https://web.ist.utl.pt/~ist11038/compute/errtheory/,regression/regrthroughorigin.pdf - Forcing the intercept through the origin is a dubious thing to do, even if you think it is theoretically justified, see for example the above paper, also: https://dynamicecology.wordpress.com/2017/04/13/dont-force-your-regression-through-zero-just-because-you-know-the-true-intercept-has-to-be-zero/ https://www.theanalysisfactor.com/regression-through-the-origin/ - Regression through the origin needs a revised calculation for the coefficient of determination (Pearson's R squared): https://pubs.cif-ifc.org/doi/pdf/10.5558/tfc71326-3 https://www.researchgate.net/publication/283333191_Re-interpreting_R-squared_regression_through_the_origin_and_weighted_least_squares but it's not clear how to revise the calculation, with some methods giving R squared negative or greater than 1. - Regression through the origin is only one of a number of variants of least-squares linear regression that we might also wish to offer, e.g. intercept-only, Deming or orthogonal regression. https://en.wikipedia.org/wiki/Deming_regression ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 21:02:10 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 11 Nov 2021 02:02:10 +0000 Subject: [issue45696] "Deep-freeze": skip the marshal step by generating C code In-Reply-To: <1635898596.2.0.043840127306.issue45696@roundup.psfhosted.org> Message-ID: <1636596130.56.0.784984784632.issue45696@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 1cbaa505d007e11c4a1f0d2073d72b6c02c7147c by Guido van Rossum in branch 'main': bpo-45696: Deep-freeze selected modules (GH-29118) https://github.com/python/cpython/commit/1cbaa505d007e11c4a1f0d2073d72b6c02c7147c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 21:02:10 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 11 Nov 2021 02:02:10 +0000 Subject: [issue45020] Freeze all modules imported during startup. In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org> Message-ID: <1636596130.63.0.708720183401.issue45020@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 1cbaa505d007e11c4a1f0d2073d72b6c02c7147c by Guido van Rossum in branch 'main': bpo-45696: Deep-freeze selected modules (GH-29118) https://github.com/python/cpython/commit/1cbaa505d007e11c4a1f0d2073d72b6c02c7147c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 21:07:51 2021 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 11 Nov 2021 02:07:51 +0000 Subject: [issue40421] [C API] Add getter functions for PyFrameObject and maybe move PyFrameObject to the internal C API In-Reply-To: <1588079870.34.0.984904607646.issue40421@roundup.psfhosted.org> Message-ID: <1636596471.6.0.15317931187.issue40421@roundup.psfhosted.org> Ned Batchelder added the comment: I went ahead and changed the coverage.py code to this: #if PY_VERSION_HEX >= 0x030B00A0 // 3.11 moved f_lasti into an internal structure. This is totally the wrong way // to make this work, but it's all I've got until https://bugs.python.org/issue40421 // is resolved. #include #define MyFrame_lasti(f) ((f)->f_frame->f_lasti * 2) #elif PY_VERSION_HEX >= 0x030A00A7 // The f_lasti field changed meaning in 3.10.0a7. It had been bytes, but // now is instructions, so we need to adjust it to use it as a byte index. #define MyFrame_lasti(f) ((f)->f_lasti * 2) #else #define MyFrame_lasti(f) ((f)->f_lasti) #endif If we had an API that let me distinguish between call and resume and between return and yield, I could get rid of this. ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 10 22:22:04 2021 From: report at bugs.python.org (Tim Peters) Date: Thu, 11 Nov 2021 03:22:04 +0000 Subject: [issue45735] Promise the long-time truth that `args=list` works In-Reply-To: <1636171321.93.0.670075505099.issue45735@roundup.psfhosted.org> Message-ID: <1636600924.17.0.59502870121.issue45735@roundup.psfhosted.org> Tim Peters added the comment: Changed stage back to "needs patch", since Raymond appears to have closed his PR. Raymond, what's up with that? ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:54:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Nov 2021 06:54:54 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() In-Reply-To: <1636470983.21.0.286113384782.issue45766@roundup.psfhosted.org> Message-ID: <1636613694.67.0.344679147943.issue45766@roundup.psfhosted.org> Raymond Hettinger added the comment: Sure, I?m happy to wait. My thoughts: * The first link you provided does give the same slope across packages. Where they differ is in how they choose to report statistics for assessing goodness of fit or for informing hypothesis testing. Neither of those apply to us. * The compared stats packages offer this functionality because some models don?t benefit from a non-zero constant. * The second link is of low quality and reads like hastily typed, stream of consciousness rant that roughly translates to ?As a blanket statement applicable to all RTO, I don?t believe the underlying process is linear and I don?t believe that a person could have a priori knowledge of a directly proportional relationship.? This is bunk ? a cold caller makes sales in direct proportion to the number of calls they make, and zero calls means zero sales. * The last point is a distractor. Dealing with error analysis or input error models is beyond the scope of the package. Doing something I could easily do with my HP-12C is within scope. * We?re offering users something simple. If you have a need to fit a data to directly proportional model, set a flag. * If we don?t offer the option, users have to do too much work to bridge from what we have to what they need: (covariance(x, y) + mean(x)*mean(y)) / (variance(x) + mean(x)**2) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:56:35 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 06:56:35 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1636613795.68.0.23804897238.issue45636@roundup.psfhosted.org> Brandt Bucher added the comment: New changeset 9178f533ff5ea7462a2ca22cfa67afd78dad433b by Brandt Bucher in branch 'main': bpo-45636: Merge all numeric operators (GH-29482) https://github.com/python/cpython/commit/9178f533ff5ea7462a2ca22cfa67afd78dad433b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 01:58:39 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 06:58:39 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1636613919.9.0.283469297697.issue45636@roundup.psfhosted.org> Change by Brandt Bucher : ---------- title: Merge BINARY_*/INPLACE_* into BINARY_OP/INPLACE_OP -> Merge BINARY_*/INPLACE_* into BINARY_OP _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 02:02:34 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 07:02:34 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1636614154.8.0.587947926509.issue45636@roundup.psfhosted.org> Brandt Bucher added the comment: Tasks for tomorrow: - Reimplement the string formatting fast-path as a proper specialization. - Try indexing into an array of function pointers instead of switching. - Experiment more generic specializations for all operators (for instance, when lhs.__class__ is rhs.__class__, or when only one valid implementation exists). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 04:45:11 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Thu, 11 Nov 2021 09:45:11 +0000 Subject: [issue45781] Deleting __debug__ should be an SyntaxError Message-ID: <1636623911.67.0.569601489226.issue45781@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : Right now, deleting __debug__ is not prevented: >>> def f(): ... del __debug__ ... Of course actually executing it doesn't work: >>> del __debug__ Traceback (most recent call last): File "", line 1, in NameError: name '__debug__' is not defined Compare with assigning to __debug__: >>> def f(): ... __debug__ = 1 ... File "", line 2 SyntaxError: cannot assign to __debug__ ---------- messages: 406149 nosy: Carl.Friedrich.Bolz priority: normal severity: normal status: open title: Deleting __debug__ should be an SyntaxError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 05:32:18 2021 From: report at bugs.python.org (Terje Myklebust) Date: Thu, 11 Nov 2021 10:32:18 +0000 Subject: [issue45782] Bug in struct.pack Message-ID: <1636626738.35.0.997508100791.issue45782@roundup.psfhosted.org> New submission from Terje Myklebust : >>> struct.pack("i", 119) b'w\x00\x00\x00' "w" in a binary value? >>> struct.pack("I", 116) b't\x00\x00\x00' "t" in a binary value? ---------- messages: 406150 nosy: terje.myklebust123 priority: normal severity: normal status: open title: Bug in struct.pack type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 05:34:54 2021 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 11 Nov 2021 10:34:54 +0000 Subject: [issue45783] test_freeze fails if a file is removed Message-ID: <1636626894.31.0.876516857977.issue45783@roundup.psfhosted.org> New submission from Petr Viktorin : In Fedora, we remove the bundled wheels; pip & co. are supplied (and kept updated) by the system. I believe this is good practice. However, removing any file from the CPython source checkout makes test_freeze fail: Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.11.0a2/Lib/test/test_tools/test_freeze.py", line 25, in test_freeze_simple_script outdir, scriptfile, python = helper.prepare(script) ^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/Python-3.11.0a2/Tools/freeze/test/freeze.py", line 144, in prepare git_copy_repo(srcdir, SRCDIR) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/Python-3.11.0a2/Tools/freeze/test/freeze.py", line 97, in git_copy_repo shutil.copy2(srcfile, dstfile) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/Python-3.11.0a2/Lib/shutil.py", line 436, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/builddir/build/BUILD/Python-3.11.0a2/Lib/shutil.py", line 256, in copyfile with open(src, 'rb') as fsrc: ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/builddir/build/BUILD/Python-3.11.0a2/Lib/ensurepip/_bundled/pip-21.2.4-py3-none-any.whl' It looks like this test is recreating uncommited modifications, is it OK to change it to support deletions as well? Also, `git status --porcelain` should be used to get the output in a stable format. ---------- messages: 406151 nosy: eric.snow, petr.viktorin priority: normal severity: normal status: open title: test_freeze fails if a file is removed versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 05:37:57 2021 From: report at bugs.python.org (Pavithra) Date: Thu, 11 Nov 2021 10:37:57 +0000 Subject: [issue45784] SAP HANA Training in Chennai Message-ID: <1636627077.73.0.882488207493.issue45784@roundup.psfhosted.org> New submission from Pavithra : SAP MM Training in Chennai SAP SD Training in Chennai SAP FICO Training in Chennai SAP ARIBA Training in Chennai SAP ABAP Training in Chennai SAP HR Training in Chennai SAP HANA Training in Chennai ---------- messages: 406152 nosy: Pavithra priority: normal severity: normal status: open title: SAP HANA Training in Chennai type: security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 05:43:12 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 11 Nov 2021 10:43:12 +0000 Subject: [issue45782] Bug in struct.pack In-Reply-To: <1636626738.35.0.997508100791.issue45782@roundup.psfhosted.org> Message-ID: <1636627392.08.0.634298473869.issue45782@roundup.psfhosted.org> Steven D'Aprano added the comment: The behaviour is correct. You have tripped over the ASCII representation of bytes. In ASCII, 119 (or in hex, 0x77) is displayed as 'w'. >>> b'\x77\x00\x00\x00' b'w\x00\x00\x00' ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 05:46:58 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 11 Nov 2021 10:46:58 +0000 Subject: [issue45784] SAP HANA Training in Chennai In-Reply-To: <1636627077.73.0.882488207493.issue45784@roundup.psfhosted.org> Message-ID: <1636627618.69.0.625937950965.issue45784@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 05:55:25 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 10:55:25 +0000 Subject: [issue45466] Simple curl/wget-like download functionality in urllib (like http offers server) In-Reply-To: <1634192112.29.0.508125660114.issue45466@roundup.psfhosted.org> Message-ID: <1636628125.51.0.540727937293.issue45466@roundup.psfhosted.org> STINNER Victor added the comment: I don't think that urllib.request is a great library. There are better replacements like https://www.python-httpx.org/ or https://urllib3.readthedocs.io/ urllib.request API is not great and it doesn't support HTTP2 (nor HTTP3). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 06:14:23 2021 From: report at bugs.python.org (Tom Pohl) Date: Thu, 11 Nov 2021 11:14:23 +0000 Subject: [issue45466] Simple curl/wget-like download functionality in urllib (like http offers server) In-Reply-To: <1634192112.29.0.508125660114.issue45466@roundup.psfhosted.org> Message-ID: <1636629263.58.0.833200000629.issue45466@roundup.psfhosted.org> Change by Tom Pohl : ---------- nosy: -tom.pohl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 06:21:31 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Nov 2021 11:21:31 +0000 Subject: [issue45779] multiprocessing initializer error with CPython 3.9.6 on Apple Silicon In-Reply-To: <1636562874.34.0.208720566335.issue45779@roundup.psfhosted.org> Message-ID: <1636629691.08.0.0126282303474.issue45779@roundup.psfhosted.org> Ronald Oussoren added the comment: Please include reproducer code in the issue itself, not on some external side. That said, the error you're getting is related to the start method used by multiprocessing. On Linux the start method is fork, on macOS (and Windows) the start method is spawn. The latter requires that data that's passed to the subprocess can be pickled. We use the "spawn" method on macOS because forking without calling execv is unsafe on macOS when higher level system APIs are used. ---------- nosy: +ronaldoussoren resolution: -> not a bug stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 06:38:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 11:38:14 +0000 Subject: [issue45785] Remove asyncore, asynchat and smtpd modules Message-ID: <1636630694.41.0.881800749234.issue45785@roundup.psfhosted.org> New submission from STINNER Victor : I propose to remove asyncore, asynchat and smtpd modules from the Python standard library to remove the Python maintenance burden. These modules are deprecated since Python 3.6. -- The asyncore module is a very old module of the Python stdlib for asynchronous programming, usually to handle network sockets concurrently. It's a common event loop, but its design has many flaws. The asyncio module was added to Python 3.4 with a well designed architecture. Twisted developers who have like 10 to 20 years of experience in asynchronous programming helped to design the asyncio API. By design, asyncio doesn't have flaws which would be really hard to fix in asyncore and asynchat. It was decided to start deprecating the asyncore and asynchat module in Python 3.6 released in 2016, 5 years ago. Open issues in asyncore and asynchat have been closed as "wont fix" because the module is deprecated. The two modules are basically no longer maintained. Documentation: * https://docs.python.org/dev/library/asyncore.html * https://docs.python.org/dev/library/asynchat.html I propose to remove the two modules right now in the Python stdlib. They were removed for 4 Python releases (3.6-3.10), it's long enough to respect the PEP 387. The PEP requires 2 Python releases at least before considering removing code. Since there are still 7 tests of the Python test suite still uses asyncore and asynchat, I propose to move these modules in Lib/test/ directory and make them private: * Rename Lib/asyncore.py to Lib/test/support/_asyncore.py * Rename Lib/asynchat.py to Lib/test/support/_asynchat.py Projects using asyncore and asynchat should use asyncio. If someone really wants to continue using asyncore and asynchat, it's trivial to copy asyncore.py and asynchat.py in their project, and maintain these files on their side. -- About the smtpd module, it is also deprecated since Python 3.6 (deprecated for 4 Python releases). It's used by a single test (test_logging). I also propose to remove it from the stdlib. I proposed to rename Lib/smtpd.py to Lib/test/support/_smtpd.py. Projects using smtpd can consider using aiosmtpd which is based on asyncio: https://aiosmtpd.readthedocs.io/ Or again, they can copy Python 3.10 smtpd.py in their project and maintain this file on their side. ---------- components: Library (Lib) messages: 406156 nosy: vstinner priority: normal severity: normal status: open title: Remove asyncore, asynchat and smtpd modules versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 06:55:22 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 11:55:22 +0000 Subject: [issue45785] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1636630694.41.0.881800749234.issue45785@roundup.psfhosted.org> Message-ID: <1636631722.97.0.74160337406.issue45785@roundup.psfhosted.org> STINNER Victor added the comment: Ah, a DeprecationWarning warning is only emitted at runtime since Python 3.10. What's New in Python 3.10: "asynchat, asyncore, smtpd: These modules have been marked as deprecated in their module documentation since Python 3.6. An import-time DeprecationWarning has now been added to all three of these modules." https://docs.python.org/dev/whatsnew/3.10.html#asynchat-asyncore-smtpd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 06:57:52 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Nov 2021 11:57:52 +0000 Subject: [issue45785] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1636630694.41.0.881800749234.issue45785@roundup.psfhosted.org> Message-ID: <1636631872.88.0.640899887902.issue45785@roundup.psfhosted.org> Christian Heimes added the comment: +1 This bug is kind of a duplicate of #28533. A year ago Kyle worked on a patch. You can find their work at https://github.com/aeros/cpython/tree/remove-asycore-asynchat-smtpd ---------- nosy: +christian.heimes superseder: -> Replace asyncore/asynchat/smptd in tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 07:10:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 12:10:35 +0000 Subject: [issue28533] Replace asyncore/asynchat/smptd in tests In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636632635.66.0.63752915282.issue28533@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +27771 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 07:12:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 12:12:46 +0000 Subject: [issue28533] Replace asyncore/asynchat/smptd in tests In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636632766.34.0.927527648657.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: I forgot about this issue and I created a duplicate: bpo-45785. Copy of my messages. I propose to remove asyncore, asynchat and smtpd modules from the Python standard library to remove the Python maintenance burden. These modules are deprecated since Python 3.6. -- The asyncore module is a very old module of the Python stdlib for asynchronous programming, usually to handle network sockets concurrently. It's a common event loop, but its design has many flaws. The asyncio module was added to Python 3.4 with a well designed architecture. Twisted developers who have like 10 to 20 years of experience in asynchronous programming helped to design the asyncio API. By design, asyncio doesn't have flaws which would be really hard to fix in asyncore and asynchat. It was decided to start deprecating the asyncore and asynchat module in Python 3.6 released in 2016, 5 years ago. Open issues in asyncore and asynchat have been closed as "wont fix" because the module is deprecated. The two modules are basically no longer maintained. Documentation: * https://docs.python.org/dev/library/asyncore.html * https://docs.python.org/dev/library/asynchat.html I propose to remove the two modules right now in the Python stdlib. They were removed for 4 Python releases (3.6-3.10), it's long enough to respect the PEP 387. The PEP requires 2 Python releases at least before considering removing code. Since there are still 7 tests of the Python test suite still uses asyncore and asynchat, I propose to move these modules in Lib/test/ directory and make them private: * Rename Lib/asyncore.py to Lib/test/support/_asyncore.py * Rename Lib/asynchat.py to Lib/test/support/_asynchat.py Projects using asyncore and asynchat should use asyncio. If someone really wants to continue using asyncore and asynchat, it's trivial to copy asyncore.py and asynchat.py in their project, and maintain these files on their side. -- About the smtpd module, it is also deprecated since Python 3.6 (deprecated for 4 Python releases). It's used by a single test (test_logging). I also propose to remove it from the stdlib. I proposed to rename Lib/smtpd.py to Lib/test/support/_smtpd.py. Projects using smtpd can consider using aiosmtpd which is based on asyncio: https://aiosmtpd.readthedocs.io/ Or again, they can copy Python 3.10 smtpd.py in their project and maintain this file on their side. -- Ah, a DeprecationWarning warning is only emitted at runtime since Python 3.10. What's New in Python 3.10: "asynchat, asyncore, smtpd: These modules have been marked as deprecated in their module documentation since Python 3.6. An import-time DeprecationWarning has now been added to all three of these modules." https://docs.python.org/dev/whatsnew/3.10.html#asynchat-asyncore-smtpd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 07:17:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 12:17:49 +0000 Subject: [issue28533] Replace asyncore/asynchat/smptd in tests In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636633069.66.0.930659862442.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 29521 to remove the asyncore, asynchat and smtpd modules. > libregrtest/save_env.py only checks that asyncore.socket_map is not modified, we can keep it until asyncore is really removed. I chose to remove it instead of my PR. > test_support.py only tests that it's possible to have a "clean" import of asyncore, it can be easily be replaced later. This code has been removed in the meanwhile. > But then a lot of code starts with to fail -Werror. While tests using asyncore, asynchat and smtpd have been modified to catch the DeprecationWarning warning, I chose to remove this warning in my PR, since I made the 3 modules private. I don't think that test.support private modules must emit deprecation warnings. > So the first step is to decide if it's ok to remove smtpd right now. IMO it's ok to remove it since it is deprecated since Python 3.6. > asyncore, asynchat and smtpd are all deprecated now, for removal in 3.12. Did you see an explicit mention of Python 3.12? I only saw mention of "Python 3.6" which is the version when the 3 modules were deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 07:19:13 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 12:19:13 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636633153.06.0.104881208943.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: Since Christian Heimes decided to mark my issue bpo-45785 "Remove asyncore, asynchat and smtpd modules" as a duplicate of this issue, I changed this issue title to "Remove asyncore, asynchat and smtpd modules". ---------- title: Replace asyncore/asynchat/smptd in tests -> Remove asyncore, asynchat and smtpd modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 07:31:51 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 12:31:51 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636633911.8.0.796576009667.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: I announced my plan to remove the 3 modules on python-dev: https://mail.python.org/archives/list/python-dev at python.org/thread/LZOOLX5EKOITW55TW7JQYKLXJUPCAJB4/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 07:40:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Nov 2021 12:40:10 +0000 Subject: [issue45785] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1636630694.41.0.881800749234.issue45785@roundup.psfhosted.org> Message-ID: <1636634410.27.0.612521641514.issue45785@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 08:02:53 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 11 Nov 2021 13:02:53 +0000 Subject: [issue45696] "Deep-freeze": skip the marshal step by generating C code In-Reply-To: <1635898596.2.0.043840127306.issue45696@roundup.psfhosted.org> Message-ID: <1636635773.24.0.939511192728.issue45696@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes nosy_count: 2.0 -> 3.0 pull_requests: +27772 pull_request: https://github.com/python/cpython/pull/29522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 08:24:08 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 11 Nov 2021 13:24:08 +0000 Subject: [issue45784] SAP HANA Training in Chennai Message-ID: <1636637048.03.0.900842969756.issue45784@roundup.psfhosted.org> Change by Mark Dickinson : ---------- Removed message: https://bugs.python.org/msg406152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 08:24:29 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 11 Nov 2021 13:24:29 +0000 Subject: [issue45784] spam Message-ID: <1636637069.47.0.354667385627.issue45784@roundup.psfhosted.org> Change by Mark Dickinson : ---------- title: SAP HANA Training in Chennai -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 09:29:59 2021 From: report at bugs.python.org (Kevin) Date: Thu, 11 Nov 2021 14:29:59 +0000 Subject: [issue26651] Deprecate register_adapter() and register_converter() in sqlite3 In-Reply-To: <1459097866.18.0.37527564025.issue26651@psf.upfronthosting.co.za> Message-ID: <1636640999.09.0.845944052667.issue26651@roundup.psfhosted.org> Change by Kevin : ---------- nosy: +Strongbeard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 09:32:43 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 11 Nov 2021 14:32:43 +0000 Subject: [issue45783] test_freeze fails if a file is removed In-Reply-To: <1636626894.31.0.876516857977.issue45783@roundup.psfhosted.org> Message-ID: <1636641163.58.0.888668347522.issue45783@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 10:04:09 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 11 Nov 2021 15:04:09 +0000 Subject: [issue45786] Avoid allocating when exiting frame; it may be unsafe. Message-ID: <1636643049.78.0.0321804916993.issue45786@roundup.psfhosted.org> New submission from Mark Shannon : We exiting a frame (returning from a Python function) we have to release the stack allocated frame. If a heap-allocated frame object exists, we need to copy the contents of the (stack) frame into the frame object. However, this involves allocating memory for the copy. Allocating memory can invoke GC, causing arbitrary code to be run, or the allocation can fail. Either leaves us in a precarious state, which may be unsafe. I haven't been able to produce a crash, but I'm not sure that there isn't a potential crash lurking there either. The fix is fairly simple. Allocate space for the copy of the frame at the end of the frame object. Then we need to copy the data, space will have already been allocated, and nothing can fail. Since, in theory, heap-allocated frames are relatively rare, the extra memory used won't be an issue. ---------- assignee: Mark.Shannon components: Interpreter Core keywords: 3.11regression messages: 406163 nosy: Mark.Shannon, pablogsal priority: normal severity: normal status: open title: Avoid allocating when exiting frame; it may be unsafe. type: crash versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 10:34:08 2021 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 11 Nov 2021 15:34:08 +0000 Subject: [issue45510] Specialize BINARY_SUBTRACT In-Reply-To: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org> Message-ID: <1636644848.51.0.548411555963.issue45510@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +27773 pull_request: https://github.com/python/cpython/pull/29523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 11:21:03 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 11 Nov 2021 16:21:03 +0000 Subject: [issue45783] test_freeze fails if a file is removed In-Reply-To: <1636626894.31.0.876516857977.issue45783@roundup.psfhosted.org> Message-ID: <1636647663.54.0.377404482525.issue45783@roundup.psfhosted.org> Eric Snow added the comment: Thanks for the report, Petr! I'll take a look. ---------- assignee: -> eric.snow components: +Tests stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 11:38:44 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Nov 2021 16:38:44 +0000 Subject: [issue45786] Avoid allocating when exiting frame; it may be unsafe. In-Reply-To: <1636643049.78.0.0321804916993.issue45786@roundup.psfhosted.org> Message-ID: <1636648724.79.0.708637449857.issue45786@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Allocating memory can invoke GC Technically, only allocating objects can trigger GC (specifically initializing them). All the malloc APIs don't currently call the GC by themselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 11:56:58 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 11 Nov 2021 16:56:58 +0000 Subject: [issue45786] Avoid allocating when exiting frame; it may be unsafe. In-Reply-To: <1636643049.78.0.0321804916993.issue45786@roundup.psfhosted.org> Message-ID: <1636649818.27.0.160631574552.issue45786@roundup.psfhosted.org> Mark Shannon added the comment: Ok, so it is not as bad as I thought. A failed allocation might leave us with an invalid frameobject, though. So it is still worth fixing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 12:06:52 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 11 Nov 2021 17:06:52 +0000 Subject: [issue45753] Further speed up Python-to-Python calls. In-Reply-To: <1636391875.36.0.891525405866.issue45753@roundup.psfhosted.org> Message-ID: <1636650412.93.0.0184900429521.issue45753@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +27774 pull_request: https://github.com/python/cpython/pull/29524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 12:56:34 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 11 Nov 2021 17:56:34 +0000 Subject: [issue45787] HOWTO for socket programming and select documentation contradict Message-ID: <1636653394.87.0.117733096007.issue45787@roundup.psfhosted.org> New submission from Alex Waygood : The HOWTO for socket programming in Python (https://docs.python.org/3/howto/sockets.html#non-blocking sockets) includes the following lines (using triple-quotes here to indicate multiline quotes from the docs): """ The major mechanical difference [between blocking and non-blocking sockets] is that [for non-blocking sockets] send, recv, connect and accept can return without having done anything. You have (of course) a number of choices. You can check return code and error codes and generally drive yourself crazy. If you don?t believe me, try it sometime. Your app will grow large, buggy and suck CPU. So let?s skip the brain-dead solutions and do it right. Use select. """ However, if you go to the documentation for the select module (https://docs.python.org/3/library/select html), it pointedly tells you at the top *not* to do exactly what the socket HOWTO tells you to do: """ Note The selectors module allows high-level and efficient I/O multiplexing, built upon the select module primitives. Users are encouraged to use the selectors module instead, unless they want precise control over the OS-level primitives used. """ ---------- assignee: docs at python components: Documentation messages: 406167 nosy: AlexWaygood, docs at python, giampaolo.rodola, neologix priority: normal severity: normal status: open title: HOWTO for socket programming and select documentation contradict type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:02:28 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 18:02:28 +0000 Subject: [issue45753] Further speed up Python-to-Python calls. In-Reply-To: <1636391875.36.0.891525405866.issue45753@roundup.psfhosted.org> Message-ID: <1636653748.85.0.694308605135.issue45753@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:02:41 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 18:02:41 +0000 Subject: [issue45510] Specialize BINARY_SUBTRACT In-Reply-To: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org> Message-ID: <1636653761.7.0.462947489753.issue45510@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:16:42 2021 From: report at bugs.python.org (Catherine Holloway) Date: Thu, 11 Nov 2021 18:16:42 +0000 Subject: [issue45788] sys.prefix include directory on Windows Message-ID: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> New submission from Catherine Holloway : On the page: https://docs.python.org/3.10/library/sys.html#sys.prefix the text says The main collection of Python library modules is installed in the directory prefix/lib/pythonX.Y while the platform independent header files (all except pyconfig.h) are stored in prefix/include/pythonX.Y, where X.Y is the version number of Python, for example 3.2. However, this seems to only be true on *nix systems. On Windows, the lib and header files are just in prefix/lib and prefix/include. Maybe the text should be changed to say: On linux, the main collection of Python library modules is installed in the directory prefix/lib/pythonX.Y while the platform independent header files (all except pyconfig.h) are stored in prefix/include/pythonX.Y, where X.Y is the version number of Python, for example 3.2. On Winodws, there are in prefix/lib and prefix/includes. ---------- assignee: docs at python components: Documentation messages: 406168 nosy: CatherineH, docs at python priority: normal severity: normal status: open title: sys.prefix include directory on Windows 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 Nov 11 13:25:45 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Nov 2021 18:25:45 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() In-Reply-To: <1636470983.21.0.286113384782.issue45766@roundup.psfhosted.org> Message-ID: <1636655145.54.0.81558353914.issue45766@roundup.psfhosted.org> Raymond Hettinger added the comment: It usually isn't wise to be preachy in the docs, but we could add a suggestion that proportional=True be used only when (0, 0) is known to be in the dataset and when it is in the same neighborhood as the other data points. A reasonable cross-check would be to verify than a plain OLS regression would produce an intercept near zero. linear_regression(hours_since_poll_started, number_of_respondents, proportional=True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:43:46 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 11 Nov 2021 18:43:46 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636656226.62.0.912533826019.issue28533@roundup.psfhosted.org> Senthil Kumaran added the comment: +1 to these modules removal. One concern I have is when users follow internet examples and look out for these modules or examples. What is the best way to show them the modern usage? - Should Python docs show some example snippet of the most common usage of aiosmtpd ? - Echo server / client using asyncio. A stdlib page dedicated to removal, and showing examples using these modules, especially aiostmpd as it is not a part of stdlib, might be a good idea. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 13:53:53 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Nov 2021 18:53:53 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636656833.43.0.0336010126074.issue45235@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +27775 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:14:26 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Nov 2021 19:14:26 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636658066.91.0.082623311789.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: How long until the next bugfix releases for 3.9 and 3.10? To avoid further snowballing, it would be great to have this reversion pushed out soonish. ---------- nosy: +pablogsal priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:17:38 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Nov 2021 19:17:38 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636658258.84.0.89838060648.issue45235@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The next bugfixe release of 3.10 is the 6th of December ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:26:04 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 11 Nov 2021 19:26:04 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1636656226.62.0.912533826019.issue28533@roundup.psfhosted.org> Message-ID: Andrew Svetlov added the comment: > One concern I have is when users follow internet examples and look out for these modules or examples. There is an option: keep removed modules but replace each module content with 'raise ImportError("Please use instead")' stub. The actual module removal can be postponed for years until most internet resources reflect this fact. On Thu, Nov 11, 2021 at 8:43 PM Senthil Kumaran wrote: > > Senthil Kumaran added the comment: > > +1 to these modules removal. > > One concern I have is when users follow internet examples and look out for > these modules or examples. > > What is the best way to show them the modern usage? > > - Should Python docs show some example snippet of the most common usage of > aiosmtpd ? > - Echo server / client using asyncio. > > A stdlib page dedicated to removal, and showing examples using these > modules, especially aiostmpd as it is not a part of stdlib, might be a good > idea. > > ---------- > nosy: +orsenthil > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:44:39 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 19:44:39 +0000 Subject: [issue45773] Compiler hangs during jump elimination In-Reply-To: <1636487782.5.0.379047434297.issue45773@roundup.psfhosted.org> Message-ID: <1636659879.09.0.34992203442.issue45773@roundup.psfhosted.org> Brandt Bucher added the comment: New changeset 27b69e60daa7b191ee6bc76fb6d5fb7d793062ab by Brandt Bucher in branch 'main': bpo-45773: Stop "optimizing" certain jump patterns (GH-29505) https://github.com/python/cpython/commit/27b69e60daa7b191ee6bc76fb6d5fb7d793062ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:51:33 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 19:51:33 +0000 Subject: [issue45773] Compiler hangs during jump elimination In-Reply-To: <1636487782.5.0.379047434297.issue45773@roundup.psfhosted.org> Message-ID: <1636660293.47.0.576333737166.issue45773@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +27776 pull_request: https://github.com/python/cpython/pull/29526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 14:59:26 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Nov 2021 19:59:26 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636660766.45.0.682360437067.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: Only 3.9 needs an expedited rerelease. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:17:23 2021 From: report at bugs.python.org (firewave) Date: Thu, 11 Nov 2021 20:17:23 +0000 Subject: [issue45789] Python execution broken after update via Windows Store Message-ID: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> New submission from firewave : I have Python 3.9 installed from the Windows Store and use it in CMake scripts. After the recent update to 3.92288.0 Python executions suddenly started failing with "Access is denied". I assumed I was using a wrong or cached path but that didn't turn out to be the case. It did find the executable in the (apparently) correct folder "C:/Program Files/WindowsApps/PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0/python3.9.exe". I tried running that via the command-line and it failed with "Access is denied." as well. It appears to be related to "C:/Program Files/WindowsApps" requiring Administrator permissions. Also just running "python3.9.exe" (which exists in the PATH) no longer works. It fails with "The system cannot find the file C:\Users\\AppData\Local\Microsoft\WindowsApps\python3.9.exe." So it seems the update messed something up. I had Python 3.9 installed and working fine for some version now. I ran into something similar in the past and had to uninstall and install it again to fix the problem. I am using Windows 10 Version 21H1 (OS Build 19043.1348). ---------- components: Windows messages: 406176 nosy: firewave, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python execution broken after update via Windows Store versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 15:56:07 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 11 Nov 2021 20:56:07 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636664167.84.0.912766757001.issue45789@roundup.psfhosted.org> Steve Dower added the comment: If you open "Manage app execution aliases", do you see the entries for Python? I've heard that they sometimes switch themselves off during updates, but nobody seems to know why. Even if not, disabling and re-enabling them may help. The executable in Program Files cannot be launched except in a few oddly specific circumstances. I've spoken to the team responsible and they consider this part of the feature, so the execution aliases mentioned above are the way to go (these live in your own AppData folder - check sys.executable once you get it going again). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:08:01 2021 From: report at bugs.python.org (Eric Snow) Date: Thu, 11 Nov 2021 21:08:01 +0000 Subject: [issue45783] test_freeze fails if a file is removed In-Reply-To: <1636626894.31.0.876516857977.issue45783@roundup.psfhosted.org> Message-ID: <1636664881.99.0.253883309813.issue45783@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +27777 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:41:33 2021 From: report at bugs.python.org (firewave) Date: Thu, 11 Nov 2021 21:41:33 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636666893.01.0.696833678248.issue45789@roundup.psfhosted.org> firewave added the comment: I checked them and they look fine. I have Python 3.10 installed as well so the non-suffix and "3" suffix-only executable refer to that. All the "3.9" suffix ones point to the "Python 3.9" entries and are enabled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 16:52:53 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 21:52:53 +0000 Subject: [issue45773] Compiler hangs during jump elimination In-Reply-To: <1636487782.5.0.379047434297.issue45773@roundup.psfhosted.org> Message-ID: <1636667573.73.0.712257384628.issue45773@roundup.psfhosted.org> Brandt Bucher added the comment: New changeset a89bbde83fe7f8cc347341e7ec57cda3ba312530 by Brandt Bucher in branch '3.10': [3.10] bpo-45773: Stop "optimizing" certain jump patterns (GH-29526) https://github.com/python/cpython/commit/a89bbde83fe7f8cc347341e7ec57cda3ba312530 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 18:41:36 2021 From: report at bugs.python.org (Brandt Bucher) Date: Thu, 11 Nov 2021 23:41:36 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636674096.41.0.66364240885.issue45711@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher nosy_count: 4.0 -> 5.0 pull_requests: +27778 pull_request: https://github.com/python/cpython/pull/29528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 19:01:12 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Nov 2021 00:01:12 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636666893.01.0.696833678248.issue45789@roundup.psfhosted.org> Message-ID: <3ca5f1e9-ed2b-ac89-4d6e-caf215a21c96@python.org> Steve Dower added the comment: Can you look in your %LocalAppData%\Microsoft\WindowsApps folder and see if the python*.exe files are there? You should be able to double-click them to launch them. That folder should be on your PATH so that they work everywhere, and it should reflect what you see in Manage App Execution Aliases. If it doesn't, that's a Windows bug, and I'll need as much detail as we can get to reproduce and report it to them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 19:14:55 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Fri, 12 Nov 2021 00:14:55 +0000 Subject: [issue45054] json module should issue warning about duplicate keys In-Reply-To: <1630369837.94.0.281309391119.issue45054@roundup.psfhosted.org> Message-ID: <1636676095.16.0.839917691625.issue45054@roundup.psfhosted.org> Andrei Kulakov added the comment: In general this sounds reasonable; - but a couple of thoughts / comments: - If you have a dict with mixed numbers in str format and in number format (i.e. ints as numbers and ints as strings in your case), you are creating problems in many potential places. The core of the problem is logically inconsistent keys rather than the step of conversion to JSON. So the most useful place for warning would be when adding a new key, but that wouldn't be practical. - Even if something is to be done at conversion to JSON, it's not clear if it should be a warning (would that be enough when the conversion is a logical bug?), or it should be some kind of strict=True mode that raises a ValueError? ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 20:06:23 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Fri, 12 Nov 2021 01:06:23 +0000 Subject: [issue45054] json module should issue warning about duplicate keys In-Reply-To: <1630369837.94.0.281309391119.issue45054@roundup.psfhosted.org> Message-ID: <1636679183.6.0.576461468189.issue45054@roundup.psfhosted.org> Andrei Kulakov added the comment: Another good option would be to use typed dict like `mydict : dict[int,str] = {}`; and use typed values when populating the dict; this way a type checker will warn you of inconsistent key types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 20:26:43 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Nov 2021 01:26:43 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1636680403.36.0.28184300658.issue45582@roundup.psfhosted.org> Steve Dower added the comment: I'm expecting another dumb error (on my part) or two in the PR, but I'm very close to having this working. Reviews would be appreciated! Bear in mind that I'm trying to match the current (quirky) behaviour, rather than streamline anything by changing it (yet). We can do those once we know we've got something working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 20:35:38 2021 From: report at bugs.python.org (Eric Snow) Date: Fri, 12 Nov 2021 01:35:38 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1636680403.36.0.28184300658.issue45582@roundup.psfhosted.org> Message-ID: Eric Snow added the comment: On Thu, Nov 11, 2021 at 6:27 PM Steve Dower wrote: > rather than streamline anything by changing it (yet). We can do those once we know we've got something working. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 21:55:53 2021 From: report at bugs.python.org (Rodrigo Tobar) Date: Fri, 12 Nov 2021 02:55:53 +0000 Subject: [issue45790] Inaccurate phrasing in extending/newtypes_tutorial Message-ID: <1636685753.29.0.246932963554.issue45790@roundup.psfhosted.org> New submission from Rodrigo Tobar : In `extending/newtypes_tutorial.rst` the following phrase appears: "[...], containing a pointer to a type object and a reference count (these can be accessed using the macros :c:macro:`Py_REFCNT` and c:macro:`Py_TYPE` respectively)." I believe it should read "using the macros :c:macro:`Py_TYPE` and c:macro:`Py_REFCNT` respectively" to follow the same order in which the fields are described. I'll put forward a patch. It seems this phrase goes way back a few python versions, but I'm tagging 3.11 here only. ---------- assignee: docs at python components: Documentation messages: 406185 nosy: docs at python, rtobar2 priority: normal severity: normal status: open title: Inaccurate phrasing in extending/newtypes_tutorial versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:13:23 2021 From: report at bugs.python.org (Rodrigo) Date: Fri, 12 Nov 2021 03:13:23 +0000 Subject: [issue45790] Inaccurate phrasing in extending/newtypes_tutorial In-Reply-To: <1636685753.29.0.246932963554.issue45790@roundup.psfhosted.org> Message-ID: <1636686803.8.0.763356002772.issue45790@roundup.psfhosted.org> Change by Rodrigo : ---------- keywords: +patch nosy: +rtobar nosy_count: 2.0 -> 3.0 pull_requests: +27779 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:53:33 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 03:53:33 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636689213.58.0.357092797115.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 807f839bbfd5805fb76eb3436c9252a0441296eb by Raymond Hettinger in branch 'main': bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525) https://github.com/python/cpython/commit/807f839bbfd5805fb76eb3436c9252a0441296eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:53:45 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Nov 2021 03:53:45 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636689225.82.0.244446452179.issue45235@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27780 pull_request: https://github.com/python/cpython/pull/29530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 22:53:50 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Nov 2021 03:53:50 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636689230.22.0.0997704030802.issue45235@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27781 pull_request: https://github.com/python/cpython/pull/29531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 11 23:02:43 2021 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 12 Nov 2021 04:02:43 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1636689763.15.0.436301662363.issue45636@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +27782 pull_request: https://github.com/python/cpython/pull/29532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:01:11 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 05:01:11 +0000 Subject: [issue45791] __instancecheck__ being checked of type(cls) instead of cls Message-ID: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> New submission from Raymond Hettinger : Per PEP 3119, "Overloading works as follows: The call isinstance(x, C) first checks whether C.__instancecheck__ exists, and if so, calls C.__instancecheck__(x) instead of its normal implementation." However, this doesn't work because the isinstance() has a bug introduced in Python 3.1 and no one ever noticed. In abstract.c::object_recursive_isinstance(), we have: PyObject *checker = _PyObject_LookupSpecial(cls, &PyId___instancecheck__); However, that function expects an instance as an argument rather than a class. Calling typeobject.c::_PyObject_LookupSpecial() runs: res = _PyType_LookupId(Py_TYPE(self), attrid); Note, the Py_TYPE(self) is intended to move up from an instance to a class, but we're already started with a class, so it moves to the metaclass instead. This code was correct when originally implemented but it did not have tests: if (name == NULL) { name = PyString_InternFromString("__instancecheck__"); if (name == NULL) return -1; } checker = PyObject_GetAttr(cls, name); if (checker == NULL && PyErr_Occurred()) PyErr_Clear(); ------- Demonstration code --------------- class C: def __instancecheck__(self, inst): raise RuntimeError(f'{self=} {inst=}') class P: def __instancecheck__(self, inst): raise RuntimeError(f'{self=} {inst=}') class C(P): pass >>> isinstance(C(), P) # Incorrectly fails to invoke __instancecheck__ True >>> isinstance(C(), P()) # Incorrectly invokes __instancecheck__ Traceback (most recent call last): File "", line 1, in isinstance(C(), P()) File "", line 3, in __instancecheck__ raise RuntimeError(f'{self=} {inst=}') RuntimeError: self=<__main__.P object at 0x107586c80> inst=<__main__.C object at 0x107587100> ---------- components: Interpreter Core messages: 406187 nosy: rhettinger priority: normal severity: normal status: open title: __instancecheck__ being checked of type(cls) instead of cls versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:37:19 2021 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Fri, 12 Nov 2021 05:37:19 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636695439.35.0.227511730883.issue45738@roundup.psfhosted.org> Zac Hatfield-Dodds added the comment: It looks like this also affects Python 3.9.8, which makes me very suspicious of https://bugs.python.org/issue45494 as the probable cause. See https://github.com/Zac-HD/hypothesmith/issues/16 and https://github.com/psf/black/pull/2592#issuecomment-966745240 for reports. ---------- nosy: +Zac Hatfield-Dodds versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 00:54:13 2021 From: report at bugs.python.org (Zac Hatfield-Dodds) Date: Fri, 12 Nov 2021 05:54:13 +0000 Subject: [issue42109] Use hypothesis for testing the standard library, falling back to stubs In-Reply-To: <1603301913.79.0.22425692211.issue42109@roundup.psfhosted.org> Message-ID: <1636696453.27.0.988464207015.issue42109@roundup.psfhosted.org> Zac Hatfield-Dodds added the comment: I've recently had [1] reported, which makes https://bugs.python.org/issue45738 the *third* parser bug [2] that Hypothesmith caught after release, and the second in a stable version - so I'll be maintaining a workaround for some time. I remain happy to help run these tests upstream where they would impact fewer people. [1] https://github.com/Zac-HD/hypothesmith/issues/16 and https://github.com/psf/black/pull/2592#issuecomment-966745240 [2] following https://bugs.python.org/issue42218 and https://bugs.python.org/issue40661 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 01:04:10 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Nov 2021 06:04:10 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636697050.15.0.0684457248025.issue45789@roundup.psfhosted.org> Eryk Sun added the comment: > It fails with "The system cannot find the file > C:\Users\\AppData\Local\Microsoft\WindowsApps\python3.9.exe." The shell's CreateProcessW() call failed with ERROR_FILE_NOT_FOUND (2). The file exists, but it's probably a broken appexec link. I'm attaching a script that displays the contents of an appexec link. For example, here's the working "python3.9.exe" link: C:\>read_appexec.py "%LocalAppData%\Microsoft\WindowsApps\python3.9.exe" Version: 3 Package ID: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0 Entry Point: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0!Python App Type: 0 Target Path: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0\python3.9.exe --- > The executable in Program Files cannot be launched except in a few > oddly specific circumstances. The SYSTEM, LOCAL SERVICE, and NETWORK SERVICE accounts can directly execute the real executable. For standard users, however, a conditional access control entry is set in the file's permissions that allows execute access only if the accessing security context has the app's WIN://SYSAPPID, such as "PYTHONSOFTWAREFOUNDATION.PYTHON.3.9_QBZ5N2KFRA8P0". When CreateProcessW() spawns an app from an appexec link, it adds the required WIN://SYSAPPID to a new token that gets created for the process. The app itself can thus directly load and execute binary images (EXEs, DLLs) from its installation directory under "%ProgramFiles%\WindowsApps". ---------- nosy: +eryksun Added file: https://bugs.python.org/file50434/read_appexec.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:19:57 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Nov 2021 07:19:57 +0000 Subject: [issue45791] __instancecheck__ being checked of type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636701597.69.0.9362953945.issue45791@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think that the code is correct, and the documentation is not complete. As in most (but not all) cases of dunder methods it is looked up in a class, ignoring instance attributes. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 02:59:36 2021 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 12 Nov 2021 07:59:36 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv Message-ID: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> New submission from Hynek Schlawack : Doc/library/contextvars.rst defines a module using `.. module:: contextvars` which means that all defined symbols are automatically part of the contextvars module. The docs added in https://github.com/python/cpython/pull/5685 however explicitly use `.. class:: contextvars.Token` instead of just `.. class:: Token` which means that the recorded intersphinx symbol is `contextvars.contextvars.Token`. I have noticed this because sphinx couldn't find `contextvars.Token` in structlog's docs. AFAICT, this only affects contextvars.Token. ---------- assignee: hynek components: Documentation messages: 406192 nosy: hynek, yselivanov priority: low severity: normal stage: needs patch status: open title: contextvars.Token has wrong module name in Sphinx's objects.inv type: enhancement versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:07:36 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 08:07:36 +0000 Subject: [issue45791] __instancecheck__ being checked of type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636704456.85.0.477943622324.issue45791@roundup.psfhosted.org> Raymond Hettinger added the comment: > As in most (but not all) cases of dunder methods it > is looked up in a class, ignoring instance attributes. That is true, but the starting point in this case is a class so the attribute lookup should be in that class, not its metaclass. Guido's original code was correct and it became broken in 3.1 in the switch from PyObject_GetAttr(cls, name) to _PyObject_LookupSpecial(cls, &PyId___instancecheck__). Also, the demonstration code I gave (that matches the documentation) used to work in 3.0 and prior. It broken in 3.1. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 03:11:20 2021 From: report at bugs.python.org (Hynek Schlawack) Date: Fri, 12 Nov 2021 08:11:20 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636704680.42.0.222798844883.issue45792@roundup.psfhosted.org> Change by Hynek Schlawack : ---------- keywords: +patch pull_requests: +27783 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:08:29 2021 From: report at bugs.python.org (junyixie) Date: Fri, 12 Nov 2021 09:08:29 +0000 Subject: [issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong Message-ID: <1636708108.33.0.041846133836.issue45793@roundup.psfhosted.org> New submission from junyixie : wrong: checking build system type... x86_64-apple-darwin20.5.0 checking host system type... x86_64-apple-darwin20.5.0 expect: checking build system type... arm-apple-darwin20.5.0 checking host system type... arm-apple-darwin20.5.0 ---------- components: macOS messages: 406194 nosy: JunyiXie, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:08:34 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Nov 2021 09:08:34 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636708114.74.0.843880794261.issue45573@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27784 pull_request: https://github.com/python/cpython/pull/29534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:09:03 2021 From: report at bugs.python.org (junyixie) Date: Fri, 12 Nov 2021 09:09:03 +0000 Subject: [issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong In-Reply-To: <1636708108.33.0.041846133836.issue45793@roundup.psfhosted.org> Message-ID: <1636708143.16.0.0806065877012.issue45793@roundup.psfhosted.org> junyixie added the comment: subprocess.Popen([], executable=os.path.join(cpython_dir, "configure"), cwd=cpython_dir).wait() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:38:46 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Nov 2021 09:38:46 +0000 Subject: [issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong In-Reply-To: <1636708108.33.0.041846133836.issue45793@roundup.psfhosted.org> Message-ID: <1636709926.71.0.718930766898.issue45793@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm assuming you run on a M1* system. What's the architecture for the python binary (run "file $(which python3)" in a shell to get this information, excluding the quotes)? If the binary supports only x86_64 you might run into a "feature" of macOS: subprocesses started from a Rosetta 2 process also prefer to run in emulation. This can also be demonstrated using the system install of perl, for example: % perl -e 'print `arch`' arm64 % arch -x86_64 perl -e 'print `arch`' i386 There sadly doesn't appear to be documentation about this on Apple's site. Note that the universal2 variants of the installers on python.org natively support both x86_64 and arm64. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:39:23 2021 From: report at bugs.python.org (junyixie) Date: Fri, 12 Nov 2021 09:39:23 +0000 Subject: [issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong In-Reply-To: <1636708108.33.0.041846133836.issue45793@roundup.psfhosted.org> Message-ID: <1636709963.02.0.941355380643.issue45793@roundup.psfhosted.org> junyixie added the comment: when run pyperformance compile in apple silicon also have this problem ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:41:02 2021 From: report at bugs.python.org (junyixie) Date: Fri, 12 Nov 2021 09:41:02 +0000 Subject: [issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong In-Reply-To: <1636708108.33.0.041846133836.issue45793@roundup.psfhosted.org> Message-ID: <1636710062.77.0.106273911054.issue45793@roundup.psfhosted.org> junyixie added the comment: > What's the architecture for the python binary (run "file $(which python3)" in a shell to get this information, excluding the quotes)? yeah, is x86_64 python executable .../opt/anaconda3/bin/python3: Mach-O 64-bit executable x86_64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:48:04 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Nov 2021 09:48:04 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636710484.24.0.498139787957.issue45792@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27785 pull_request: https://github.com/python/cpython/pull/29535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:48:17 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Nov 2021 09:48:17 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636710497.35.0.271494270245.issue45792@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27788 pull_request: https://github.com/python/cpython/pull/29538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:48:08 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Nov 2021 09:48:08 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636710488.03.0.139932578098.issue45792@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27786 pull_request: https://github.com/python/cpython/pull/29536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:48:05 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Nov 2021 09:48:05 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636710485.39.0.127953454896.issue45792@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset e501d70b347c5093018d12482c30a7a98aab86d0 by Hynek Schlawack in branch 'main': bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) https://github.com/python/cpython/commit/e501d70b347c5093018d12482c30a7a98aab86d0 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 04:48:12 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Nov 2021 09:48:12 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636710492.7.0.673985487322.issue45792@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27787 pull_request: https://github.com/python/cpython/pull/29537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:17:27 2021 From: report at bugs.python.org (mike mcleod) Date: Fri, 12 Nov 2021 10:17:27 +0000 Subject: [issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4 In-Reply-To: <1249679476.65.0.0604043126333.issue6669@psf.upfronthosting.co.za> Message-ID: <1636712247.73.0.86788871141.issue6669@roundup.psfhosted.org> mike mcleod added the comment: I would like to help with this issue. I note that when I test against 3.10 this error does not show. Also, all tests for test_tarfile pass. I am wondering if it may be reasonable to close this due to the age and currently its not an issue in the latest Python version. ---------- nosy: +mikecmcleod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:20:08 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Nov 2021 10:20:08 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636712408.18.0.239487048839.issue45792@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 628667ac9a634c7a7fa7f681dd2f98ff5841c843 by Miss Islington (bot) in branch '3.10': bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29535) https://github.com/python/cpython/commit/628667ac9a634c7a7fa7f681dd2f98ff5841c843 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:20:25 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 12 Nov 2021 10:20:25 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1636712425.22.0.0765256050918.issue45792@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 8b6a474071bcc88ec3453e16f079181e551513c3 by Miss Islington (bot) in branch '3.9': bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29536) https://github.com/python/cpython/commit/8b6a474071bcc88ec3453e16f079181e551513c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:31:03 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Nov 2021 10:31:03 +0000 Subject: [issue45793] execute shell command ./configure with python subprocess.popen, os.system ... checking build system type... is wrong In-Reply-To: <1636708108.33.0.041846133836.issue45793@roundup.psfhosted.org> Message-ID: <1636713063.35.0.84910421664.issue45793@roundup.psfhosted.org> Ronald Oussoren added the comment: The problem will go away when you install and use an arm64 or universal2 variant of Python. This is behaviour of macOS and cannot be changed in CPython. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:33:38 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Nov 2021 10:33:38 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1636713218.69.0.27122144127.issue37295@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.11 -Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 05:45:52 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Nov 2021 10:45:52 +0000 Subject: [issue45758] Crash on Py_DecRef'ing builtin object from previous run In-Reply-To: <1636412855.25.0.884802984088.issue45758@roundup.psfhosted.org> Message-ID: <1636713952.34.0.762712773501.issue45758@roundup.psfhosted.org> Ronald Oussoren added the comment: IMHO your code is buggy, as Hai Shi also indicates. After Py_Finalize all objects in all (sub-)interpreters are deallocated unless there are bugs in the interpreter. Because of this "..., item should still be alive" in your sample code is incorrect: the reference should be considered to be invalid and cannot be used again. ---------- nosy: +ronaldoussoren resolution: -> not a bug stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 06:56:23 2021 From: report at bugs.python.org (Ezekeel) Date: Fri, 12 Nov 2021 11:56:23 +0000 Subject: [issue45794] Email policy option for disabling RFC2231 Mime parameter folding Message-ID: <1636718183.28.0.396771366939.issue45794@roundup.psfhosted.org> New submission from Ezekeel : I am using the Python email module extensively and noticed that the Microsoft Outlook client does not support RFC2231 for Mime parameter folding. Since that mail client unfortunately is the de facto standard in the corporate world there should be a policy option to disable it. I have implemented that option: https://github.com/netcon-consulting/cpython/commit/9f485f0a6a5b7f2c207f1d5db7d1e520c71ac3b7 ---------- components: email messages: 406205 nosy: Ezekeel, barry, r.david.murray priority: normal severity: normal status: open title: Email policy option for disabling RFC2231 Mime parameter folding versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:15:15 2021 From: report at bugs.python.org (firewave) Date: Fri, 12 Nov 2021 12:15:15 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636719315.4.0.442306642693.issue45789@roundup.psfhosted.org> firewave added the comment: Thanks a lot for all the details. I used the script to check all the 3.9 appexec links and only the "python3.9" one points to the wrong executable. Version: 3 Package ID: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0 Entry Point: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0!Python App Type: 0 Target Path: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2032.0_x64__qbz5n2kfra8p0\python3.9.exe Version: 3 Package ID: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0 Entry Point: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0!Pip App Type: 0 Target Path: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0\pip3.9.exe Could it be possible that it might not be able to replace that link when it is currently in use? Also the "Reliability Monitor" shows a warning to install the "Python 3.9" app but I never saw anything about it in the "Windows Store". Installation Failure: Windows failed to install the following update with error 0x80073D02: 9P7QFQMJRFP7-PythonSoftwareFoundation.Python.3.9. A day later the success entry is found. Installation Successful: Windows successfully installed the following update: 9P7QFQMJRFP7-PythonSoftwareFoundation.Python.3.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 07:43:44 2021 From: report at bugs.python.org (mike mcleod) Date: Fri, 12 Nov 2021 12:43:44 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1636721024.85.0.937293152502.issue10202@roundup.psfhosted.org> mike mcleod added the comment: I would like to help on this issue. I understand the arguments here but it has been a lone time since this was raised and there does not seem to be any further issues discussed or support for this issue. ---------- nosy: +mikecmcleod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:08:48 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Nov 2021 13:08:48 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636722528.35.0.13162539957.issue45789@roundup.psfhosted.org> Change by Eryk Sun : Removed file: https://bugs.python.org/file50434/read_appexec.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:21:51 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 13:21:51 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636723311.0.0.0906818387844.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: > There is an option: keep removed modules but replace each module content > with 'raise ImportError("Please use instead")' stub. > The actual module removal can be postponed for years until most internet resources reflect this fact. That prevents someone to provide asyncore for Python 3.11 under the same name, "asyncore". The stdlib module has the priority over the third-party module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:21:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 12 Nov 2021 13:21:54 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636723314.0.0.387840470709.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 8f1b71de731dda668aede7c9b34d0ad7afb8f6a8 by Brandt Bucher in branch 'main': bpo-45711: Re-bump the magic number and update doc (GH-29528) https://github.com/python/cpython/commit/8f1b71de731dda668aede7c9b34d0ad7afb8f6a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:23:59 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Nov 2021 13:23:59 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636723439.81.0.798436135934.issue45789@roundup.psfhosted.org> Eryk Sun added the comment: > Could it be possible that it might not be able to replace that > link when it is currently in use? Appexec links are only used briefly to find the real executable and create the access token that allows executing it. I don't know how your local profile directory ended up with a stale link. Maybe Steve has more insight. There should be a "PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0" subdirectory in your local "WindowsApps" directory. Check the "python3.9.exe" link in that directory as well. It's the basis for the link of the same name that gets created in the parent directory. Note that I wrote read_appexec.py in a hurry based on someone's blog (appexec links are undocumented), which I shouldn't have trusted. I've uploaded a new version just now with what are hopefully more accurate fields and field names. The previous target path result was correct, however. For example: C:\>read_appexec.py "%LocalAppData%\Microsoft\WindowsApps\python3.9.exe" Package Name: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0 Application User Model ID: PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0!Python Target Path: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0\python3.9.exe ---------- Added file: https://bugs.python.org/file50435/read_appexec.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:23:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 13:23:33 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636723413.47.0.977237598568.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: Senthil: "+1 to these modules removal" Would you mind to formally approve the PR https://github.com/python/cpython/pull/29521 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:25:27 2021 From: report at bugs.python.org (Erik Aronesty) Date: Fri, 12 Nov 2021 13:25:27 +0000 Subject: [issue31842] pathlib: "Incorrect function" during resolve() In-Reply-To: <1508707873.05.0.213398074469.issue31842@psf.upfronthosting.co.za> Message-ID: <1636723527.65.0.756214741964.issue31842@roundup.psfhosted.org> Erik Aronesty added the comment: bug is worse than that: perfectly valid redirected paths (winfsp ram drives for example) now break in python 3.9.6 (maybe fixed in later version?) >>> import pathlib >>> p=pathlib.Path('C:\\Users\\erik\\Atakama') >>> p.resolve() Traceback (most recent call last): File "", line 1, in File "c:\users\erik\.pyenv\pyenv-win\versions\3.9.6\Lib\pathlib.py", line 1205, in resolve s = self._flavour.resolve(self, strict=strict) File "c:\users\erik\.pyenv\pyenv-win\versions\3.9.6\Lib\pathlib.py", line 206, in resolve s = self._ext_to_normal(_getfinalpathname(s)) OSError: [WinError 1005] The volume does not contain a recognized file system. ... yet.... dir 'C:\\Users\\erik\\Atakama' Desktop.ini Personal\ Files Vault mounted via winfsp ---------- nosy: +earonesty versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:29:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 13:29:23 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636723763.78.0.428692564519.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: > One concern I have is when users follow internet examples and look out for these modules or examples. Well, we cannot modify printed books :-) > What is the best way to show them the modern usage? Buy new books? :-) > Should Python docs show some example snippet of the most common usage of aiosmtpd ? I don't think that we should start providing tutorial for 3rd party modules. There are enough places on the Internet for that. For example, what is aiosmtpd deprecated a function and our doc uses it? Once a Python version reaches its "security-only" fixes, we cannot modify the doc anymore, and you fall into the same problem again. > A stdlib page dedicated to removal, and showing examples using these modules, especially aiostmpd as it is not a part of stdlib, might be a good idea. IMO it's way better to maintain such documentation outside Python itself. It's simpler to keep it up to date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 08:41:59 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 13:41:59 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636724519.44.0.185311228755.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: For example, what *if* aiosmtpd deprecated a function ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 09:05:05 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 14:05:05 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1636725905.04.0.680494312636.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: See also the (dfaft) PEP 594: "Removing dead batteries from the standard library" https://www.python.org/dev/peps/pep-0594/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 09:07:24 2021 From: report at bugs.python.org (firewave) Date: Fri, 12 Nov 2021 14:07:24 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636726044.51.0.270828985588.issue45789@roundup.psfhosted.org> firewave added the comment: The python3.9.exe file in the WindowsApps folder looks like a real executable and not a link. The script also backs that python3 read_appexec.py "c:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2288.0_x64__qbz5n2kfra8p0\python3.9.exe" Traceback (most recent call last): File "s:\Downloads\read_appexec.py", line 74, in link = read_appexec_link(sys.argv[1]) File "s:\Downloads\read_appexec.py", line 66, in read_appexec_link raise ctypes.WinError(ctypes.get_last_error()) OSError: [WinError 4390] The file or directory is not a reparse point. Although I did this as Administrator so I can successfully list the directory I am not able to run that executable. It fails with "Access is denied.". Others are working fine. idle3.9.exe - works pip3.9.exe - works python.exe - Access is denied. python3.9.exe - Access is denied. pythonw.exe - Access is denied. pythonw3.9.exe - works I opened both pythonw* files in the old "Dependency Walker" and it loaded them both fine and the dependencies appear to be identical by just taking a short look beside it not showing anything suspicious in them. The non-suffix version didn't run with "Failure starting the process. Access is denied (5).". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:05:30 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Nov 2021 15:05:30 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636729530.95.0.981399141692.issue45789@roundup.psfhosted.org> Eryk Sun added the comment: > The python3.9.exe file in the WindowsApps folder looks like > a real executable and not a link. As requested, and as shown in the output, you tested the file in Python 3.9's subdirectory of "WindowsApps", not in "WindowsApps" itself. If the size in the `dir` output is 0 bytes, then it's an empty file without a reparse point. That would explain the stale link in the parent "WindowsApps" directory, since there's no source reparse point to clone. It doesn't explain why some of the links in the app's subdirectory weren't created correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:19:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 15:19:23 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636730363.56.0.222305166179.issue45745@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9d3271438431c37c29c359f5b73e8094b5f82912 by Victor Stinner in branch 'main': bpo-45745: Remove regrtest --findleaks options (GH-29514) https://github.com/python/cpython/commit/9d3271438431c37c29c359f5b73e8094b5f82912 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:19:32 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 15:19:32 +0000 Subject: [issue45745] ./python -m test --help output for refleaks seems wrong In-Reply-To: <1636321157.49.0.174239035992.issue45745@roundup.psfhosted.org> Message-ID: <1636730372.81.0.818149271866.issue45745@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:47:41 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 12 Nov 2021 15:47:41 +0000 Subject: [issue45791] __instancecheck__ being checked of type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636732061.61.0.732771237207.issue45791@roundup.psfhosted.org> Guido van Rossum added the comment: I'm torn. It's been like this for a very long time and Serhiy's reasoning makes some sense. OTOH it *does* make more sense as it's written in the PEP. The basic idea is "the class has control over what is considered an instance of it" and it would be nice if this didn't require writing a metaclass. (Metaclasses are often problematic.) As an experiment, could you implement the proposed behavior and see what fails in e.g. the stdlib or the test suites of the 100 most popular packages? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 10:55:25 2021 From: report at bugs.python.org (Muhammad Farhan) Date: Fri, 12 Nov 2021 15:55:25 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack Message-ID: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> New submission from Muhammad Farhan : Hi, During my recent tests I have discovered that the urllib http client (urllib.request.urlopen()) is vulnerable to DOS attack using a simple but effective trick. I am attaching a file named server.py download it and run it using latest version of python. After running it execute the following python code in python interactive mode. (python -i) import urllib.request request = urllib.request.Request('http://127.0.0.1:1338') response = urllib.request.urlopen(req, timeout=1) DOS limit: We can achieve DOS for unlimited time. How to fix? Implement a good logic for timeout in urllib.request.urlopen(url, timeout). Timeout value should not be reset after client receives a data(bytes), because it can easily be abused to achieve DOS. ---------- components: Library (Lib) files: server.py messages: 406220 nosy: haqsek2 priority: normal severity: normal status: open title: urllib http client vulnerable to DOS attack type: security versions: Python 3.10 Added file: https://bugs.python.org/file50436/server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 11:08:52 2021 From: report at bugs.python.org (firewave) Date: Fri, 12 Nov 2021 16:08:52 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636733332.45.0.589139483128.issue45789@roundup.psfhosted.org> firewave added the comment: The "python3.9.exe" link is that one also points to the earlier version. All other links are fine. Also all those files are 0 bytes - even the working ones. Since I cannot even run the actual executable there seems to be an issue with the executables on top of the broken appexec link. I also checked the actual executables and they are binary identical as well as having the identical permissions and timestamps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 11:26:52 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 16:26:52 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636734412.01.0.271106624752.issue45791@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- title: __instancecheck__ being checked of type(cls) instead of cls -> __instancecheck__ being checked on type(cls) instead of cls _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 12:10:57 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 17:10:57 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636737057.14.0.650922986771.issue45791@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, I discovered the issue when experimenting with ways to use the class pattern in structural pattern matching. --- Code that should work but doesn't ----------- class Warm: def __instancecheck__(cls, inst): return inst in {'red', 'orange', 'blue'} match 'red': case Warm(): # This doesn't match but should print('Glowing') --- What you have to do to get it to work ------- class MetaWarm(type): def __instancecheck__(cls, inst): return inst in {'red', 'orange', 'blue'} class Warm(metaclass=MetaWarm): pass match 'red': case Warm(): # This matches print('Hot') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 12:45:41 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 12 Nov 2021 17:45:41 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636739141.78.0.260873254664.issue45738@roundup.psfhosted.org> Change by Matthias Bussonnier : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 12:45:20 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 12 Nov 2021 17:45:20 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636739120.03.0.988640891926.issue45738@roundup.psfhosted.org> Matthias Bussonnier added the comment: Yep, this also break IPython command completions when users press tab in some places in multiline code. 88f4ec88e282bf861f0af2d237e9fe28fbc8deac is the first offending commit for me in the 3.9 branch: [3.9] bpo-45494: Fix parser crash when reporting errors involving invalid continuation characters (GH-28993) (#29071) There are two errors that this commit fixes: * The parser was not correctly computing the offset and the string source for E_LINECONT errors due to the incorrect usage of strtok(). * The parser was not correctly unwinding the call stack when a tokenizer exception happened in rules involving optionals ('?', [...]) as we always make them return valid results by using the comma operator. We need to check first if we don't have an error before continuing.. (cherry picked from commit a106343f632a99c8ebb0136fa140cf189b4a6a57) Co-authored-by: Pablo Galindo Salgado NOTE: unlike the cherry-picked original, this commit points at a crazy location due to a bug in the tokenizer that required a big refactor in 3.10 to fix. We are leaving as-is for 3.9. ---------- nosy: +mbussonn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 12:54:34 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 12 Nov 2021 17:54:34 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636739674.23.0.919810730093.issue45738@roundup.psfhosted.org> Matthias Bussonnier added the comment: Note that with the following example, exec and CommandCompiler return a different error: from codeop import CommandCompiler # identical errors #exec('1,\\#\n2') SystemError #CommandCompiler()('1,\\#\n2', symbol='exec') SystemError # one is syntax the other is System. exec('a \ \n') # SyntaxError CommandCompiler()('a \ \n', symbol='exec') # SystemError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 12:57:10 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Nov 2021 17:57:10 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636739830.13.0.0673245036263.issue45791@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +27789 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 12:59:37 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Nov 2021 17:59:37 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636719315.4.0.442306642693.issue45789@roundup.psfhosted.org> Message-ID: Steve Dower added the comment: > Could it be possible that it might not be able to replace that link when it is currently in use? That (or something like that) would be my suspicion. It's happened before, though as Eryk Sun says the link itself does not remain in use very long at all. I think we've collected enough data about the broken link. You should be able to disable and re-enable the execution alias to get the correct one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:00:34 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Nov 2021 18:00:34 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636740034.37.0.46577710388.issue45791@roundup.psfhosted.org> Serhiy Storchaka added the comment: Failed tests: ====================================================================== FAIL: test_isinstance_with_or_union (test.test_isinstance.TestIsInstanceIsSubclass) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_isinstance.py", line 223, in test_isinstance_with_or_union with self.assertRaises(TypeError): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: TypeError not raised ====================================================================== FAIL: test_isinstance (test.test_genericalias.BaseTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_genericalias.py", line 249, in test_isinstance with self.assertRaises(TypeError): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: TypeError not raised ====================================================================== FAIL: test_issubclass (test.test_genericalias.BaseTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_genericalias.py", line 255, in test_issubclass with self.assertRaises(TypeError): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: TypeError not raised ====================================================================== FAIL: test_callable_instance_type_error (test.test_typing.CollectionsCallableTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_typing.py", line 490, in test_callable_instance_type_error with self.assertRaises(TypeError): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: TypeError not raised ====================================================================== FAIL: test_self_subclass (test.test_typing.CollectionsCallableTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_typing.py", line 446, in test_self_subclass with self.assertRaises(TypeError): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: TypeError not raised ====================================================================== FAIL: test_special_method_lookup (test.test_descr.ClassPropertiesAndMethods) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_descr.py", line 2097, in test_special_method_lookup runner(X()) ^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/test/test_descr.py", line 2032, in do_isinstance return isinstance(int, obj) ^^^^^^^^^^^^^^^^^^^^ File "/home/serhiy/py/cpython/Lib/test/test_descr.py", line 2077, in __getattribute__ test.fail("__getattribute__ called with {0}".format(attr)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: __getattribute__ called with __instancecheck__ ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:01:26 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 18:01:26 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636740086.94.0.717754704214.issue45791@roundup.psfhosted.org> Raymond Hettinger added the comment: I did a scan of the standard library and code in the wild. It looks like almost all uses are in metaclasses (which makes sense because that matches the AppendableSequence example in PEP 3119). However, the typing module does have some cases of __instancecheck__ being used in regular classes. AFAICT that code is completely inoperative and there is no way for it to ever get called by isinstance(). I think people who __instancecheck__ in regular classes aren't noticing that their code isn't being called at all. The likely reasons are that isinstance() has a fast path for exact type matches and type() defines an __instancecheck__ in a reasonable way. So unless someone tests a case not already covered by those two paths, they won't notice the dead code. The two cases in typing.py are _Final and _BaseGenericAlias. The __instancecheck__ methods in those were written by Ivan and by GvR likely with the expectation that that code would by called by isinstance(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:03:36 2021 From: report at bugs.python.org (Victor Milovanov) Date: Fri, 12 Nov 2021 18:03:36 +0000 Subject: [issue45758] Crash on Py_DecRef'ing builtin object from previous run In-Reply-To: <1636412855.25.0.884802984088.issue45758@roundup.psfhosted.org> Message-ID: <1636740216.17.0.863210701782.issue45758@roundup.psfhosted.org> Victor Milovanov added the comment: I think documentation should clarify that. Right now this line in the docs got me thinking that anything with an external strong reference won't be deallocated: "Memory tied up in circular references between objects is not freed." ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:10:36 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Nov 2021 18:10:36 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636740636.76.0.525166644176.issue45791@roundup.psfhosted.org> Serhiy Storchaka added the comment: Most of failed tests are related to typing, but there is a purposed test for __instancecheck__ and __subclasscheck__ bypassing __getattr__ and __getattribute__ (test.test_descr.ClassPropertiesAndMethods.test_special_method_lookup). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:43:26 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 18:43:26 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636742606.33.0.065777773807.issue45791@roundup.psfhosted.org> Raymond Hettinger added the comment: Here's an example in PEP 3119 that appears to work but actually bypasses the method: from abc import ABCMeta, abstractmethod class Sized(metaclass=ABCMeta): @abstractmethod def __hash__(self): return 0 @classmethod def __instancecheck__(cls, x): print('Called') return hasattr(x, "__len__") @classmethod def __subclasscheck__(cls, C): return hasattr(C, "__bases__") and hasattr(C, "__len__") $ python3.10 -i demo_3119.py >>> isinstance([], Sized) True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:44:33 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 18:44:33 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636742673.84.0.181026079564.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 587ff7f50bcbfd8346c6d5db459a1628a350c04d by Miss Islington (bot) in branch '3.9': bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525) (GH-29531) https://github.com/python/cpython/commit/587ff7f50bcbfd8346c6d5db459a1628a350c04d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:46:36 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 18:46:36 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636742796.32.0.0217737515895.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: I've restored the prior state of affairs. Leaving this issue open because it still isn't clear what should be guaranteed or whether further improvements need to be made. ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 13:44:59 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Nov 2021 18:44:59 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1636742699.85.0.437468058464.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e4c5a5eabadd1dcd0b522ffbd70157cd95506ad1 by Miss Islington (bot) in branch '3.10': bpo-45235: Revert an argparse bugfix that caused a regression (GH-29525) (GH-29530) https://github.com/python/cpython/commit/e4c5a5eabadd1dcd0b522ffbd70157cd95506ad1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 14:08:34 2021 From: report at bugs.python.org (Andre Roberge) Date: Fri, 12 Nov 2021 19:08:34 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636744114.14.0.0285985170776.issue45738@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 14:21:29 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 19:21:29 +0000 Subject: [issue37824] IDLE: Handle Shell input SyntaxWarning & DeprecationWarning In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1636744889.69.0.290073734122.issue37824@roundup.psfhosted.org> Terry J. Reedy added the comment: Might want to special case running certain console commands in Shell, such as 'pip install'. https://stackoverflow.com/questions/69936921/packages-not-installing-in-idle-shell SyntaxError: invalid syntax. Perhaps you forgot a comma? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 14:22:50 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Nov 2021 19:22:50 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636744970.87.0.291284457973.issue45738@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I will be able to take a look later in the weekend, so if someone is able to give it a go before, that would be great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 14:30:37 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Nov 2021 19:30:37 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636745437.68.0.37788259473.issue45738@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +BTaskaya, lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 14:32:15 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Fri, 12 Nov 2021 19:32:15 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636745535.7.0.742253581301.issue45738@roundup.psfhosted.org> Matthias Bussonnier added the comment: > I will be able to take a look later in the weekend Please take some time for yourself, I added you as you were the original author of the patch to make you aware. I believe most projects can workaround that for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 15:35:44 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 12 Nov 2021 20:35:44 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636742606.33.0.065777773807.issue45791@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: I believe that the PEP 3119 example doesn't work (I've confirmed something simpler) but I have a feeling that the uses of __instancecheck__ in typing.py are actually okay. For example, isinstance(42, typing.Any) correctly calls _SpecialForm.__instancecheck__ -- because Any is not a type, it's an instance of typing._SpecialForm so it all works out correctly. (I haven't checked out the other -- @Serhiy do you have time to look into that one?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:26:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 21:26:31 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1636752391.88.0.020126778545.issue45732@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Update python.org Windows and macOS installers to use Tk 8.6.12 -> Make python.org Windows and macOS installers use Tk 8.6.12 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:37:36 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 12 Nov 2021 21:37:36 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1636753056.77.0.739953446438.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: New changeset de3db1448b1b983eeb9f4498d07e3d2f1fb6d29d by Irit Katriel in branch 'main': bpo-45711: assert that the type of exc_info is redundant (GH-29518) https://github.com/python/cpython/commit/de3db1448b1b983eeb9f4498d07e3d2f1fb6d29d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:38:25 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 21:38:25 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636753105.54.0.389120494556.issue45742@roundup.psfhosted.org> Terry J. Reedy added the comment: Victor, A sentence about hash randomization you wrote for #32329 in PR-4873 is not currently correct. Change code or doc? ---------- nosy: +terry.reedy, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:42:27 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 21:42:27 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636753347.48.0.821143905567.issue45752@roundup.psfhosted.org> Terry J. Reedy added the comment: Should we just remove ' array,' from things that cannot be copied, or does this need more discussion? ---------- keywords: +easy, newcomer friendly nosy: +lukasz.langa, terry.reedy versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:45:28 2021 From: report at bugs.python.org (firewave) Date: Fri, 12 Nov 2021 21:45:28 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636753528.42.0.36025240592.issue45789@roundup.psfhosted.org> firewave added the comment: That didn't work. The link is wrong on the disk and that setting just controls the usage of it not the creation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:50:38 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 21:50:38 +0000 Subject: [issue45761] recursive ProcessPoolExecutor invoke unable to return result In-Reply-To: <1636445750.09.0.78640644256.issue45761@roundup.psfhosted.org> Message-ID: <1636753838.38.0.314724673105.issue45761@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +bquinlan, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:51:34 2021 From: report at bugs.python.org (Chris Eykamp) Date: Fri, 12 Nov 2021 21:51:34 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling Message-ID: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> New submission from Chris Eykamp : Attached is a slightly modifed example of the code sample in Bryan Oakley's response to: https://stackoverflow.com/questions/30337351/how-can-i-ensure-my-ttk-entrys-invalid-state-isnt-cleared-when-it-loses-focus I have modified it by changing the style.map to change the widget's foreground color (rather than background), and by adding a button below the text input. Typing a string containing "invalid" into the textbox causes it to fail validation (its state is shown in the bottom label, updated every second). As expected, the foreground changes to red. However, if I use [tab] to toggle between the elements, the foreground of the text entry gets changed to black, even if the item is invalid. Adding style.map("TEntry", selectforeground=[('invalid', "green")]) creates a new set of weirdness, where the invalid text becomes green when tabbing through the widgets. I'm running on Windows 10, Python 3.83. ---------- components: Tkinter files: simple.py messages: 406242 nosy: watusimoto priority: normal severity: normal status: open title: Using tab to cycle through tkinter widgets breaks foreground styling versions: Python 3.8 Added file: https://bugs.python.org/file50437/simple.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:53:17 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 21:53:17 +0000 Subject: [issue45762] Missing `list` symbols in the object inventory In-Reply-To: <1636445896.9.0.441408433097.issue45762@roundup.psfhosted.org> Message-ID: <1636753998.0.0.730874298661.issue45762@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +eric.araujo, ezio.melotti, mdk, willingc versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:54:43 2021 From: report at bugs.python.org (Chris Eykamp) Date: Fri, 12 Nov 2021 21:54:43 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1636754083.03.0.0910818884142.issue45796@roundup.psfhosted.org> Chris Eykamp added the comment: I'll add that when the red text incorrectly turns black, on my display, I can see a very subtle red halo, as if the text is being printed first as red, then as black in a second pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 16:56:26 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 21:56:26 +0000 Subject: [issue45764] Parse error improvement forgetting ( after def In-Reply-To: <1636456543.8.0.11859375898.issue45764@roundup.psfhosted.org> Message-ID: <1636754186.95.0.490952565779.issue45764@roundup.psfhosted.org> Terry J. Reedy added the comment: Pablo, did you intend to backport to 3.10 or should this be closed? ---------- nosy: +pablogsal, terry.reedy type: -> enhancement versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:08:57 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Nov 2021 22:08:57 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636754937.42.0.352336913146.issue45791@roundup.psfhosted.org> Serhiy Storchaka added the comment: All typing related tests are fixed by updating types.GenericAlias.__getattribute__. So the only thing is left to make all tests passed is removing some special methods tests. The lookup of __instancecheck__ and __subclasscheck__ was changed by Benjamin in fb6fb062e8f677dd63943f3a4b8a45c6665b3418. It looks like deliberate change. Benjamin, do you remember the reasons of the original change? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:14:07 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 22:14:07 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636755247.56.0.715105542281.issue45772@roundup.psfhosted.org> Terry J. Reedy added the comment: Filter, map, and zip are documented as functions to allow other interpreters to implement them as such, with generator functions. That does not apply here, but maybe there is another reason for socket being called a 'function. Antoine, git blame credits you with socket.rst, line 565 .. function:: socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None) https://docs.python.org/3/library/socket.html#socket.socket PR-23960 changes 'function' to 'class'. What do you think? ---------- nosy: +pitrou, terry.reedy stage: -> patch review type: -> behavior versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:23:01 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 22:23:01 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1636755781.21.0.819475582293.issue45775@roundup.psfhosted.org> Terry J. Reedy added the comment: A link to an authoritative reference with the formulas would be necessary to merge this. I inquired of pydev list whether improvement is allowed. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:36:58 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 22:36:58 +0000 Subject: [issue45781] Deleting __debug__ should be an SyntaxError In-Reply-To: <1636623911.67.0.569601489226.issue45781@roundup.psfhosted.org> Message-ID: <1636756618.8.0.545723549831.issue45781@roundup.psfhosted.org> Terry J. Reedy added the comment: For comparison: True = 0 SyntaxError: cannot assign to True del True SyntaxError: cannot delete True It almost seems like __debug__ is a hidden keyword value, but with a startup-dependent value ---------- components: +Interpreter Core nosy: +pablogsal, terry.reedy stage: -> test needed type: -> enhancement versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 17:53:05 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 22:53:05 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1636757585.6.0.254886211413.issue45788@roundup.psfhosted.org> Terry J. Reedy added the comment: On Windows, I believe the correct sentence would be "On Windows, they are in prefix/Lib and prefix/include". Ned, how to complete "On macOS, they are in ?." Victor, with recent file movement, is "while the platform independent header files (all except pyconfig.h) are stored in prefix/include" still true? In what way is pyconfig.h exceptional? Should 'include' be augmented with 'or its subdirectories'? ---------- nosy: +ned.deily, steve.dower, terry.reedy, vstinner stage: -> needs patch title: sys.prefix include directory on Windows -> Doc sys.prefix lib & include directories on Windows and Mac type: enhancement -> behavior versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:00:53 2021 From: report at bugs.python.org (Andre Roberge) Date: Fri, 12 Nov 2021 23:00:53 +0000 Subject: [issue45781] Deleting __debug__ should be an SyntaxError In-Reply-To: <1636623911.67.0.569601489226.issue45781@roundup.psfhosted.org> Message-ID: <1636758053.53.0.49707852723.issue45781@roundup.psfhosted.org> Andre Roberge added the comment: What version are you using? As far as I can test, it has become a syntax error since 3.10. Here is the result with the latest 3.11 alpha > python Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov 5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> del __debug__ File "", line 1 SyntaxError: cannot delete __debug__ >>> exit() > python Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov 5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(): ... del __debug__ ... File "", line 2 SyntaxError: cannot delete __debug__ ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:04:14 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Nov 2021 23:04:14 +0000 Subject: [issue45781] Deleting __debug__ should be an SyntaxError In-Reply-To: <1636623911.67.0.569601489226.issue45781@roundup.psfhosted.org> Message-ID: <1636758254.73.0.694050264986.issue45781@roundup.psfhosted.org> Terry J. Reedy added the comment: Verified in IDLE also. Thanks for doing the test I should have done. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:04:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 23:04:35 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1636758275.58.0.975952127977.issue45775@roundup.psfhosted.org> STINNER Victor added the comment: > A link to an authoritative reference with the formulas would be necessary to merge this. The PR says: "ATSC BT.709 standard constants". For exmaple, I found: https://en.wikipedia.org/wiki/Rec._709#Luma_coefficients "When encoding Y?CBCR video, BT.709 creates gamma-encoded luma (Y?) using matrix coefficients 0.2126, 0.7152, and 0.0722 (together they add to 1)." ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:09:30 2021 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Nov 2021 23:09:30 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1636758570.24.0.412146767692.issue45788@roundup.psfhosted.org> Ned Deily added the comment: Which installations paths are used varies on other factors besides platform. Rather than duplicate information here, I suggest simplifying the sys.prefix doc here by removing the details about installation paths and instead refer to the Installation Paths section of the sysconfig module documentation, which should be the primary reference for this info: https://docs.python.org/3/library/sysconfig.html#installation-paths ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:16:12 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 23:16:12 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636758972.76.0.558826275232.issue45742@roundup.psfhosted.org> STINNER Victor added the comment: > I input python -h on the command line, and I can't find any -R option. If you want to document it, the "usage" is in Python/initconfig.c. See also the -R option. My notes on adding a command line option: https://pythondev.readthedocs.io/pyconfig.html#add-a-new-command-line-option > Victor, A sentence about hash randomization you wrote for #32329 in PR-4873 is not currently correct. Change code or doc? In Python/initconfig.c, the -R option sets config->use_hash_seed to 0. It overrides PYTHONHASHSEED env var, as documented at: https://docs.python.org/3.10/using/cmdline.html#cmdoption-R IMO it's the expected behavior. Cmd line must have the priority over env vars. Which doc is wrong? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:18:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 23:18:58 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1636759138.16.0.130899406537.issue45788@roundup.psfhosted.org> STINNER Victor added the comment: > Victor, with recent file movement, is "while the platform independent header files (all except pyconfig.h) are stored in prefix/include" still true? Are you talking about Include/cpython/ and Include/internal/ subdirectories? > Should 'include' be augmented with 'or its subdirectories'? You can add it if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:21:53 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Nov 2021 23:21:53 +0000 Subject: [issue45797] AMD64 Arch Linux Asan Debug buildbot sometimes hangs before tests complete Message-ID: <1636759313.91.0.941705839577.issue45797@roundup.psfhosted.org> New submission from STINNER Victor : Example: AMD64 Arch Linux Asan Debug 3.10: https://buildbot.python.org/all/#/builders/621/builds/351 (...) 1:13:40 load avg: 1.85 [420/421/1] test_reprlib passed 1:13:41 load avg: 1.85 [421/421/1] test_funcattrs passed command timed out: 1200 seconds without output running [b'make', b'buildbottest', b'TESTOPTS=-j1 -x test_ctypes test_capi test_crypt test_decimal test_faulthandler test_interpreters --junit-xml test-results.xml ${BUILDBOT_TESTOPTS}', b'TESTPYTHONOPTS=', b'TESTTIMEOUT=900'], attempting to kill make: *** [Makefile:1255: buildbottest] Terminated process killed by signal 15 program finished with exit code -1 elapsedTime=5623.934168 Can it be related to bpo-45200 "Address Sanitizer: libasan dead lock in pthread_create() (test_multiprocessing_fork.test_get() hangs)"? ---------- components: Tests messages: 406256 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: AMD64 Arch Linux Asan Debug buildbot sometimes hangs before tests complete versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:38:13 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Nov 2021 23:38:13 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636753528.42.0.36025240592.issue45789@roundup.psfhosted.org> Message-ID: <7b9741da-6272-c72f-45c0-3ba98efb35a2@python.org> Steve Dower added the comment: You're right. You probably need to uninstall and reinstall for the subdirectories of WindowsApps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 18:55:02 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Nov 2021 23:55:02 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1636761302.78.0.575501824821.issue45789@roundup.psfhosted.org> Eryk Sun added the comment: > Also all those files are 0 bytes - even the working ones. The files should have no data, just appexec links. It's just an empty file if there's no link set. > Since I cannot even run the actual executable there seems to be > an issue with the executables on top of the broken appexec link. The executable under "%ProgramFiles%\WindowsApps" can only be executed unconditionally by processes that are running as SYSTEM, LOCAL SERVICE, or NETWORK SERVICE. Otherwise it requires an access token that contains a WIN://SYSAPPID security attribute that contains the package name. When executing an appexec link from the user's local "WindowsApps", CreateProcessW() uses the information in the link to construct this access token, and the call basically becomes CreateProcessAsUserW(hToken, ...). The EXEs and DLLs in the package can be executed from within the app itself. For example, subprocess.call('python') directly spawns the app's "python.exe". FYI, an access token is a kernel object that defines a security context, including the user, groups, privileges, capabilities, integrity level, trust level, security attributes, claim attributes, default owner, default permissions, associated logon session, and associated Windows session. Every process must have a primary token, which is permanently associated with the process. Each thread within a process may have an impersonation token, which is temporarily associated with the thread until it's replaced or removed. > That didn't work. The link is wrong on the disk and that > setting just controls the usage of it not the creation. Yes, the links in the app's subdirectory of the local "WindowsApps" are the basis for the ones that get created in the local WindowsApps when the alias is enabled. The system reads the source reparse point via FSCTL_GET_REPARSE_POINT and sets it on an empty file via FSCTL_SET_REPARSE_POINT. If the source appexec link is wrong or missing, then disabling and enabling the alias won't help. >From the end user's perspective, the simplest solution is to uninstall the app; make sure its subdirectory is removed from the local "WindowsApps" (e.g. "%LocalAppData%\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0"); and install the app again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:09:25 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Nov 2021 00:09:25 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636762165.3.0.993028791724.issue45742@roundup.psfhosted.org> Eryk Sun added the comment: > Which doc is wrong? Currently -R overrides a non-zero seed value in PYTHONHASHSEED. The behavior changed in 3.7. Either the docs or the behavior need to be fixed. To repeat my previous example (this time in Windows): C:\>set PYTHONHASHSEED=37 C:\>py -3.6 -c "print(hash('spam'))" -1810080452065497889 C:\>py -3.6 -Rc "print(hash('spam'))" -1810080452065497889 C:\>py -3.7 -c "print(hash('spam'))" -1810080452065497889 C:\>py -3.7 -Rc "print(hash('spam'))" -7199637890859510937 C:\>py -3.10 -Rc "print(hash('spam'))" 7684061207513636658 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:37:15 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Nov 2021 00:37:15 +0000 Subject: [issue45764] Parse error improvement forgetting ( after def In-Reply-To: <1636456543.8.0.11859375898.issue45764@roundup.psfhosted.org> Message-ID: <1636763835.64.0.566834140178.issue45764@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Normally we don't backport new errors to old versions so we can close this. Thanks for the ping! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:44:53 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Nov 2021 00:44:53 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1636764293.06.0.997352634732.issue45788@roundup.psfhosted.org> Terry J. Reedy added the comment: Ned, I like your idea. In particular, link to sysconfig.get_paths for how prefix is used on a particular machine to define installation paths. Sidenote: https://docs.python.org/3/library/sysconfig.html#installation-paths says "Python currently supports seven schemes:" and lists 5 get_scheme_names list 6, with the extra one being 'osx_framework_user'. Would osx_framework_user: scheme for macOS be a satisfactory entry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:49:20 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 13 Nov 2021 00:49:20 +0000 Subject: [issue44887] test_input_tty hangs when run multiple times in the same process on macOS 10.15 In-Reply-To: <1628676266.46.0.173635281643.issue44887@roundup.psfhosted.org> Message-ID: <1636764560.24.0.782879041917.issue44887@roundup.psfhosted.org> Andrei Kulakov added the comment: I've looked into this and the hang happens on this line: https://github.com/python/cpython/blob/de3db1448b1b983eeb9f4498d07e3d2f1fb6d29d/Lib/test/test_builtin.py#L2030 So the issue is that on the second run, there's nothing to read on that fd. I've tried using os.stat to check if there's data on the fd, but it returned 0 data in both 1st and 2nd runs. However, if a small sleep is added before running os.stat, it does return size of data on 1st run and returns 0 on 2nd run, meaning it's possible to avoid the hang and error out instead (is that an improvement?) This is on MacOS 11.4 Big Sur by the way. This is my test debug branch: https://github.com/python/cpython/compare/main...akulakov:Test-check_input_tty-FIX?expand=1 ---------- nosy: +andrei.avk, kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 19:50:27 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Nov 2021 00:50:27 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1636764627.54.0.356524703257.issue45775@roundup.psfhosted.org> Terry J. Reedy added the comment: On pydev, Guido said "There was talk of deprecating colorsys, but PEP 594 now lists it under "modules to keep". Victor, do you know enough to review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 20:09:46 2021 From: report at bugs.python.org (Catherine Holloway) Date: Sat, 13 Nov 2021 01:09:46 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1636765786.42.0.252726561569.issue45788@roundup.psfhosted.org> Catherine Holloway added the comment: Hey thanks Ned, sysconfig was exactly what I was looking for when I was reading the sys documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 21:55:48 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 13 Nov 2021 02:55:48 +0000 Subject: [issue44995] "Hide the prompts and output" works abnormal In-Reply-To: <1629858915.39.0.643058961708.issue44995@roundup.psfhosted.org> Message-ID: <1636772148.71.0.679558284666.issue44995@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- keywords: +newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 22:55:44 2021 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Nov 2021 03:55:44 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1636775744.89.0.723932394456.issue45788@roundup.psfhosted.org> Ned Deily added the comment: > Would osx_framework_user scheme for macOS be a satisfactory entry? Yes, it should be there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 12 23:55:49 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Nov 2021 04:55:49 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1636779349.9.0.0177072548521.issue45292@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The tests emit some deprecation warnings : PYTHONWARNINGS=always ./python -Wall -m test test_exception_group 0:00:00 load avg: 0.39 Run tests sequentially 0:00:00 load avg: 0.39 [1/1] test_exception_group /home/karthikeyan/stuff/python/cpython/Lib/test/test_exception_group.py:41: DeprecationWarning: invalid escape sequence '\(' MSG = 'second argument \(exceptions\) must be a sequence' /home/karthikeyan/stuff/python/cpython/Lib/test/test_exception_group.py:47: DeprecationWarning: invalid escape sequence '\(' MSG = 'second argument \(exceptions\) must be a non-empty sequence' /home/karthikeyan/stuff/python/cpython/Lib/test/test_exception_group.py:52: DeprecationWarning: invalid escape sequence '\(' MSG = ('Item [0-9]+ of second argument \(exceptions\)' == Tests result: SUCCESS == 1 test OK. Total duration: 51 ms Tests result: SUCCESS ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 00:10:54 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 13 Nov 2021 05:10:54 +0000 Subject: [issue45755] Specialized generic class does not return class attributes in dir In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1636780254.16.0.154089526882.issue45755@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to be an issue with typing than mock since mock just uses the output from dir() . I am not able to bisect the relevant change but below is the output of dir(Foo[int]) in Python 3.6 and master. Python 3.6.9 ['__abstractmethods__', '__args__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__extra__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__next_in_mro__', '__orig_bases__', '__origin__', '__parameters__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '__tree_hash__', '__weakref__', '_abc_cache', '_abc_generic_negative_cache', '_abc_generic_negative_cache_version', '_abc_registry', '_gorg', 'bar'] master branch : ['__args__', '__call__', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__instancecheck__', '__le__', '__lt__', '__module__', '__mro_entries__', '__ne__', '__new__', '__or__', '__origin__', '__parameters__', '__reduce__', '__reduce_ex__', '__repr__', '__ror__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasscheck__', '__subclasshook__', '__weakref__', '_inst', '_name', '_paramspec_tvars', '_typevar_types', 'copy_with'] ---------- nosy: +gvanrossum, kj title: Mock spec with a specialized generic class does not mock class attributes -> Specialized generic class does not return class attributes in dir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:02:12 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 13 Nov 2021 06:02:12 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636783332.56.0.895083382474.issue45772@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 4c792f39e688b11c7c19e411ed4f76a7baa44638 by Hong Xu in branch 'main': bpo-45772: socket.socket should be a class instead of a function (GH-23960) https://github.com/python/cpython/commit/4c792f39e688b11c7c19e411ed4f76a7baa44638 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:02:36 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 06:02:36 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636783356.58.0.940361374361.issue45772@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27792 pull_request: https://github.com/python/cpython/pull/29544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:02:31 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 06:02:31 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636783351.61.0.441212128902.issue45772@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27791 pull_request: https://github.com/python/cpython/pull/29543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:02:26 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 06:02:26 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636783346.53.0.317413099703.issue45772@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +27790 pull_request: https://github.com/python/cpython/pull/29542 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:20:12 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Sat, 13 Nov 2021 06:20:12 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636784412.58.0.977179570158.issue45772@roundup.psfhosted.org> Change by Oleg Iarygin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:23:31 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 06:23:31 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636784611.07.0.309759543718.issue45772@roundup.psfhosted.org> miss-islington added the comment: New changeset 3f15792d60011639d9b170d8a76c6db7f6e83665 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45772: socket.socket should be a class instead of a function (GH-23960) (GH-29542) https://github.com/python/cpython/commit/3f15792d60011639d9b170d8a76c6db7f6e83665 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 01:29:08 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 06:29:08 +0000 Subject: [issue45772] socket.socket should be a class instead of a function In-Reply-To: <1636487756.2.0.78548786827.issue45772@roundup.psfhosted.org> Message-ID: <1636784948.12.0.60603609543.issue45772@roundup.psfhosted.org> miss-islington added the comment: New changeset b952f60213c60f89a50e4538783a18ced64ca91f by Miss Islington (bot) in branch '3.9': [3.9] bpo-45772: socket.socket should be a class instead of a function (GH-23960) (GH-29543) https://github.com/python/cpython/commit/b952f60213c60f89a50e4538783a18ced64ca91f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 04:15:19 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 09:15:19 +0000 Subject: [issue45798] Move _decimal build setup into configure Message-ID: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> New submission from Christian Heimes : Compiler and linker flags for _decimal and internal libmpdec are currently handled by a mix of configure checks and if/else chains in setup.py. The split makes it harder to build _decimal correctly from Modules/Setup. The Modules/Setup file also does not handle --with-system-mpdec. I have a working PR that moves all logic into configure.ac. The new system: * sets LIBMPDEC_CFLAGS and LIBMPDEC_LDFLAGS based on --with-system-libmpdec value. * detects libmpdec_machine by looking at ac_sys_system, MACOSX_DEFAULT_ARCH, ac_cv_sizeof_size_t, ac_cv_gcc_asm_for_x64, ac_cv_type___uint128_t, and ac_cv_gcc_asm_for_x87. * sets libmpdec compiler args based on libmpdec_machine, have_ipa_pure_const_bug, and have_glibc_memmove_bug. * if --with-system-libmpdec is not given, then our Makefile compiles libmpdec objects and puts them into a libmpdec.a archive. * finally it either links _decimal with our libmpdec.a or with system's libmpdec shared library. I went for libmpdec.a because it makes the logic for the internal path look similar to the logic with linking with an external shared library. Modules/Setup ---------- assignee: christian.heimes components: Build messages: 406271 nosy: christian.heimes, mark.dickinson, pitrou priority: normal severity: normal stage: patch review status: open title: Move _decimal build setup into configure type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 04:20:01 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 09:20:01 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1636795201.52.0.280386517149.issue45798@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27793 pull_request: https://github.com/python/cpython/pull/29541 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 04:31:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 09:31:58 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1636795918.86.0.00903784444869.issue45798@roundup.psfhosted.org> Christian Heimes added the comment: PS: I had to add an explicit make rule for each object file. "%.o: %c" templates are not portable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 06:49:18 2021 From: report at bugs.python.org (Ivan Pozdeev) Date: Sat, 13 Nov 2021 11:49:18 +0000 Subject: [issue43878] ./configure fails on Apple Silicon with coreutils uname In-Reply-To: <1618636518.04.0.898249551468.issue43878@roundup.psfhosted.org> Message-ID: <1636804158.75.0.42640825462.issue43878@roundup.psfhosted.org> Ivan Pozdeev added the comment: > Someone nonchalantly updated these in https://github.com/python/cpython/commit/2fc857a5721a5b42bcb696c9cae1bbcc82a91b17 so this bug is now fixed That PR only goes into 3.11. While this ticket claims to have fixed the problem for 3.10 as well. Should that PR be backported? Alternatively, https://github.com/python/cpython/pull/25450 should be merged, but into `3.10` instead of `master`. ---------- nosy: +ivan.pozdeev.gm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 06:59:53 2021 From: report at bugs.python.org (Ruairidh MacLeod) Date: Sat, 13 Nov 2021 11:59:53 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1636804793.99.0.396619733207.issue40222@roundup.psfhosted.org> Change by Ruairidh MacLeod : ---------- nosy: +rkm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:33:25 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Nov 2021 12:33:25 +0000 Subject: [issue31842] pathlib: "Incorrect function" during resolve() In-Reply-To: <1508707873.05.0.213398074469.issue31842@psf.upfronthosting.co.za> Message-ID: <1636806805.15.0.0598180108482.issue31842@roundup.psfhosted.org> Eryk Sun added the comment: > perfectly valid redirected paths (winfsp ram drives for example) I mounted a WinFsp MEMFS filesystem on a directory, which set a mountpoint that targets the root path of a volume device in the native "\Device" object directory. It didn't create a volume GUID name, which means the mountpoint manager isn't supported in this configuration. The error code ERROR_UNRECOGNIZED_VOLUME (1005) is meaningless in this case. The mountpoint manager queries a volume with IOCTLs such as IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, which the WinFsp virtual volume (in the above configuration) doesn't support. Weirdly, it returns the error code STATUS_UNRECOGNIZED_VOLUME instead of STATUS_INVALID_DEVICE_REQUEST. It does this as a lazy workaround for various IOCTLs it receives from filesystem drivers while the volume is in the process of being mounted [1][2]. The side effect is that it returns STATUS_UNRECOGNIZED_VOLUME for unhandled IOCTLs even when it's not getting mounted. This behavior should have been restricted to when the volume parameter block (VPB) is unmounted. Otherwise it should return the expected error code STATUS_INVALID_DEVICE_REQUEST (i.e. ERROR_INVALID_FUNCTION) instead of confusing users with a meaningless error. WinFsp does support the mountpoint manager, in a restricted fashion. The mount target has to be a drive device name in the form "\\.\X:". This gets registered with the mountpoint manager as the canonical DOS name of the volume. Since it's a global name, administrator access is required. It also creates a GUID volume name. Run mountvol.exe without arguments to find the volume name that's associated with the drive letter. Then run it again as `mountvol `, where is an empty directory on which to mount the volume. Note that Python's os.path.realpath() will resolve the volume to the canonical drive name, even if the path traverses a directory mountpoint for the volume. A new issue should be created to ignore ERROR_UNRECOGNIZED_VOLUME in 3.10+, for which Path.resolve() was updated to call os.path.realpath(). For 3.9, fixing Path.resolve() is still possible. There are 3 remaining bug releases planned: 3.9.9: (2022-01-03), 3.9.10 (2022-02-28), and 3.9.11 (2022-05-02). --- [1] https://github.com/billziss-gh/winfsp/blob/v1.9/src/sys/devctl.c#L49 [2] https://github.com/billziss-gh/winfsp/issues/177 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:33:39 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Nov 2021 12:33:39 +0000 Subject: [issue31842] pathlib: "Incorrect function" during resolve() In-Reply-To: <1508707873.05.0.213398074469.issue31842@psf.upfronthosting.co.za> Message-ID: <1636806819.61.0.138990557373.issue31842@roundup.psfhosted.org> Change by Eryk Sun : ---------- stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:56:41 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 12:56:41 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1636808201.96.0.413442093192.issue45798@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the quick review, Mark! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 07:56:26 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 12:56:26 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1636808186.51.0.139993526027.issue45798@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 0486570f7b2b5a75812e5a01a8dca58bfadc2437 by Christian Heimes in branch 'main': bpo-45798: Move _decimal build setup into configure (GH-29541) https://github.com/python/cpython/commit/0486570f7b2b5a75812e5a01a8dca58bfadc2437 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 08:03:27 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sat, 13 Nov 2021 13:03:27 +0000 Subject: [issue45781] Deleting __debug__ should be an SyntaxError In-Reply-To: <1636623911.67.0.569601489226.issue45781@roundup.psfhosted.org> Message-ID: <1636808607.23.0.100758563548.issue45781@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: ouch, apologies for not checking that! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 08:09:39 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 13:09:39 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1636808979.41.0.617445015489.issue45798@roundup.psfhosted.org> Christian Heimes added the comment: I tested the --with-system-libmpdec successfully on my system. Most vendors are using the internal copy of libmpdec any way. AFAIK only Debian-based systems use their own system libmpdec. $ ./configure -C --with-system-libmpdec $ make ... building '_decimal' extension gcc -pthread -fPIC -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include -I. -I/usr/local/include -I/home/heimes/dev/python/cpython/Include -I/home/heimes/dev/python/cpython -c /home/heimes/dev/python/cpython/Modules/_decimal/_decimal.c -o build/temp.linux-x86_64-3.11/home/heimes/dev/python/cpython/Modules/_decimal/_decimal.o -DCONFIG_64=1 -DASM=1 gcc -pthread -shared build/temp.linux-x86_64-3.11/home/heimes/dev/python/cpython/Modules/_decimal/_decimal.o -L/usr/local/lib -o build/lib.linux-x86_64-3.11/_decimal.cpython-311-x86_64-linux-gnu.so -lmpdec ... $ ldd build/lib.linux-x86_64-3.11/_decimal.cpython-311-x86_64-linux-gnu.so linux-vdso.so.1 (0x00007ffde21e1000) libmpdec.so.3 => /lib64/libmpdec.so.3 (0x00007f4f3b4cf000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4f3b4ae000) libc.so.6 => /lib64/libc.so.6 (0x00007f4f3b2df000) libm.so.6 => /lib64/libm.so.6 (0x00007f4f3b19b000) /lib64/ld-linux-x86-64.so.2 (0x00007f4f3b554000) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 08:27:04 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 13:27:04 +0000 Subject: [issue45798] Move _decimal build setup into configure In-Reply-To: <1636794919.07.0.823304462548.issue45798@roundup.psfhosted.org> Message-ID: <1636810024.59.0.173490529735.issue45798@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:07:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 13 Nov 2021 14:07:06 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1636812426.24.0.965196950104.issue45292@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +27794 pull_request: https://github.com/python/cpython/pull/29545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:32:31 2021 From: report at bugs.python.org (Jack DeVries) Date: Sat, 13 Nov 2021 14:32:31 +0000 Subject: [issue45799] Fix confusing wording in Doc/library/__main__.rst Message-ID: <1636813951.2.0.152753647597.issue45799@roundup.psfhosted.org> New submission from Jack DeVries : I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence. ---------- assignee: docs at python components: Documentation messages: 406279 nosy: docs at python, jack__d priority: normal severity: normal status: open title: Fix confusing wording in Doc/library/__main__.rst type: enhancement versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 09:33:42 2021 From: report at bugs.python.org (Jack DeVries) Date: Sat, 13 Nov 2021 14:33:42 +0000 Subject: [issue45799] Fix confusing wording in Doc/library/__main__.rst In-Reply-To: <1636813951.2.0.152753647597.issue45799@roundup.psfhosted.org> Message-ID: <1636814022.03.0.54590673148.issue45799@roundup.psfhosted.org> Change by Jack DeVries : ---------- keywords: +patch pull_requests: +27795 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:32:55 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 13 Nov 2021 15:32:55 +0000 Subject: [issue45755] Specialized generic class does not return class attributes in dir In-Reply-To: <1636399849.8.0.841580145929.issue45755@roundup.psfhosted.org> Message-ID: <1636817575.03.0.598350361753.issue45755@roundup.psfhosted.org> Guido van Rossum added the comment: Isn?t the solution to use the unspecialized class? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:37:55 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 15:37:55 +0000 Subject: [issue45800] Move expat handling into configure and Makefile Message-ID: <1636817875.39.0.335173778255.issue45800@roundup.psfhosted.org> New submission from Christian Heimes : Move logic for --with-system-expat out of setup.py into configure and Makefile. This will enable --with-system-expat in Modules/Setup without manual patching. * Set CFLAGS and LDFLAGS for pyexpat and libexpat in configure. * Build a static libexpat.a from our copy of expat when --with-system-expat is not given * Either link pyexpat with libexpat.a or system libexpat. Basically use the same approach as decimal changeset bpo-45798. ---------- assignee: christian.heimes components: Build messages: 406281 nosy: christian.heimes priority: normal severity: normal status: open title: Move expat handling into configure and Makefile type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:44:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 15:44:00 +0000 Subject: [issue45800] Move expat handling into configure and Makefile In-Reply-To: <1636817875.39.0.335173778255.issue45800@roundup.psfhosted.org> Message-ID: <1636818240.59.0.965982878072.issue45800@roundup.psfhosted.org> Christian Heimes added the comment: An intermediate libexpat.a simplifies Modules/Setup. The explicit rules are required to support BSD make. bmake does neither have "%.o: %.c" nor target variable overrides like GNU make. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:44:43 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 13 Nov 2021 15:44:43 +0000 Subject: [issue45800] Move expat handling into configure and Makefile In-Reply-To: <1636817875.39.0.335173778255.issue45800@roundup.psfhosted.org> Message-ID: <1636818283.58.0.196608283554.issue45800@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27796 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:44:36 2021 From: report at bugs.python.org (Brandt Bucher) Date: Sat, 13 Nov 2021 15:44:36 +0000 Subject: [issue45791] __instancecheck__ being checked on type(cls) instead of cls In-Reply-To: <1636693271.06.0.414985323738.issue45791@roundup.psfhosted.org> Message-ID: <1636818276.25.0.690839235079.issue45791@roundup.psfhosted.org> Change by Brandt Bucher : ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:46:18 2021 From: report at bugs.python.org (Brandt Bucher) Date: Sat, 13 Nov 2021 15:46:18 +0000 Subject: [issue45773] Compiler hangs during jump elimination In-Reply-To: <1636487782.5.0.379047434297.issue45773@roundup.psfhosted.org> Message-ID: <1636818378.97.0.131923036154.issue45773@roundup.psfhosted.org> Change by Brandt Bucher : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 10:51:11 2021 From: report at bugs.python.org (Jack_B) Date: Sat, 13 Nov 2021 15:51:11 +0000 Subject: [issue44924] logging.handlers.QueueHandler does not maintain the exc_text In-Reply-To: <1629108674.13.0.869133594401.issue44924@roundup.psfhosted.org> Message-ID: <1636818671.21.0.782364096479.issue44924@roundup.psfhosted.org> Jack_B added the comment: This also tripped me up recently. More broadly, I assumed that handlers downstream of the QueueHandler/QueueListener would get complete log records. Having looked at it, I can see they need to be pickled, and that means stripping some information. But like Mikael, I found the current behaviour a bit confusing. The solution I am using is to override logging.Formatter.format and QueueHandler.Prepare like so: class _OptionalExcFormatter(logging.Formatter): def format(self, record, with_exc=True, with_stack=True): """ Format the specified record as text. Same as superclass except it only adds the exc_info and stack_info if the corresponding arguments are True. """ record.message = record.getMessage() if self.usesTime(): record.asctime = self.formatTime(record, self.datefmt) s = self.formatMessage(record) if record.exc_info and with_exc: # Cache the traceback text to avoid converting it multiple times # (it's constant anyway) if not record.exc_text: record.exc_text = self.formatException(record.exc_info) if record.exc_text and with_exc: if s[-1:] != "\n": s = s + "\n" s = s + record.exc_text if record.stack_info and with_stack: if s[-1:] != "\n": s = s + "\n" s = s + self.formatStack(record.stack_info) return s class _QueueHandlerExc(QueueHandler): def prepare(self, record): # bpo-35726: make copy of record to avoid affecting other handlers in the chain. record = copy.copy(record) # Get a formatter. It must support the with_exc and with_stack args to f.format if self.formatter is None: f = _OptionalExcFormatter() else: f = self.formatter # Merge args into message and strip them as they may not be pickleable msg = f.format(record, with_exc=False, with_stack=False) record.message = msg record.msg = msg record.args = None # Convert exc_info into exc_text and strip it as it may not be pickleable if record.exc_info is not None: record.exc_text = f.formatException(record.exc_info) record.exc_info = None return record Pros: - The record feels "less mangled" - It does not require another formatter to have already populated exc_text, and allows the use of a specific formatter to do so. - Having the message and exc_text separate seems logical, and allows downstream handlers/formatters to treat them differently. - logging.Formatter can get the changes above in a back-compatible way Cons: - exc_text now contains the stack trace as well as the usual exc_info, which is a little odd, but it still seems to be a better place for it than the message. - If QueueHandler gets the changes above, it will break code where QueueHandler is used with a custom Formatter which overrides Formatter.format. This is probably not OK. I think the changes to logging.Formatter might also be useful elsewhere, as it would enable you to do: class _NoStackFormatter(logging.Formatter): def format(self, record): return super().format(record, with_exc=True, with_stack=False) to have a formatter which omits stack traces. ---------- nosy: +Jack_B _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 11:00:51 2021 From: report at bugs.python.org (Jaap Roes) Date: Sat, 13 Nov 2021 16:00:51 +0000 Subject: [issue45756] mock raises exception when using a spec with an attribute that raises exception on access In-Reply-To: <1636400873.51.0.88200985051.issue45756@roundup.psfhosted.org> Message-ID: <1636819251.82.0.147200619117.issue45756@roundup.psfhosted.org> Jaap Roes added the comment: I think I encountered this when trying to mock `requests.Response`: https://github.com/psf/requests/issues/5944 ---------- nosy: +jaap3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 11:09:32 2021 From: report at bugs.python.org (Jack_B) Date: Sat, 13 Nov 2021 16:09:32 +0000 Subject: [issue44924] logging.handlers.QueueHandler does not maintain the exc_text In-Reply-To: <1629108674.13.0.869133594401.issue44924@roundup.psfhosted.org> Message-ID: <1636819772.02.0.920812049696.issue44924@roundup.psfhosted.org> Jack_B added the comment: Whoops! I've been a bit inconsistent between the code and my pros and cons about whether exc_text gets record.stack_info as well as record.exc_info. But either option is possible. As an aside, I'm not sure why stack info is not cached in e.g. record.stack_text for the same reasons that exc_text is cached. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 11:24:58 2021 From: report at bugs.python.org (Jack_B) Date: Sat, 13 Nov 2021 16:24:58 +0000 Subject: [issue44924] logging.handlers.QueueHandler does not maintain the exc_text In-Reply-To: <1629108674.13.0.869133594401.issue44924@roundup.psfhosted.org> Message-ID: <1636820698.48.0.716241466024.issue44924@roundup.psfhosted.org> Jack_B added the comment: OK, I had a misunderstanding about what record.stack_info was. I see it is a string, so doesn't need to be stripped. Ignore my first con and the previous message. Sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 12:00:06 2021 From: report at bugs.python.org (Andre Roberge) Date: Sat, 13 Nov 2021 17:00:06 +0000 Subject: [issue45801] Incorrect "Perhaps you forgot a comma" hint Message-ID: <1636822806.1.0.227872215707.issue45801@roundup.psfhosted.org> New submission from Andre Roberge : Python 3.10 and 3.11: >>> sum[i for i in [1, 2, 3] if i%2==0] File "", line 1 sum[i for i in [1, 2, 3] if i%2==0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? Furthermore, I don't find that highlighting the entire statement (or parts of it, if we use print(sum[...]) is very useful in attempting to find the source of the error. In previous versions, we would get the following: >>> sum[i for i in [1, 2, 3] if i%2==0] File "", line 1 sum[i for i in [1, 2, 3] if i%2==0] ^ SyntaxError: invalid syntax ---------- components: Parser messages: 406287 nosy: aroberge, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Incorrect "Perhaps you forgot a comma" hint versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 12:11:09 2021 From: report at bugs.python.org (Akkana Peck) Date: Sat, 13 Nov 2021 17:11:09 +0000 Subject: [issue45802] MozillaCookieJar can't read cookies, should support cookies.sqlite Message-ID: <1636823469.07.0.796860437304.issue45802@roundup.psfhosted.org> New submission from Akkana Peck : http.cookiejar.MozillaCookieJar only reads from cookies.txt, a format that Mozilla hasn't used in over a decade. It should read the file mozilla actually uses, cookies.sqlite. Here's some code that works to turn cookies.sqlite into cookies.txt in order to read it in to MozillaCookieJar: http://blog.mithis.net/archives/python/90-firefox3-cookies-in-python This was requested in 2008 in issue 2277, around the time Mozilla made the switch. The issue was rejected back then because it was too late to make the final beta for Python 2.6/3.0. I'd like to bring it up again now. I can write a patch (since a real fix should read the cookies into the cookiejar directly, not use StringIO to create an intermediate cookies.txt) if there's any chance it would be accepted. ---------- components: Library (Lib) messages: 406288 nosy: akkana priority: normal severity: normal status: open title: MozillaCookieJar can't read cookies, should support cookies.sqlite _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:06:16 2021 From: report at bugs.python.org (Ethan Furman) Date: Sat, 13 Nov 2021 19:06:16 +0000 Subject: [issue44559] Enum: revert to 3.9 In-Reply-To: <1625363304.74.0.624005694289.issue44559@roundup.psfhosted.org> Message-ID: <1636830376.04.0.699162963704.issue44559@roundup.psfhosted.org> Change by Ethan Furman : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:10:16 2021 From: report at bugs.python.org (Ethan Furman) Date: Sat, 13 Nov 2021 19:10:16 +0000 Subject: [issue42248] Raised exception in Enum keeping user objects alive unnecessarily In-Reply-To: <1604350009.17.0.208770748804.issue42248@roundup.psfhosted.org> Message-ID: <1636830616.81.0.00817892639984.issue42248@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:31:51 2021 From: report at bugs.python.org (Mohammad Mostafa Farzan) Date: Sat, 13 Nov 2021 19:31:51 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636831911.2.0.249090739997.issue45752@roundup.psfhosted.org> Change by Mohammad Mostafa Farzan : ---------- keywords: +patch nosy: +m2_farzan nosy_count: 4.0 -> 5.0 pull_requests: +27797 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:55:47 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 13 Nov 2021 19:55:47 +0000 Subject: [issue45762] Missing `list` symbols in the object inventory In-Reply-To: <1636445896.9.0.441408433097.issue45762@roundup.psfhosted.org> Message-ID: <1636833347.33.0.112010267806.issue45762@roundup.psfhosted.org> ?ric Araujo added the comment: If you search in the index, there is no entry like 'append (list method)', only 'append (sequence method)': https://docs.python.org/3/genindex-A.html This goes to the reference docs, where list methods are documented indirectly by reference to the Sequence protocol described just above the list section: https://docs.python.org/3/library/stdtypes.html#lists The tutorial page lists all methods for people learning, with noindex markup to avoid pointing from the index to the reference: https://github.com/python/cpython/blob/3.10/Doc/tutorial/datastructures.rst#L19 The individual decisions make sense, but I think the results is not satisfactory: there is no reference to list.append (etc) in the index or the sphinx inventory (only 'list.sort' is there, from the entry in the library/stdtypes list section). I think index markup should be added for all built-in types in the stdtypes page so that links are generated. Alternatively, add a sphinx directive to register that a type matches the sequence (etc) protocol, so that index entries for all protocol methods can be generated automatically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:57:16 2021 From: report at bugs.python.org (Tsvetan Kintisheff) Date: Sat, 13 Nov 2021 19:57:16 +0000 Subject: [issue45803] make_dataclass is missing the documented kw_only argument Message-ID: <1636833436.92.0.166448079237.issue45803@roundup.psfhosted.org> New submission from Tsvetan Kintisheff : According to the 3.10 documentation, make_dataclass includes the kw_only argument: https://github.com/python/cpython/blob/3f15792d60011639d9b170d8a76c6db7f6e83665/Lib/dataclasses.py#L1327 However, the source code referred to by the same doc does not appear to include the kw_only argument: https://github.com/python/cpython/blob/3f15792d60011639d9b170d8a76c6db7f6e83665/Lib/dataclasses.py#L1327 ---------- components: ctypes messages: 406290 nosy: kintisheff priority: normal severity: normal status: open title: make_dataclass is missing the documented kw_only argument versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 14:58:46 2021 From: report at bugs.python.org (Tsvetan Kintisheff) Date: Sat, 13 Nov 2021 19:58:46 +0000 Subject: [issue45803] make_dataclass is missing the documented kw_only argument In-Reply-To: <1636833436.92.0.166448079237.issue45803@roundup.psfhosted.org> Message-ID: <1636833526.29.0.0295980015366.issue45803@roundup.psfhosted.org> Tsvetan Kintisheff added the comment: to clarify, the documentation permalink is: https://docs.python.org/3/library/dataclasses.html#dataclasses.make_dataclass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:00:21 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Nov 2021 20:00:21 +0000 Subject: [issue45801] Incorrect "Perhaps you forgot a comma" hint In-Reply-To: <1636822806.1.0.227872215707.issue45801@roundup.psfhosted.org> Message-ID: <1636833621.54.0.493713798186.issue45801@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think this is correct because if you add a comma, indeed is valid syntax: >>> sum,[i for i in [1, 2, 3] if i%2==0] (, [2]) Here the problem is that you are mentally mapping the construct to sum(...) where the parens are substituted with brackets, which is not what the parser sees, the parser sees two expressions glued together like >> f() g() File "", line 1 f() g() ^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? and it surrounds the whole expression. Do you have an idea on what you would prefer here? Otherwise, I suggest to close as "not a bug". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:07:30 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 13 Nov 2021 20:07:30 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636834050.63.0.215309345605.issue45765@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 3e0b830e859ca8792401bfd1402d659f56f99941 by Jason R. Coombs in branch '3.9': [3.9] [bpo-45765] Fix distribution discovery on empty path. (GH-29487). (GH-29511) https://github.com/python/cpython/commit/3e0b830e859ca8792401bfd1402d659f56f99941 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:08:32 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 13 Nov 2021 20:08:32 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636834112.15.0.398916987971.issue45765@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset ed55426acd58f030ccc0cf1297e66078f538797c by Miss Islington (bot) in branch '3.10': [bpo-45765] Fix distribution discovery on empty path. (GH-29487) (GH-29510) https://github.com/python/cpython/commit/ed55426acd58f030ccc0cf1297e66078f538797c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:13:56 2021 From: report at bugs.python.org (Andre Roberge) Date: Sat, 13 Nov 2021 20:13:56 +0000 Subject: [issue45801] Incorrect "Perhaps you forgot a comma" hint In-Reply-To: <1636822806.1.0.227872215707.issue45801@roundup.psfhosted.org> Message-ID: <1636834436.1.0.504908993.issue45801@roundup.psfhosted.org> Andre Roberge added the comment: I understand. I reported this issue when one of my newest tests failed with Python 3.10 and 3.11. Actually, using friendly-traceback, using the location of the exception as indicated by cPython 3.10 and 3.11, here's part of the explanation it gives: The following lines of code would not cause any `SyntaxError`: sum + [i for i in [1, 2, 3] if i%2==0] sum - [i for i in [1, 2, 3] if i%2==0] sum * [i for i in [1, 2, 3] if i%2==0] sum, [i for i in [1, 2, 3] if i%2==0] Note: these are just some of the possible choices and that some of them might raise other types of exceptions. So, I agree with you that suggesting a comma would be appropriate. (I also miss the suggestion of inserting an equal sign above). Meanwhile, with prior versions of cPython, here's the suggestion that was offered: You used square brackets, `[...]` instead of parentheses. Write the following instead: sum(i for i in [1, 2, 3] if i%2==0) So, since using the suggestion currently by cPython (3.10, 3.11), one could get a syntactically valid statement by adding a comma, I cannot really argue that this is a bug. (Sorry, I should have checked in more details before.) Therefore, I agree that this issue should probably be closed ... unless you find that suggesting a missing comma while there are many other possible operators that could be inserted could be considered as misleading. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:16:12 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 20:16:12 +0000 Subject: [issue45799] Fix confusing wording in Doc/library/__main__.rst In-Reply-To: <1636813951.2.0.152753647597.issue45799@roundup.psfhosted.org> Message-ID: <1636834572.27.0.49437602269.issue45799@roundup.psfhosted.org> miss-islington added the comment: New changeset f8da00ef04fdadf7cd9821e8ec4b317ecf3ed663 by Jack DeVries in branch 'main': bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546) https://github.com/python/cpython/commit/f8da00ef04fdadf7cd9821e8ec4b317ecf3ed663 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:16:18 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 20:16:18 +0000 Subject: [issue45799] Fix confusing wording in Doc/library/__main__.rst In-Reply-To: <1636813951.2.0.152753647597.issue45799@roundup.psfhosted.org> Message-ID: <1636834578.08.0.631353098549.issue45799@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27798 pull_request: https://github.com/python/cpython/pull/29549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:17:01 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 13 Nov 2021 20:17:01 +0000 Subject: [issue45803] make_dataclass is missing the documented kw_only argument In-Reply-To: <1636833436.92.0.166448079237.issue45803@roundup.psfhosted.org> Message-ID: <1636834621.0.0.0935746488285.issue45803@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> eric.smith components: +Library (Lib) -ctypes nosy: +eric.smith versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 15:36:51 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Nov 2021 20:36:51 +0000 Subject: [issue45799] Fix confusing wording in Doc/library/__main__.rst In-Reply-To: <1636813951.2.0.152753647597.issue45799@roundup.psfhosted.org> Message-ID: <1636835811.84.0.344025146083.issue45799@roundup.psfhosted.org> miss-islington added the comment: New changeset 28326ac5f87ede140268376f0c87c3b2aba62906 by Miss Islington (bot) in branch '3.10': bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546) https://github.com/python/cpython/commit/28326ac5f87ede140268376f0c87c3b2aba62906 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 16:09:49 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 13 Nov 2021 21:09:49 +0000 Subject: [issue45801] Incorrect "Perhaps you forgot a comma" hint In-Reply-To: <1636822806.1.0.227872215707.issue45801@roundup.psfhosted.org> Message-ID: <1636837789.52.0.932368904688.issue45801@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I will close this but will try to think for another issue into an error for the parens -> braket. Thanks for opening the issue! ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 16:17:03 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sat, 13 Nov 2021 21:17:03 +0000 Subject: [issue45243] [sqlite3] add support for changing connection limits In-Reply-To: <1632090954.41.0.8887678667.issue45243@roundup.psfhosted.org> Message-ID: <1636838223.98.0.558104883344.issue45243@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 16:23:57 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 13 Nov 2021 21:23:57 +0000 Subject: [issue45799] Fix confusing wording in Doc/library/__main__.rst In-Reply-To: <1636813951.2.0.152753647597.issue45799@roundup.psfhosted.org> Message-ID: <1636838637.23.0.751300087049.issue45799@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for your contribution! ---------- nosy: +eric.smith resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 18:15:41 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 13 Nov 2021 23:15:41 +0000 Subject: [issue45765] importlib.metadata fails to find distributions in empty path In-Reply-To: <1636466091.67.0.318711437429.issue45765@roundup.psfhosted.org> Message-ID: <1636845341.97.0.177195643302.issue45765@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:03:59 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Nov 2021 00:03:59 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636848239.31.0.0467816303222.issue45738@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27799 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 19:48:15 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Nov 2021 00:48:15 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1636850895.39.0.802050732642.issue37295@roundup.psfhosted.org> Raymond Hettinger added the comment: These speedups all to be significant and worth doing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:06:49 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Nov 2021 01:06:49 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636852009.47.0.584352987127.issue45738@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 25835c518aa7446f3680b62c1fb43827e0f190d9 by Pablo Galindo Salgado in branch 'main': bpo-45738: Fix computation of error location for invalid continuation (GH-29550) https://github.com/python/cpython/commit/25835c518aa7446f3680b62c1fb43827e0f190d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:07:03 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 01:07:03 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636852023.85.0.180908268919.issue45738@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +27800 pull_request: https://github.com/python/cpython/pull/29551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:10:43 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Nov 2021 01:10:43 +0000 Subject: [issue45054] json module should issue warning about duplicate keys In-Reply-To: <1630369837.94.0.281309391119.issue45054@roundup.psfhosted.org> Message-ID: <1636852243.15.0.654490799388.issue45054@roundup.psfhosted.org> Raymond Hettinger added the comment: -0 on doing this. The suggested warning/error adds overhead that everyone would pay for but would almost never be of benefit. I haven't seen this particular problem arise in practice. The likely reasons it doesn't come up are 1) that generated data doesn't normally produce mixed type keys, 2) because mixed type keys don't round-trip, and 3) even using numeric keys only (not mixed) is uncommon because it results in poor outcomes that fail round-trip invariants. Andrei Kulakov is right in saying that such data suggests deeper problems with the design and that static typing would be beneficial. One last thought: Even with regular dicts, we don't normally warn about encountering duplicate keys: >>> dict([(1, 'run'), (1, 'zoo'), (3, 'tree')]) {1: 'zoo', 3: 'tree'} ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:19:47 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Nov 2021 01:19:47 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636852787.88.0.340850977256.issue45738@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27801 pull_request: https://github.com/python/cpython/pull/29552 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:30:10 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 01:30:10 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636853410.85.0.659369025216.issue45738@roundup.psfhosted.org> miss-islington added the comment: New changeset bf26a6da7aaedb526c9eb1cb56b0e46d1c10384c by Miss Islington (bot) in branch '3.10': bpo-45738: Fix computation of error location for invalid continuation (GH-29550) https://github.com/python/cpython/commit/bf26a6da7aaedb526c9eb1cb56b0e46d1c10384c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:31:39 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Nov 2021 01:31:39 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636853499.17.0.278163615017.issue45738@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This should be fixed by now, but please, check if everything is in order in your respective test suites and confirm here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:47:35 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Nov 2021 01:47:35 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636854455.11.0.983856081708.issue45738@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 142fcb40b6e460fa9b4a89fe9846b1ce4176354e by Pablo Galindo Salgado in branch '3.9': bpo-45738: Fix computation of error location for invalid continuation characters in the parser (GH-29550) (GH-29552) https://github.com/python/cpython/commit/142fcb40b6e460fa9b4a89fe9846b1ce4176354e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 20:49:22 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Nov 2021 01:49:22 +0000 Subject: [issue45054] json module should issue warning about duplicate keys In-Reply-To: <1630369837.94.0.281309391119.issue45054@roundup.psfhosted.org> Message-ID: <1636854562.19.0.975664103357.issue45054@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 21:48:01 2021 From: report at bugs.python.org (Roger Serwy) Date: Sun, 14 Nov 2021 02:48:01 +0000 Subject: [issue45804] IDLE - faster shell writing Message-ID: <1636858081.72.0.88336234035.issue45804@roundup.psfhosted.org> New submission from Roger Serwy : The shell provided by IDLE uses synchronous sys.stdout.write() calls between the subprocess and the front-end, leading to very slow writes. The provided patch proposes buffering the stdout/stderr streams in the subprocess and then sending a single update after 50ms. The patch also provides back pressure on the buffer so that it doesn't grow without bound. When trying the behavior of the patch, disable the squeezer extension, or set its limit to 1000. Then in the shell, run: for i in range(500): print(i) The output will instantly appear in the shell. ---------- files: idlelib_buffer_output.patch keywords: patch messages: 406306 nosy: roger.serwy, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE - faster shell writing type: enhancement versions: Python 3.10 Added file: https://bugs.python.org/file50438/idlelib_buffer_output.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 13 23:02:00 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Sun, 14 Nov 2021 04:02:00 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636862520.09.0.227251745817.issue45752@roundup.psfhosted.org> Stefan Pochmann added the comment: Just saw that it's in copy.py's docstring as well: "This version does not copy types like module, class, function, method, nor stack trace, stack frame, nor file, socket, window, nor array, nor any similar types." https://github.com/python/cpython/blob/3.10/Lib/copy.py#L41-L43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 00:48:42 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Nov 2021 05:48:42 +0000 Subject: [issue45804] IDLE - faster shell writing In-Reply-To: <1636858081.72.0.88336234035.issue45804@roundup.psfhosted.org> Message-ID: <1636868922.64.0.209297276857.issue45804@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you Roger. Good to hear from you. https://stackoverflow.com/questions/66286367/why-is-my-function-faster-than-pythons-print-function-in-idle, Feb 2021, was about this issue. In my answer I verified the claim and then showed in further experiments that batching prints solved the issue. #43283 added a paragraph to the IDLE doc explaining the problem and suggesting that users could work around it by batching and joining before printing. Buffering the streams to do so is an appealing alternative. I intended to make sure that exceptions are completely and not just partly joined and sent in one write. Some immediate questions: Can buffering the output streams have any negative consequences. Does it affect isatty, for instance, or anything checking line buffering? In case a user is interactively developing a tkinter GUI, IDLE already runs tcl.update() in a 50 ms after loop. Could this be used to trigger writes, by calling flush()? Did you consider using io.TextIOWrapper instead the current TextIOBase as base class for the output classes? I am guessing that you do not have a python/cpython clone for making PRs. Tomorrow, I will try to find out how to make apply a .patch file to mine and do so. ---------- versions: +Python 3.11 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 03:20:37 2021 From: report at bugs.python.org (Saul Shanabrook) Date: Sun, 14 Nov 2021 08:20:37 +0000 Subject: [issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect Message-ID: <1636878037.09.0.00718141853617.issue45805@roundup.psfhosted.org> New submission from Saul Shanabrook : The CO_FUTURE_ANNOTATIONS code flag was added in Python 3.7 I believe in this PR https://github.com/python/cpython/pull/4390. However, it does not appear in dis's COMPILER_FLAG_NAMES map and so is not documented in inspect or pretty printed. I believe the fix would be to add it to the dict in dis as well as document it in inspect. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 406309 nosy: docs at python, saulshanabrook priority: normal severity: normal status: open title: CO_FUTURE_ANNOTATIONS flag is not documented or in inspect versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 03:28:27 2021 From: report at bugs.python.org (Saul Shanabrook) Date: Sun, 14 Nov 2021 08:28:27 +0000 Subject: [issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect In-Reply-To: <1636878037.09.0.00718141853617.issue45805@roundup.psfhosted.org> Message-ID: <1636878507.44.0.235435783762.issue45805@roundup.psfhosted.org> Saul Shanabrook added the comment: I am closing this because, I realized I was unclear on whether the future flags end up as code flags. I thought we were just missing this one, but then realized that none of the other future flags are documented either. I had found a flag that was not recognized, 0x1000000, and for some reason thought it was related to the future annotations import. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 03:35:18 2021 From: report at bugs.python.org (Saul Shanabrook) Date: Sun, 14 Nov 2021 08:35:18 +0000 Subject: [issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect In-Reply-To: <1636878037.09.0.00718141853617.issue45805@roundup.psfhosted.org> Message-ID: <1636878918.36.0.477893630155.issue45805@roundup.psfhosted.org> Saul Shanabrook added the comment: Actually, keeping this open. I am still unclear if this is expected behavior or not, but I do notice that the dis module is unable to read the flag when the annotations future is imported. For example `dis.pretty_flags(compile("from __future__ import annotations", "", "exec").co_flags)` return `'NOFREE, 0x1000000'`. Sorry for the repeated messages. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 04:02:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 14 Nov 2021 09:02:40 +0000 Subject: [issue45800] Move expat handling into configure and Makefile In-Reply-To: <1636817875.39.0.335173778255.issue45800@roundup.psfhosted.org> Message-ID: <1636880560.32.0.973385142462.issue45800@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 464e6616be86129e33af6d9e43540c260d6804d5 by Christian Heimes in branch 'main': bpo-45800: Move pyexpat build setup into configure (GH-29547) https://github.com/python/cpython/commit/464e6616be86129e33af6d9e43540c260d6804d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 04:02:39 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 14 Nov 2021 09:02:39 +0000 Subject: [issue45800] Move expat handling into configure and Makefile In-Reply-To: <1636817875.39.0.335173778255.issue45800@roundup.psfhosted.org> Message-ID: <1636880559.88.0.308628983669.issue45800@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 04:34:41 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 14 Nov 2021 09:34:41 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636882481.08.0.555019612654.issue45752@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset b7360ae395e9e633d384d16064c5dc04a9841e19 by M. Mostafa Farzan in branch 'main': bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) https://github.com/python/cpython/commit/b7360ae395e9e633d384d16064c5dc04a9841e19 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 04:34:48 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 09:34:48 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636882488.88.0.319625005929.issue45752@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +27802 pull_request: https://github.com/python/cpython/pull/29554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 04:58:05 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 09:58:05 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636883885.41.0.252158735766.issue45752@roundup.psfhosted.org> miss-islington added the comment: New changeset 6073920fcdb5a36d20a6a7c6ee204f74f00e1cb4 by Miss Islington (bot) in branch '3.9': bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) https://github.com/python/cpython/commit/6073920fcdb5a36d20a6a7c6ee204f74f00e1cb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 05:18:17 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Nov 2021 10:18:17 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636885097.58.0.873377027134.issue45742@roundup.psfhosted.org> STINNER Victor added the comment: If I understand correctly https://docs.python.org/3.10/using/cmdline.html#cmdoption-R "This option only has an effect if the PYTHONHASHSEED environment variable is set to 0" should be replaced with: "This option only has an effect if the PYTHONHASHSEED environment variable is set" Is that correct? Does someone want to write a PR for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 05:59:36 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 14 Nov 2021 10:59:36 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636887576.77.0.371842940093.issue45742@roundup.psfhosted.org> Eryk Sun added the comment: How about this? Enable hash randomization. This option overrides PYTHONHASHSEED to use the default behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 06:16:44 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 14 Nov 2021 11:16:44 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636888604.15.0.914294918488.issue45752@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood nosy_count: 7.0 -> 8.0 pull_requests: +27803 pull_request: https://github.com/python/cpython/pull/29555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 06:33:36 2021 From: report at bugs.python.org (Mohammad Mostafa Farzan) Date: Sun, 14 Nov 2021 11:33:36 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636889616.46.0.277607061782.issue45752@roundup.psfhosted.org> Change by Mohammad Mostafa Farzan : ---------- pull_requests: +27804 pull_request: https://github.com/python/cpython/pull/29556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 07:54:45 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 12:54:45 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636894485.84.0.750928064809.issue45752@roundup.psfhosted.org> miss-islington added the comment: New changeset 2081f9fe75a3a990394fbccd0c1c91c229c6289e by M. Mostafa Farzan in branch '3.10': [3.10] bpo-45752: Fix no-support examples in 'copy' docs (GH-29548) (GH-29556) https://github.com/python/cpython/commit/2081f9fe75a3a990394fbccd0c1c91c229c6289e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 07:56:04 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 12:56:04 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636894564.56.0.148345987632.issue45752@roundup.psfhosted.org> miss-islington added the comment: New changeset c2c4fdf5ea6e9cba4ef469d08a52abb9cfa756a5 by Alex Waygood in branch 'main': bpo-45752: Remove "array" from list of things that cannot be copied in `copy` module docstring (GH-29555) https://github.com/python/cpython/commit/c2c4fdf5ea6e9cba4ef469d08a52abb9cfa756a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 07:56:09 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 12:56:09 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636894569.45.0.337248585149.issue45752@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27805 pull_request: https://github.com/python/cpython/pull/29557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 07:56:14 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 12:56:14 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636894574.17.0.486416835465.issue45752@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27806 pull_request: https://github.com/python/cpython/pull/29558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:18:36 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 13:18:36 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636895915.99.0.262222987817.issue45752@roundup.psfhosted.org> miss-islington added the comment: New changeset 55d24edaadba4ee90f464d88b44075649788f128 by Miss Islington (bot) in branch '3.10': bpo-45752: Remove "array" from list of things that cannot be copied in `copy` module docstring (GH-29555) https://github.com/python/cpython/commit/55d24edaadba4ee90f464d88b44075649788f128 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:21:36 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 14 Nov 2021 13:21:36 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636896096.28.0.403348494372.issue45752@roundup.psfhosted.org> miss-islington added the comment: New changeset 9f9a3028e3bb923e726789ab3ea5ce298b596bc6 by Miss Islington (bot) in branch '3.9': bpo-45752: Remove "array" from list of things that cannot be copied in `copy` module docstring (GH-29555) https://github.com/python/cpython/commit/9f9a3028e3bb923e726789ab3ea5ce298b596bc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:34:15 2021 From: report at bugs.python.org (Bruce Merry) Date: Sun, 14 Nov 2021 13:34:15 +0000 Subject: [issue21644] Optimize bytearray(int) constructor to use calloc() In-Reply-To: <1401740758.16.0.943124117891.issue21644@psf.upfronthosting.co.za> Message-ID: <1636896855.4.0.203780404505.issue21644@roundup.psfhosted.org> Bruce Merry added the comment: > I abandonned the issue because I didn't have time to work on it. If you want, you can open a new issue for that. If I make a pull request and run some microbenchmarks, will you (or some other core dev) have time to review it? I've had a bad experience before with a PR that I'm still unable to get reviewed after several years, so I'd like to get at least a tentative agreement before I invest time in it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:39:18 2021 From: report at bugs.python.org (PEW's Corner) Date: Sun, 14 Nov 2021 13:39:18 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636897158.56.0.78590793274.issue45738@roundup.psfhosted.org> PEW's Corner added the comment: Seems to work. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 08:59:48 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 14 Nov 2021 13:59:48 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636898388.26.0.826924558151.issue45738@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 10:13:14 2021 From: report at bugs.python.org (E. Paine) Date: Sun, 14 Nov 2021 15:13:14 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1636902794.2.0.668074925349.issue45796@roundup.psfhosted.org> E. Paine added the comment: I believe this is just because the `selectbackground` is only shown when the widget has focus. Try, for example, only selecting part of the text and then tabbing off. Therefore, I think this is not a bug. The only thing which makes me slightly doubt myself is that this behaviour is platform-specific, and not reproducible on Linux, but this could just be down to Windows design guidelines. IMO, this issue should be closed as "not a bug". If you think this is an issue that should be taken further, please raise it with the Tk team: https://core.tcl-lang.org/tk/reportlist ---------- nosy: +epaine, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 11:31:05 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Nov 2021 16:31:05 +0000 Subject: [issue45650] cgitb does not emit CGI headers when format='text' In-Reply-To: <1635439639.23.0.69927337911.issue45650@roundup.psfhosted.org> Message-ID: <1636907465.87.0.889532850655.issue45650@roundup.psfhosted.org> Eric V. Smith added the comment: I would think the use case for 'text' is to not print the output to a web page, so you wouldn't want the headers. The documentation says that cgitb was generalized to not only produce output for web pages. The 'text' format provides this generalization. Changing to an enhancement request for 3.11. We can't change the 'text' format because it would break existing code. so this is really an enhancement request for a new format. But I don't see what the use case would be, so I don't think it would be accepted. What's the case where you need this functionality? How is the 'html' format unacceptable? ---------- nosy: +eric.smith type: behavior -> 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 Sun Nov 14 12:05:16 2021 From: report at bugs.python.org (Hai Shi) Date: Sun, 14 Nov 2021 17:05:16 +0000 Subject: [issue44532] multi subinterpreters use _PyStructSequence_InitType failed. In-Reply-To: <1624949622.19.0.942644638958.issue44532@roundup.psfhosted.org> Message-ID: <1636909516.41.0.960964232264.issue44532@roundup.psfhosted.org> Hai Shi added the comment: OK,thanks. If it's just only interal calling, I don't think throwing a exception would break anything. As your pasted code shows, the modules have judeged the tp_name is inited or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 12:23:34 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Nov 2021 17:23:34 +0000 Subject: [issue45742] python -h can't find -R option In-Reply-To: <1636254601.16.0.481358926268.issue45742@roundup.psfhosted.org> Message-ID: <1636910614.39.0.293411566298.issue45742@roundup.psfhosted.org> Terry J. Reedy added the comment: If you two agree on an exact wording, I can make the PR and backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 12:40:25 2021 From: report at bugs.python.org (Roger Serwy) Date: Sun, 14 Nov 2021 17:40:25 +0000 Subject: [issue45804] IDLE - faster shell writing In-Reply-To: <1636858081.72.0.88336234035.issue45804@roundup.psfhosted.org> Message-ID: <1636911625.9.0.412598043067.issue45804@roundup.psfhosted.org> Roger Serwy added the comment: All good questions, Terry! I do have a git clone of the cpython repo, but I haven't worked through the new commit/patch process since Mercurial. I'm a bit rusty. The buffering provided is for calls to `write`. It does not do any line buffering. Calls to `isatty` will behave the same. The negative side effect is that the subprocess will proceed as if writes have been committed to the PyShell window, so any pending transfers can be lost if the subprocess terminates unexpectedly. I used a separate OS thread to handle the transfer of the writes rather than using the Tcl/Tk event loop. The Tcl/Tk loop runs on the main thread, so any long-running processes will prevent a `.after` callback function from being called. The base class was not changed. I haven't followed all the changes to the stream class (and its implications) since 3.5, so the code subclasses the newer `StdOutputFile` class to minimize disruption. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 12:41:01 2021 From: report at bugs.python.org (David Bolen) Date: Sun, 14 Nov 2021 17:41:01 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636911661.22.0.892934406902.issue30570@roundup.psfhosted.org> David Bolen added the comment: I don't know if this is a buildbot, test or 3.9-specific issue but this commit appears to have introduced a permanent initial failure (but success on retry) in test_pickle on both Windows 10 3.9 builders. First failure for my builder at https://buildbot.python.org/all/#/builders/425/builds/450 Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow. 0:14:47 load avg: 4.57 Re-running failed tests in verbose mode 0:14:47 load avg: 4.57 Re-running test_pickle in verbose mode The 3.x and 3.10 builders seem fine, and the second try on 3.9 always seems to succeed (perhaps because it's just a single test running at that point), so this is only being reported as a buildbot warning. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:39:21 2021 From: report at bugs.python.org (Matthias Bussonnier) Date: Sun, 14 Nov 2021 18:39:21 +0000 Subject: [issue45738] 3.11 exec raises SystemError instead of SyntaxError on char after line continuation In-Reply-To: <1636204252.01.0.178939354477.issue45738@roundup.psfhosted.org> Message-ID: <1636915161.63.0.987590371225.issue45738@roundup.psfhosted.org> Matthias Bussonnier added the comment: Works for me as well. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:40:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 14 Nov 2021 18:40:48 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636915248.4.0.227520572251.issue45573@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27807 pull_request: https://github.com/python/cpython/pull/29559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 13:56:00 2021 From: report at bugs.python.org (David Bolen) Date: Sun, 14 Nov 2021 18:56:00 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636916160.51.0.867145790807.issue30570@roundup.psfhosted.org> David Bolen added the comment: So I'm guessing something is just borderline under 3.9 on Windows. In some manual testing with a standalone build of 3.9 so far for me: -m test.test_pickle always succeeds (executed directly) -m test test_pickle always fails (executed via test module) -m test -w -j1 test_pickle fails, but succeeds on retry The failures seem to always occur in CPicklerTests.test_bad_getattr. I'm not sure how to run that single test via the test module, but limiting to all CPicklerTests tests or all test_bad_getattr tests succeeds even through the test module. The last scenario above (successful retry) has to use -j or else no retry (-w) takes place. That's the path the buildbots are following. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 14:55:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 14 Nov 2021 19:55:24 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1636919724.4.0.316965631433.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: New changeset c3997865f24d9491318b401ae8e46d27332aca25 by Christian Heimes in branch 'main': bpo-45573: Use Makefile's dependencies in setup.py (GH-29559) https://github.com/python/cpython/commit/c3997865f24d9491318b401ae8e46d27332aca25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 15:12:24 2021 From: report at bugs.python.org (Szymon) Date: Sun, 14 Nov 2021 20:12:24 +0000 Subject: [issue44743] asyncio DatagramProtocol stops calling callbacks after OSError In-Reply-To: <1627311058.63.0.328526216812.issue44743@roundup.psfhosted.org> Message-ID: <1636920744.3.0.549752397851.issue44743@roundup.psfhosted.org> Szymon added the comment: I'm experiencing the same exact issue. The bug manifests with all combinations: SelectorEventLoop and ProactorEventLoop, python 3.9 and 3.10, on Windows 10. Python 3.8 on Linux seems to not be affected. Can we get a fix or at least an update? ---------- nosy: +sim1234 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 15:14:10 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Nov 2021 20:14:10 +0000 Subject: [issue45650] cgitb does not emit CGI headers when format='text' In-Reply-To: <1635439639.23.0.69927337911.issue45650@roundup.psfhosted.org> Message-ID: <1636920850.36.0.765301773084.issue45650@roundup.psfhosted.org> Change by Eric V. Smith : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 15:42:43 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 14 Nov 2021 20:42:43 +0000 Subject: [issue45752] copy module doc wrongly says it doesn't copy arrays In-Reply-To: <1636390392.43.0.38708438512.issue45752@roundup.psfhosted.org> Message-ID: <1636922563.39.0.882170822641.issue45752@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 20:02:09 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Nov 2021 01:02:09 +0000 Subject: [issue25625] "chdir" Contex manager for pathlib In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za> Message-ID: <1636938129.16.0.2239985678.issue25625@roundup.psfhosted.org> ?ric Araujo added the comment: There is renewed discussion on python-dev about placing this in contextlib. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 20:04:17 2021 From: report at bugs.python.org (=?utf-8?q?Filipe_La=C3=ADns?=) Date: Mon, 15 Nov 2021 01:04:17 +0000 Subject: [issue25625] "chdir" Contex manager for pathlib In-Reply-To: <1447523143.32.0.921942004004.issue25625@psf.upfronthosting.co.za> Message-ID: <1636938257.24.0.534486409461.issue25625@roundup.psfhosted.org> Filipe La?ns added the comment: Can you share the link? I haven't seen anything recent. Is it under other thread? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 20:41:48 2021 From: report at bugs.python.org (Cameron Simpson) Date: Mon, 15 Nov 2021 01:41:48 +0000 Subject: [issue25625] "chdir" Contex manager for pathlib In-Reply-To: <1636938257.24.0.534486409461.issue25625@roundup.psfhosted.org> Message-ID: Cameron Simpson added the comment: On 15Nov2021 01:04, Python Bug Reports wrote: >Can you share the link? I haven't seen anything recent. Is it under >other thread? It's in the discuss-ideas part of discuss.python.org during a discussions about a possible new context manager to atomically prepare a filename. Latest comment: https://discuss.python.org/t/adding-atomicwrite-in-stdlib/11899/15 and I'm with Inada-san here: I think shutil is a better fit for both the chdir context manager and the thing under discussion. They're both "high level shell-like things" to my mind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 21:40:18 2021 From: report at bugs.python.org (Carey) Date: Mon, 15 Nov 2021 02:40:18 +0000 Subject: [issue26175] Fully implement IOBase abstract on SpooledTemporaryFile In-Reply-To: <1453413274.25.0.536987988375.issue26175@psf.upfronthosting.co.za> Message-ID: <1636944018.36.0.961699497165.issue26175@roundup.psfhosted.org> Change by Carey : ---------- nosy: +pR0Ps nosy_count: 6.0 -> 7.0 pull_requests: +27808 pull_request: https://github.com/python/cpython/pull/29560 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 21:57:40 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 15 Nov 2021 02:57:40 +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: <1636945060.06.0.558699921751.issue15500@roundup.psfhosted.org> Eryk Sun added the comment: Zackery, here's an initial draft implementation for Windows 10+ that's based on the interface you created in PR 14578. It calls WinAPI SetThreadDescription(), which sets the thread's name directly in the kernel thread object (i.e. ETHREAD.ThreadName). This function was added to the API in Windows 10 version 1607 (10.0.14393), so Windows 8.1 systems and older Windows 10 systems aren't supported. I'd rather not implement the exception-based approach for older Windows systems. It doesn't really name the thread and only works when a debugger is attached to the process. This initial draft blindly assumes that the filesystem encoding is UTF-8. That's been the case in Windows since Python 3.6, unless configured to use the legacy ANSI encoding, e.g. by setting PYTHONLEGACYWINDOWSFSENCODING. PyThread_set_thread_name() could be changed to use CP_ACP instead of CP_UTF8 when legacy mode is enabled. I set the truncation limit to 64 characters. It could be lowered to 15 to match what you implemented for POSIX, but I think that's too short. The limit could also effectively be removed by truncating to the system limit of 32766 characters. That would be simpler since the code wouldn't have to worry about surrogate pairs. Python/thread_nt.h: typedef HRESULT (WINAPI *PF_SET_THREAD_DESCRIPTION)(HANDLE, PCWSTR); static PF_SET_THREAD_DESCRIPTION pSetThreadDescription = NULL; static void PyThread__init_thread(void) { // Initialize pSetThreadDescription. // Minimum supported Windows version: 10.0.14393 (1607) int i = 0; LPCWSTR module_names[2] = { L"api-ms-win-core-processthreads-l1-1-3", // i.e. kernel32 L"kernelbase", }; // Most "ms-win-core" API sets (except for COM/WinRT) are implemented // by modules that are always loaded, including ntdll, kernelbase, and // kernel32, so it's safe to use GetModuleHandleW(). do { pSetThreadDescription = (PF_SET_THREAD_DESCRIPTION)GetProcAddress( GetModuleHandleW(module_names[i]), "SetThreadDescription"); } while (pSetThreadDescription == NULL && ++i < Py_ARRAY_LENGTH(module_names)); } int PyThread_set_thread_name(const char *name) { HRESULT hr = 0; wchar_t *wname = NULL; if (!initialized) { PyThread_init_thread(); } if (name == NULL || *name == '\0') { hr = E_INVALIDARG; goto exit; } if (pSetThreadDescription == NULL) { hr = E_NOTIMPL; goto exit; } // cch includes the terminating null character. int cch = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0); if (cch > 0) { wname = PyMem_RawMalloc(cch * sizeof(wchar_t)); if (wname == NULL) { hr = E_OUTOFMEMORY; goto exit; } cch = MultiByteToWideChar(CP_UTF8, 0, name, -1, wname, cch); } if (cch == 0) { hr = HRESULT_FROM_WIN32(GetLastError()); goto exit; } // Truncate the name to 64 characters, accounting for surrogate pairs. // The OS limit is 32766 wide characters, but long names aren't of // practical use. int i = 0; for (int len = 0; i < (cch - 1) && len < 64; i++, len++) { if (i < (cch - 2) && IS_SURROGATE_PAIR(wname[i], wname[i + 1])) { i++; // Skip the trailing surrogate. } } wname[i] = L'\0'; hr = pSetThreadDescription(GetCurrentThread(), wname); exit: if (wname != NULL) { PyMem_RawFree(wname); } if (FAILED(hr)) { return (int)hr; } return 0; } Modules/_threadmodule.c: static PyObject * _thread__set_thread_name_impl(PyObject *module, PyObject *name) { int error = PyThread_set_thread_name(PyBytes_AS_STRING(name)); #ifdef MS_WINDOWS // For Python code, ignore a not-implemented error, which means // it's a Windows 8.1 system or older Windows 10 system. if (error == (int)E_NOTIMPL) { error = 0; } #endif if (error) { Py_DECREF(name); PyErr_SetString(ThreadError, "setting the thread name failed"); return NULL; } Py_DECREF(name); Py_RETURN_NONE; } ---------- nosy: +eryksun versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 23:27:27 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Mon, 15 Nov 2021 04:27:27 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1636950447.1.0.607446215499.issue37295@roundup.psfhosted.org> Stefan Pochmann added the comment: I wrote a Python solution ("mycomb") that computes comb(100_000, 50_000) faster, maybe of interest: 1510.4 ms math.comb(n, k) 460.8 ms factorial(n) // (factorial(k) * factorial(n-k)) 27.5 ms mycomb(n, k) 6.7 ms *estimation* for mycomb if written in C The idea: 13 * 12 * 11 * 10 * 9 * 8 comb(13, 6) = ------------------------- = 13 * 1 * 11 * 1 * 3 * 4 1 * 2 * 3 * 4 * 5 * 6 It lists the numerator factors, then divides the denominator factors out of them (using primes), then just multiplies. Preparing the factors for the final multiplication took most of the time, about 23.1 ms. That part only needs numbers <= n, so it could be done with C ints and be much faster. If it's ten times faster, then mycomb in C would take 23.1/10 + (27.5-23.1) = 6.71 ms. See the comb_with_primes.py file. ---------- nosy: +Stefan Pochmann Added file: https://bugs.python.org/file50439/comb_with_primes.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 14 23:56:20 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Mon, 15 Nov 2021 04:56:20 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1636952180.87.0.787468443756.issue37295@roundup.psfhosted.org> Stefan Pochmann added the comment: And for Raymond's case 4), about running very long and not responding to SIGINT, with n=1_000_000 and k=500_000: 150.91 seconds math.comb(n, k) 39.11 seconds factorial(n) // (factorial(k) * factorial(n-k)) 0.40 seconds mycomb(n, k) 0.14 seconds *estimation* for mycomb if written in C And for n=10_000_000 and k=5_000_000: ~4 hours *estimation* for math.comb(n, k) ~1 hour *estimation* for factorials solution 8.3 seconds mycomb(n, k) 4.5 seconds *estimation* for mycomb if written in C ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 00:40:28 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 15 Nov 2021 05:40:28 +0000 Subject: [issue45806] Cannot Recover From StackOverflow in 3.9 Tests Message-ID: <1636954828.71.0.201093900258.issue45806@roundup.psfhosted.org> New submission from Dennis Sweeney : In bpo-30570, David Bolen noticed that "py -3.9 -m test test_pickle" consistently crashes on Windows (even though other methods of running that test do not crash, and the test succeeds when failed tests are retried). Curiously, it seems that adding using support.infinite_recursion *introduced* the crash rather than preventing it. I'm guessing this would have been fixed by GH-24501, but that fix was rolled back in GH-25179 for the sake of 3.9 ABI compatibility. As of now, 3.9's pycore_ceval.c reads: static inline int _Py_RecursionLimitLowerWaterMark(int limit) { if (limit > 200) { return (limit - 50); } else { return (3 * (limit >> 2)); } } But support.infinite_recursion(max_depth=75) has a default 75, leaving a "low-water-mark" of 54, which the recursion apparently never recovers back to in the right way. A couple of solutions could fix this: (1) Remove the usage of support.infinite_recursion at the test.pickletester.AbstractPickleTests.test_bad_getattr call site. (2) Use a different value max_depth. On my machine at least, it seems 75 was a "perfect storm" to cause this issue. Using infinite_recursion(60) or 61 or ... or 74 or 76 or 77 or 78 all pass, but infinite_recursion(75) in particular fails. (3) Use fewer calls after the overflow by inlining something like assertRaises: with support.infinite_recursion(): - self.assertRaises(RuntimeError, self.dumps, x, proto) + try: + self.dumps(x, proto) + except RuntimeError: + pass + else: + self.fail("RuntimeError not raised") (5) Re-visit an ABI-compliant version of GH-24501, such as GH-25160 The output I keep getting without any changes: > py -3.9 -m test test_pickle -v ... test_attribute_name_interning (test.test_pickle.CPicklerTests) ... ok test_bad_getattr (test.test_pickle.CPicklerTests) ... Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow.Python runtime state: initialized Current thread 0x000028b0 (most recent call first): File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\pickletester.py", line 3300 in __getattr__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\pickletester.py", line 3300 in __getattr__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\pickletester.py", line 3300 in __getattr__ ... File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\pickletester.py", line 3300 in __getattr__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\pickletester.py", line 3300 in __getattr__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\pickletester.py", line 3300 in __getattr__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\copyreg.py", line 74 in _reduce_ex File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\test_pickle.py", line 65 in dumps File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\case.py", line 201 in handle File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\case.py", line 739 in assertRaises File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\pickletester.py", line 2381 in test_bad_getattr File "C:\Users\sween\Source\Repos\cpython2\39\lib\test\support\__init__.py", line 1770 in wrapper File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\case.py", line 550 in _callTestMethod File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\case.py", line 592 in run File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\case.py", line 651 in __call__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\suite.py", line 122 in run File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\suite.py", line 84 in __call__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\suite.py", line 122 in run File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\suite.py", line 84 in __call__ File "C:\Users\sween\Source\Repos\cpython2\39\lib\unittest\suite.py", line 122 in run ---------- components: Tests messages: 406339 nosy: Dennis Sweeney, Mark.Shannon, lukasz.langa priority: normal severity: normal status: open title: Cannot Recover From StackOverflow in 3.9 Tests type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 00:42:14 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 15 Nov 2021 05:42:14 +0000 Subject: [issue30570] issubclass segfaults on objects with weird __getattr__ In-Reply-To: <1496622334.44.0.71686890535.issue30570@psf.upfronthosting.co.za> Message-ID: <1636954934.84.0.942448471988.issue30570@roundup.psfhosted.org> Dennis Sweeney added the comment: Since this isn't quite related to the original issue, I opened bpo-45806 to discuss. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 00:45:24 2021 From: report at bugs.python.org (David Bolen) Date: Mon, 15 Nov 2021 05:45:24 +0000 Subject: [issue45806] Cannot Recover From StackOverflow in 3.9 Tests In-Reply-To: <1636954828.71.0.201093900258.issue45806@roundup.psfhosted.org> Message-ID: <1636955124.63.0.428863239735.issue45806@roundup.psfhosted.org> Change by David Bolen : ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 01:31:45 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Mon, 15 Nov 2021 06:31:45 +0000 Subject: [issue37295] Possible optimizations for math.comb() In-Reply-To: <1560626260.31.0.393863097125.issue37295@roundup.psfhosted.org> Message-ID: <1636957905.14.0.983462022187.issue37295@roundup.psfhosted.org> Stefan Pochmann added the comment: Turns out for n=100_000, k=50_000, about 87% of my factors are 1, so they don't even need to be turned into Python ints for multiplication, improving the multiplication part to 3.05 ms. And a C++ version to produce the factors took 0.85 ms. Updated estimation: 1510.4 ms math.comb(n, k) 460.8 ms factorial(n) // (factorial(k) * factorial(n-k)) 3.9 ms *estimation* for mycomb if written in C ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 02:51:17 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 15 Nov 2021 07:51:17 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636962677.64.0.976821358098.issue45512@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset b567b9d74bd9e476a3027335873bb0508d6e450f by Erlend Egeberg Aasland in branch 'main': bpo-45512: Simplify isolation_level handling in `sqlite3` (GH-29053) https://github.com/python/cpython/commit/b567b9d74bd9e476a3027335873bb0508d6e450f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 02:54:56 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Mon, 15 Nov 2021 07:54:56 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1636962896.35.0.298441061317.issue45476@roundup.psfhosted.org> Oleg Iarygin added the comment: Marc-Andre: > Inlining is something that is completely under the control of the used compilers. Compilers are free to not inline function marked for inlining [...] I checked the following C snippet on gcc.godbolt.org using GCC 4.1.2 and Clang 3.0.0 with /-O0/-O1/-Os, and both compilers inline a function marked as static inline: static inline int foo(int a) { return a * 2; } int bar(int a) { return foo(a) < 0; } So even with -O0, GCC from 2007 and Clang from 2011 perform inlining. Though, old versions of CLang leave a dangling original copy of foo for some reason. I hope a linker removes it later. As for other compilers, I believe that if somebody specifies -O0, that person has a sound reason to do so (like per-line debugging, building precise flame graphs, or other specific scenario where execution performance does not matter), so inlining interferes here anyway. ---------- nosy: +arhadthedev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 03:44:42 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 15 Nov 2021 08:44:42 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636965882.76.0.758695962316.issue45512@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 04:22:59 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 15 Nov 2021 09:22:59 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1636962896.35.0.298441061317.issue45476@roundup.psfhosted.org> Message-ID: <6688383a-5bfc-8976-95f5-21f59589918a@egenix.com> Marc-Andre Lemburg added the comment: On 15.11.2021 08:54, Oleg Iarygin wrote: > > Oleg Iarygin added the comment: > > Marc-Andre: >> Inlining is something that is completely under the control of the > used compilers. Compilers are free to not inline function marked for > inlining [...] > > I checked the following C snippet on gcc.godbolt.org using GCC 4.1.2 and Clang 3.0.0 with /-O0/-O1/-Os, and both compilers inline a function marked as static inline: > > static inline int foo(int a) > { > return a * 2; > } > > int bar(int a) > { > return foo(a) < 0; > } > > So even with -O0, GCC from 2007 and Clang from 2011 perform inlining. Though, old versions of CLang leave a dangling original copy of foo for some reason. I hope a linker removes it later. That's a great website :-) Thanks for sharing. However, even with x86-64 gcc 11.2, I get assembler which does not inline foo() without compiler options or with -O0: https://gcc.godbolt.org/z/oh6qnffh7 Only with -O1, the site reports inlining foo(). > As for other compilers, I believe that if somebody specifies -O0, that person has a sound reason to do so (like per-line debugging, building precise flame graphs, or other specific scenario where execution performance does not matter), so inlining interferes here anyway. Sure, but my point was a different one: even with higher optimization levels, the compiler can decide whether or not to inline. We expect the compiler to inline, but cannot be sure. With macros the compiler has no choice and we are in control and even when using -O0, you will still want e.g. Py_INCREF() and Py_DECREF() inlined. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 04:35:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Nov 2021 09:35:37 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1636968937.24.0.490993268185.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PEP 670 "Convert macros to functions in the Python C API" for this issue: https://www.python.org/dev/peps/pep-0670/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 04:53:53 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 15 Nov 2021 09:53:53 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636970033.61.0.628310055702.issue45512@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27809 pull_request: https://github.com/python/cpython/pull/29561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 04:54:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Nov 2021 09:54:49 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1636970089.22.0.507206436544.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: I don't understand what you are trying to prove about compilers not inlining when you explicitly ask them... not to inline. The purpose of the -O0 option is to minimize the build time, with a trade-off: don't expect the built executable to be fast. If you care about Python performance... well, don't use -O0? Python ./configure --with-pydebug builds Python with -Og which is not -O0. The -Og level is special, it's a different trade-off between the compiler build time and Python runtime performance. If you want a Python debug build (Py_DEBUG macro defined, ./configure --with-pydebug), it's perfectly fine to build it with -O2 or -O3 to make sure that static inline functions are inlined. You can also enable LTO and PGO on a debug build. GCC -Og option: """ -Og Optimize debugging experience. -Og should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. It is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0. Like -O0, -Og completely disables a number of optimization passes so that individual options controlling them have no effect. Otherwise -Og enables all -O1 optimization flags except for those that may interfere with debugging: -fbranch-count-reg -fdelayed-branch -fdse -fif-conversion -fif-conversion2 -finline-functions-called-once -fmove-loop-invariants -fmove-loop-stores -fssa-phiopt -ftree-bit-ccp -ftree-dse -ftree-pta -ftree-sra """ https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html I prefer to use gcc -O0 when I develop on Python because the build time matters a lot in my very specific use case, and gcc -O0 is the best to debug Python in a debugger. See my article: https://developers.redhat.com/articles/2021/09/08/debugging-python-c-extensions-gdb On RHEL8, the Python 3.9 debug build is now built with -O0 to be fully usable in gdb (to debug C extensions). In RHEL, the main motivation to use -O0 rather than -Og was to get a fully working gdb debugger on C extensions. With -Og, we get too many values which are blocking debugging :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 05:09:37 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 15 Nov 2021 10:09:37 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636970977.46.0.502029732323.issue45512@roundup.psfhosted.org> Erlend E. Aasland added the comment: Need to amend GH-29053, so I'm opening until the fix is merged. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 05:46:54 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 15 Nov 2021 10:46:54 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1636970089.22.0.507206436544.issue45476@roundup.psfhosted.org> Message-ID: <7908ce41-ad38-10f8-4f0c-07f6cdc6cd9b@egenix.com> Marc-Andre Lemburg added the comment: On 15.11.2021 10:54, STINNER Victor wrote: > > I don't understand what you are trying to prove about compilers not inlining when you explicitly ask them... not to inline. I'm not trying to prove anything, Victor. I'm only stating the fact that by switching from macros to inline functions we are giving away control to the compilers and should not be surprised that Python now suddenly runs a lot slower on systems which either have inlining optimizations switched off or where the compiler (wrongly) assumes that creating more assembler would result in slower code. I've heard all your arguments against macros, but don't believe the blanket approach to convert to inline functions is warranted in all cases, in particular not for code which is private to the interpreter and where we know that we need the code inlined to not result in unexpected performance regressions. I also don't believe that we should assume that Python C extension authors will unintentionally misuse Python API macros. If they do, it's their business to sort out any issues, not ours. If we document that macros may not be used as l-values, that's clear enough. We don't need to use compiler restrictions to impose such limitations. IMO, conversion to inline functions should only happen, when a) the core language implementation has a direct benefit, and b) it is very unlikely that compilers will not inline the code with -O2 settings, e.g. perhaps using a threshold of LOCs or by testing with the website Oleg mentioned. Overall, I think the PEP 670 should get some more attentions from the SC to have a guideline to use as basis for deciding whether or not to use the static inline function approach. That way we could avoid these discussions :-) BTW: Thanks for the details about -O0 vs. -Og. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 06:57:58 2021 From: report at bugs.python.org (Muhammad Farhan) Date: Mon, 15 Nov 2021 11:57:58 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1636977478.7.0.5642748184.issue45795@roundup.psfhosted.org> Muhammad Farhan added the comment: Is any one going to respond? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 07:55:42 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 15 Nov 2021 12:55:42 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636980942.14.0.528637775043.issue45512@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 822c3dcce3996e411c1ff5c432c6ac7d2845cfd6 by Erlend Egeberg Aasland in branch 'main': bpo-45512: Raise exception if sqlite3.Connection.__init__ is called with bad isolation level (#29561) https://github.com/python/cpython/commit/822c3dcce3996e411c1ff5c432c6ac7d2845cfd6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 08:11:00 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 15 Nov 2021 13:11:00 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1636981860.48.0.668755529722.issue45512@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +27810 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/29562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 09:41:01 2021 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 15 Nov 2021 14:41:01 +0000 Subject: [issue45807] Strange SyntaxError message / suggestions for "@x = 123" Message-ID: <1636987261.75.0.479908594511.issue45807@roundup.psfhosted.org> New submission from Pierre Quentel : In CPython 3.10 : Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> @x = 123 File "", line 1 @x = 123 ^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? but both suggestions lead to a SyntaxError : >>> @x == 123 ... File "", line 2 ^ SyntaxError: invalid syntax >>> @x := 123 ... File "", line 2 ^ SyntaxError: invalid syntax >>> Maybe an error message such as "cannot assign to decorator" would be more appropriate ? ---------- components: Parser messages: 406351 nosy: lys.nikolaou, pablogsal, quentel priority: normal severity: normal status: open title: Strange SyntaxError message / suggestions for "@x = 123" type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 09:46:25 2021 From: report at bugs.python.org (Evan) Date: Mon, 15 Nov 2021 14:46:25 +0000 Subject: [issue45807] Strange SyntaxError message / suggestions for "@x = 123" In-Reply-To: <1636987261.75.0.479908594511.issue45807@roundup.psfhosted.org> Message-ID: <1636987585.15.0.722304995879.issue45807@roundup.psfhosted.org> Change by Evan : ---------- nosy: +schmave _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 10:41:05 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Nov 2021 15:41:05 +0000 Subject: [issue45808] configure check for HAVE_CRYPT_R is wrong Message-ID: <1636990865.28.0.153956179368.issue45808@roundup.psfhosted.org> New submission from Christian Heimes : The configure check for HAVE_CRYPT_R assumes that all platforms have . Some platforms like FreeBSD don't have at all. Instead the crypt_r() prototype is defined in . ---------- messages: 406352 nosy: christian.heimes priority: normal severity: normal status: open title: configure check for HAVE_CRYPT_R is wrong type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 10:50:13 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Nov 2021 15:50:13 +0000 Subject: [issue45808] configure check for HAVE_CRYPT_R is wrong In-Reply-To: <1636990865.28.0.153956179368.issue45808@roundup.psfhosted.org> Message-ID: <1636991413.95.0.931246721448.issue45808@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27811 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 10:52:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Nov 2021 15:52:50 +0000 Subject: [issue45808] configure check for HAVE_CRYPT_R is wrong In-Reply-To: <1636990865.28.0.153956179368.issue45808@roundup.psfhosted.org> Message-ID: <1636991570.24.0.960667354403.issue45808@roundup.psfhosted.org> Christian Heimes added the comment: https://www.freebsd.org/cgi/man.cgi?crypt(3) LIBRARY Crypt Library (libcrypt, -lcrypt) SYNOPSIS #include char * crypt(const char *key, const char *salt); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 11:57:08 2021 From: report at bugs.python.org (Brandt Bucher) Date: Mon, 15 Nov 2021 16:57:08 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1636995428.24.0.255994967295.issue45116@roundup.psfhosted.org> Brandt Bucher added the comment: The total size of the main interpreter loop was recently reduced somewhat by an unrelated change: https://github.com/python/cpython/commit/9178f533ff5ea7462a2ca22cfa67afd78dad433b I wonder if this issue still exists? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 11:58:31 2021 From: report at bugs.python.org (Brandt Bucher) Date: Mon, 15 Nov 2021 16:58:31 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1636995511.84.0.367284411662.issue45636@roundup.psfhosted.org> Brandt Bucher added the comment: New changeset ec382fac0db6d9159c2d3496a70b7a605545957e by Brandt Bucher in branch 'main': bpo-45636: Remove the old %-formatting fast-path (GH-29532) https://github.com/python/cpython/commit/ec382fac0db6d9159c2d3496a70b7a605545957e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 12:40:17 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Nov 2021 17:40:17 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1636998017.36.0.172402665514.issue45220@roundup.psfhosted.org> Steve Dower added the comment: New changeset 32d14b262d6d914f63485f8d6e7859df58cd2089 by Miss Islington (bot) in branch '3.9': bpo-45220: Ensure RT_MANIFEST is defined when compiling Windows resource files (GH-29501) https://github.com/python/cpython/commit/32d14b262d6d914f63485f8d6e7859df58cd2089 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 14:02:38 2021 From: report at bugs.python.org (Sam Gross) Date: Mon, 15 Nov 2021 19:02:38 +0000 Subject: [issue45809] Race condition in WeakKeyDictionary/WeakKeyDictionary Message-ID: <1637002958.39.0.243945007085.issue45809@roundup.psfhosted.org> New submission from Sam Gross : The issue described issue7105 (and maybe issue7060) still exists due to a race condition in WeakKeyDictionary. This shows up as test failure that looks like: test test_weakref failed -- Traceback (most recent call last): File "Lib/test/test_weakref.py", line 1960, in test_threaded_weak_value_dict_deepcopy self.check_threaded_weak_dict_copy(weakref.WeakValueDictionary, True) File "Lib/test/test_weakref.py", line 1940, in check_threaded_weak_dict_copy raise exc[0] File "Lib/test/test_weakref.py", line 1897, in dict_copy _ = copy.deepcopy(d) File "Lib/copy.py", line 153, in deepcopy y = copier(memo) File "Lib/weakref.py", line 189, in __deepcopy__ for key, wr in self.data.items(): RuntimeError: dictionary changed size during iteration The cause is that the check of "self._iterating" and the call to "_atomic_removal" are not performed atomically together. By the time _atomic_removal() is called, an iteration might have already started. https://github.com/python/cpython/blob/ec382fac0db6d9159c2d3496a70b7a605545957e/Lib/weakref.py#L109-L114 ---------- components: Library (Lib) messages: 406357 nosy: colesbury priority: normal severity: normal status: open title: Race condition in WeakKeyDictionary/WeakKeyDictionary type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 14:05:22 2021 From: report at bugs.python.org (Sam Gross) Date: Mon, 15 Nov 2021 19:05:22 +0000 Subject: [issue45809] Race condition in WeakKeyDictionary/WeakKeyDictionary In-Reply-To: <1637002958.39.0.243945007085.issue45809@roundup.psfhosted.org> Message-ID: <1637003122.67.0.191523609983.issue45809@roundup.psfhosted.org> Sam Gross added the comment: The attached patch (issue45809-repro.patch) introduces artificial delays to make reproduction of the underlying issue easier. To reproduce the issue: patch -p1 < issue45809-repro.patch ./python -m test test_weakref -m test_threaded_weak_value_dict_deepcopy -v ---------- keywords: +patch Added file: https://bugs.python.org/file50440/issue45809-repro.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:11:44 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Nov 2021 20:11:44 +0000 Subject: [issue45220] Windows builds sometimes fail on Azure and GitHub Action: fatal error RC1116: RC terminating after preprocessor errors In-Reply-To: <1631803516.52.0.769978805951.issue45220@roundup.psfhosted.org> Message-ID: <1637007104.37.0.763493180079.issue45220@roundup.psfhosted.org> Steve Dower added the comment: > instead of manually defining RT_MANIFEST, try including "winresrc.h" in the resource definition files I just wish it were documented... we can keep it in mind if another one of these pops up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:23:05 2021 From: report at bugs.python.org (Andre Roberge) Date: Mon, 15 Nov 2021 20:23:05 +0000 Subject: [issue45807] Strange SyntaxError message / suggestions for "@x = 123" In-Reply-To: <1636987261.75.0.479908594511.issue45807@roundup.psfhosted.org> Message-ID: <1637007785.1.0.738363023633.issue45807@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:33:05 2021 From: report at bugs.python.org (Sam Gross) Date: Mon, 15 Nov 2021 20:33:05 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637008385.17.0.800687891815.issue42540@roundup.psfhosted.org> Change by Sam Gross : ---------- keywords: +patch nosy: +colesbury nosy_count: 2.0 -> 3.0 pull_requests: +27812 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 15:41:34 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 15 Nov 2021 20:41:34 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1637008894.45.0.466476117392.issue45476@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 16:38:55 2021 From: report at bugs.python.org (Brandt Bucher) Date: Mon, 15 Nov 2021 21:38:55 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1637012335.85.0.424359159129.issue45636@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +27813 pull_request: https://github.com/python/cpython/pull/29565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 16:41:52 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 15 Nov 2021 21:41:52 +0000 Subject: [issue43526] Programmatic management of BytesWarning doesn't work for native triggers. In-Reply-To: <1615971785.71.0.488992120219.issue43526@roundup.psfhosted.org> Message-ID: <1637012512.03.0.933350444227.issue43526@roundup.psfhosted.org> Gregory P. Smith added the comment: fwiw, at work we modified our interpreter to treat PYTHONBYTESWARNING=1 or 2 as if -b or -bb were passed. All of our tests run by default with a PYTHONBYTESWARNING=2 in their environment. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 16:54:06 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 15 Nov 2021 21:54:06 +0000 Subject: [issue43526] Programmatic management of BytesWarning doesn't work for native triggers. In-Reply-To: <1615971785.71.0.488992120219.issue43526@roundup.psfhosted.org> Message-ID: <1637013246.87.0.822002535975.issue43526@roundup.psfhosted.org> Gregory P. Smith added the comment: clarification after poking around: s/all/a lot/ - YouTube used it to help their Python 3 migration. Regardless, the env. var has been useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:22:50 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 15 Nov 2021 22:22:50 +0000 Subject: [issue45677] [doc] improve sqlite3 docs In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org> Message-ID: <1637014970.82.0.61130629524.issue45677@roundup.psfhosted.org> Carol Willing added the comment: New changeset 6c5a312fb6d92e879bf4c570b94e18bb9ffe5970 by Erlend Egeberg Aasland in branch 'main': bpo-45677: Reword first section of `sqlite3` docs (#29326) https://github.com/python/cpython/commit/6c5a312fb6d92e879bf4c570b94e18bb9ffe5970 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:23:01 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Nov 2021 22:23:01 +0000 Subject: [issue45677] [doc] improve sqlite3 docs In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org> Message-ID: <1637014981.7.0.48530500816.issue45677@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +27814 pull_request: https://github.com/python/cpython/pull/29566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:23:07 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Nov 2021 22:23:07 +0000 Subject: [issue45677] [doc] improve sqlite3 docs In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org> Message-ID: <1637014987.1.0.0471684158681.issue45677@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27815 pull_request: https://github.com/python/cpython/pull/29567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:28:59 2021 From: report at bugs.python.org (Sam Gross) Date: Mon, 15 Nov 2021 22:28:59 +0000 Subject: [issue42969] pthread_exit & PyThread_exit_thread from PyEval_RestoreThread etc. are harmful In-Reply-To: <1611084946.55.0.234619663171.issue42969@roundup.psfhosted.org> Message-ID: <1637015339.12.0.423768637375.issue42969@roundup.psfhosted.org> Sam Gross added the comment: The `pthread_exit` behavior has been a problem for PyTorch and related libraries since Python 3.9. The PyTorch team has tried working around the problems without success (i.e. they keep getting bug reports involving crashes in PyEval_SaveThread/RestoreThread). The hang/paused the thread behavior suggested by jbms and gps seems like the only reliable option. This is also what the Java VM does when returning from native code and the JVM has exited. I believe it's not difficult to hang a thread in a cross-platform way: create a mutex, acquire it in the main thread (before setting PyRuntime._finalizing), never release it. Other threads can acquire that same mutex to block until the application exits. The crashes can occur even without daemon threads if the user presses ctrl-c while _thread_shutdown is running. ---------- nosy: +colesbury _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:39:00 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 15 Nov 2021 22:39:00 +0000 Subject: [issue25381] Update doc of three C exception values. In-Reply-To: <1444637496.5.0.854563191712.issue25381@psf.upfronthosting.co.za> Message-ID: <1637015940.63.0.0418680794601.issue25381@roundup.psfhosted.org> Carol Willing added the comment: New changeset ad43dc0b54994e7e7d06e3d4896ade188b36ee12 by Terry Jan Reedy in branch 'main': bpo-25381: Update explanation of exceptions in C. (GH-26838) https://github.com/python/cpython/commit/ad43dc0b54994e7e7d06e3d4896ade188b36ee12 ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:39:00 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Nov 2021 22:39:00 +0000 Subject: [issue25381] Update doc of three C exception values. In-Reply-To: <1444637496.5.0.854563191712.issue25381@psf.upfronthosting.co.za> Message-ID: <1637015940.94.0.701679773493.issue25381@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 9.0 -> 10.0 pull_requests: +27816 pull_request: https://github.com/python/cpython/pull/29568 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:39:04 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Nov 2021 22:39:04 +0000 Subject: [issue25381] Update doc of three C exception values. In-Reply-To: <1444637496.5.0.854563191712.issue25381@psf.upfronthosting.co.za> Message-ID: <1637015944.91.0.566459730583.issue25381@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27817 pull_request: https://github.com/python/cpython/pull/29569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:44:38 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 15 Nov 2021 22:44:38 +0000 Subject: [issue43225] Add missing value returned by methods on cookiejar In-Reply-To: <1613335573.68.0.765301079654.issue43225@roundup.psfhosted.org> Message-ID: <1637016278.27.0.349090340698.issue43225@roundup.psfhosted.org> Carol Willing added the comment: New changeset 3352834f59531dfa42dbef00ada4fb95ded2ae3a by Emmanuel Arias in branch 'main': bpo-43225: [DOC] Add missing value returned by methods on cookiejar (GH-24522) https://github.com/python/cpython/commit/3352834f59531dfa42dbef00ada4fb95ded2ae3a ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:56:54 2021 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 Nov 2021 22:56:54 +0000 Subject: [issue45806] Cannot Recover From StackOverflow in 3.9 Tests In-Reply-To: <1636954828.71.0.201093900258.issue45806@roundup.psfhosted.org> Message-ID: <1637017014.96.0.703870697918.issue45806@roundup.psfhosted.org> Change by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 17:58:58 2021 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 15 Nov 2021 22:58:58 +0000 Subject: [issue45806] Cannot Recover From StackOverflow in 3.9 Tests In-Reply-To: <1636954828.71.0.201093900258.issue45806@roundup.psfhosted.org> Message-ID: <1637017138.43.0.543513144963.issue45806@roundup.psfhosted.org> Jeremy Kloth added the comment: I'll note that it also fails on first run on the Windows 11 builder: https://buildbot.python.org/all/#/builders/737/builds/65 ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:06:49 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Nov 2021 23:06:49 +0000 Subject: [issue25381] Update doc of three C exception values. In-Reply-To: <1444637496.5.0.854563191712.issue25381@psf.upfronthosting.co.za> Message-ID: <1637017609.34.0.0689234135397.issue25381@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 0320cf1a250b025f2ef25637851384bf8b61d207 by Miss Islington (bot) in branch '3.10': bpo-25381: Update explanation of exceptions in C. (GH-26838) (GH-29568) https://github.com/python/cpython/commit/0320cf1a250b025f2ef25637851384bf8b61d207 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:08:01 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Nov 2021 23:08:01 +0000 Subject: [issue25381] Update doc of three C exception values. In-Reply-To: <1444637496.5.0.854563191712.issue25381@psf.upfronthosting.co.za> Message-ID: <1637017681.83.0.774936997836.issue25381@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b0bdc093c2c15c352c5bede060117790705f5db0 by Miss Islington (bot) in branch '3.9': bpo-25381: Update explanation of exceptions in C. (GH-26838) (GH-29569) https://github.com/python/cpython/commit/b0bdc093c2c15c352c5bede060117790705f5db0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:08:42 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Nov 2021 23:08:42 +0000 Subject: [issue25381] Update doc of three C exception values. In-Reply-To: <1444637496.5.0.854563191712.issue25381@psf.upfronthosting.co.za> Message-ID: <1637017722.72.0.405416796201.issue25381@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 Mon Nov 15 18:11:15 2021 From: report at bugs.python.org (Michael Curran) Date: Mon, 15 Nov 2021 23:11:15 +0000 Subject: [issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer In-Reply-To: <1573232254.38.0.286098798289.issue38748@roundup.psfhosted.org> Message-ID: <1637017875.35.0.389274840007.issue38748@roundup.psfhosted.org> Michael Curran added the comment: As requested, I created a pr which adds a test to show the crash. It is marked as expected failure on 32 bit (x86) and runs successfully as expected on x64. What would be the next steps in moving this issue forward? I don't think I have the knowledge to be able to start on an actual fix for the bug myself, but I and my organization are happy to assist where we can. A little bit of background: The NvDA screen reading software allows blind and vision impaired people across the globe to access the Windows Operating System independently, improving socialization, education and employment outcomes. It is used by around 200,000 people in over 150 countries. The NVDA screen reader is written primarily in Python, and is currently using Python 3.7. We would like to upgrade to a newer Python release, but currently cannot due to this bug. We currently use the x86 build of Python as a small (but significant) number of our users are still on a pure 32-bit build of Windows. Taking into account the fact that are main demographic are people from developing countries, it is not simple for many of our users to upgrade their existing hardware to 64-bit. There will come a time where we will drop x86 support, and just release an x64 build of NVDA, but right now our pure x86 user numbers are still too high. We would love to be able to get our 200,000 users onto a more recent and secure Python version as soon as possible, but we can only do this once this bug is addressed. This bug has now been open for 2 years. If the bug is impossible to fix, or no one is able, then perhaps Python needs to consider dropping support for x86, as currently this build can cause stack corruption, as demonstrated by this issue and the pr tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:11:24 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 15 Nov 2021 23:11:24 +0000 Subject: [issue45810] Prohibit invisible control characters in string literals and comments Message-ID: <1637017884.02.0.311625820684.issue45810@roundup.psfhosted.org> New submission from Steven D'Aprano : Currently invisible control characters aside from whitespace (tabs, newlines, formfeeds, carriage returns) are prohibited outside of comments and string literals. As discussed in this thread: https://mail.python.org/archives/list/python-dev at python.org/message/DN24FK3A2DSO4HBGEDGJXERSAUYK6VK6/ we should ban C0 and C1 control characters (aside from \t\n\f\r) in string literals and comments too. To be clear, the ban is on actual invisible control characters, not escape sequences. ---------- components: Interpreter Core messages: 406370 nosy: serhiy.storchaka, steven.daprano priority: normal severity: normal status: open title: Prohibit invisible control characters in string literals and comments type: security versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:13:25 2021 From: report at bugs.python.org (Michael Curran) Date: Mon, 15 Nov 2021 23:13:25 +0000 Subject: [issue38748] 32 bit ctypes stdcall callback fails to restore stack pointer In-Reply-To: <1573232254.38.0.286098798289.issue38748@roundup.psfhosted.org> Message-ID: <1637018005.32.0.810034855568.issue38748@roundup.psfhosted.org> Michael Curran added the comment: PR: https://github.com/python/cpython/pull/26204 Looks like a maintainer needs to allow a workflow to run for the remaining checks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:29:24 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Nov 2021 23:29:24 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1637018964.77.0.757745277536.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9bf2cbc4c498812e14f20d86acb61c53928a5a57 by Victor Stinner in branch 'main': bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521) https://github.com/python/cpython/commit/9bf2cbc4c498812e14f20d86acb61c53928a5a57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:31:42 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 15 Nov 2021 23:31:42 +0000 Subject: [issue45677] [doc] improve sqlite3 docs In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org> Message-ID: <1637019102.57.0.771368882622.issue45677@roundup.psfhosted.org> Carol Willing added the comment: New changeset 94dad5e41e5863e03972f3f3646087fb591f73f9 by Miss Islington (bot) in branch '3.10': bpo-45677: Reword first section of `sqlite3` docs (GH-29326) (GH-29566) https://github.com/python/cpython/commit/94dad5e41e5863e03972f3f3646087fb591f73f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:32:35 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 15 Nov 2021 23:32:35 +0000 Subject: [issue45677] [doc] improve sqlite3 docs In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org> Message-ID: <1637019155.17.0.767067174564.issue45677@roundup.psfhosted.org> Carol Willing added the comment: New changeset a40d066e8ef548b52eca2b0e27c219ddd7e11592 by Miss Islington (bot) in branch '3.9': bpo-45677: Reword first section of `sqlite3` docs (GH-29326) (GH-29567) https://github.com/python/cpython/commit/a40d066e8ef548b52eca2b0e27c219ddd7e11592 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:48:48 2021 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Nov 2021 23:48:48 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637020128.54.0.330048903371.issue45573@roundup.psfhosted.org> Brett Cannon added the comment: > Is traditional cross-compiling work still useful these days anyway? Yes for things like WebAssembly where there is no equivalent of an emulated CPU under QEMU. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:50:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Nov 2021 23:50:48 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1637020248.51.0.0830436010772.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: asyncore, asynchat, smtpd modules have been removed. I close this issue. > asyncore is still used in several tests and should be replaced This issue is not solved. My PR only copied asyncore as a private module in test.support (test.support._asyncore). If someone cares, please open a new issue. ---------- dependencies: -test_poplib replace asyncore resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:51:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Nov 2021 23:51:57 +0000 Subject: [issue30514] test_poplib replace asyncore In-Reply-To: <1496165040.07.0.652591907468.issue30514@psf.upfronthosting.co.za> Message-ID: <1637020317.42.0.834003633352.issue30514@roundup.psfhosted.org> STINNER Victor added the comment: I removed asyncore in bpo-28533: New changeset 9bf2cbc4c498812e14f20d86acb61c53928a5a57 by Victor Stinner in branch 'main': bpo-28533: Remove asyncore, asynchat, smtpd modules (GH-29521) https://github.com/python/cpython/commit/9bf2cbc4c498812e14f20d86acb61c53928a5a57 But I kept a private copy as test.support._asyncore for the few tests which still use it (asyncore, asynchat and/or smtpd). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 18:52:37 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 15 Nov 2021 23:52:37 +0000 Subject: [issue45811] Improve error message when source code contains invisible control characters Message-ID: <1637020357.3.0.163492557929.issue45811@roundup.psfhosted.org> New submission from Steven D'Aprano : Invisible control characters (aside from white space) are not permitted in source code, but the syntax error we get is confusing and lacks information: >>> s = 'print\x17("Hello")' >>> eval(s) Traceback (most recent call last): File "", line 1, in File "", line 1 print("Hello") ^ SyntaxError: invalid syntax The caret points to an invisible character. The offending control character is not visible in the traceback, or the source code unless you use a hex editor. Copying and pasting the string from the traceback, or the source code, may remove the control character (depending on the tools you use), making it even harder to track down the problem. I suggest that the syntax error should state that the problem is an invisible control character, and display it as a standard human-readable code together with its hex code: SyntaxError: invisible control character ^W (0x17) Just in case it isn't obvious what the mapping between controls and the human visible string is: def control(char): n = ord(char) if 0 <= n <= 0x1F: # C0 control codes return '^' + chr(ord('@')+n) elif n == 0x7F: # DEL return '^?' elif 0x80 <= n <= 0x9F: # C1 control codes return 'Esc+' + chr(ord('@')+n-0x80) else: raise ValueError('Not a control character.') https://en.wikipedia.org/wiki/C0_and_C1_control_codes ---------- components: Interpreter Core messages: 406379 nosy: steven.daprano priority: normal severity: normal status: open title: Improve error message when source code contains invisible control characters type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 19:01:27 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Nov 2021 00:01:27 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637020887.2.0.816737637706.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: Gaige Paulsen: "I'll try to check that in the next day or two." Thanks. Did you have the opportunity to give it a try? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 19:19:52 2021 From: report at bugs.python.org (Andre Roberge) Date: Tue, 16 Nov 2021 00:19:52 +0000 Subject: [issue45811] Improve error message when source code contains invisible control characters In-Reply-To: <1637020357.3.0.163492557929.issue45811@roundup.psfhosted.org> Message-ID: <1637021992.46.0.79075611958.issue45811@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 19:47:43 2021 From: report at bugs.python.org (Andre Roberge) Date: Tue, 16 Nov 2021 00:47:43 +0000 Subject: [issue45812] SystemError when using code.interact Message-ID: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org> New submission from Andre Roberge : In the following, I execute a single invalid statement in the Python interpreter, which gives the correct error message. Afterwards, I repeat this example using code.interact(), generating a different traceback. This issue affects IDLE differently as shown in the attached file: the statement is never considered to be complete. === Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov 5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a = 3 \ 4 File "", line 1 a = 3 \ 4 ^ SyntaxError: unexpected character after line continuation character >>> import code >>> code.interact() Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov 5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> a = 3 \ 4 ... Traceback (most recent call last): File "", line 1, in File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 301, in interact console.interact(banner, exitmsg) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 232, in interact more = self.push(line) ^^^^^^^^^^^^^^^ File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 258, in push more = self.runsource(source, self.filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\code.py", line 63, in runsource code = self.compile(source, filename, symbol) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\codeop.py", line 185, in __call__ return _maybe_compile(self.compiler, source, filename, symbol) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\codeop.py", line 96, in _maybe_compile code2 = compiler(source + "\n\n", filename, symbol) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\AppData\Local\Programs\Python\Python311\lib\codeop.py", line 150, in __call__ codeob = compile(source, filename, symbol, self.flags, True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SystemError: Negative size passed to PyUnicode_New ---------- components: Parser files: idle_problem.png messages: 406381 nosy: aroberge, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: SystemError when using code.interact versions: Python 3.11 Added file: https://bugs.python.org/file50441/idle_problem.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 19:54:27 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Nov 2021 00:54:27 +0000 Subject: [issue43526] Programmatic management of BytesWarning doesn't work for native triggers. In-Reply-To: <1615971785.71.0.488992120219.issue43526@roundup.psfhosted.org> Message-ID: <1637024067.36.0.989642400667.issue43526@roundup.psfhosted.org> STINNER Victor added the comment: While you should not do that at home ;-), it's now *technically* possible to change the BytesWarning flag at runtime using a a *private* *internal* API: $ ./python Python 3.11.0a2+ (heads/remove_asyncore:010015d2eb, Nov 11 2021, >>> "unicode" == b"bytes" False # Change the internal BytesWarning flag >>> import _testinternalcapi >>> config=_testinternalcapi.get_config() >>> config['bytes_warning']=1 >>> _testinternalcapi.set_config(config) >>> "unicode" == b"bytes" :1: BytesWarning: Comparison between bytes and string False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 19:57:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Nov 2021 00:57:58 +0000 Subject: [issue43526] Programmatic management of BytesWarning doesn't work for native triggers. In-Reply-To: <1615971785.71.0.488992120219.issue43526@roundup.psfhosted.org> Message-ID: <1637024278.8.0.201369188979.issue43526@roundup.psfhosted.org> STINNER Victor added the comment: > If this is intended behaviour, which seems to be the case according to ncoghlan's comment https://bugs.python.org/issue32230#msg307721, it should be clearly documented, as it's rather frustrating. The -b command line documentation is not explicitly enough? "Issue a warning when comparing bytes or bytearray with str or bytes with int. Issue an error when the option is given twice (-bb)." https://docs.python.org/dev/using/cmdline.html#cmdoption-b Modifying warning filters don't change how Python emits or not warnings. It only changes how emitted warnings are handlded: ignored, displayed, treated as errors. The relationship between -b and BytesWarning is different than other warnings. Should we add a note near the BytesWarning documentation? https://docs.python.org/dev/library/exceptions.html#BytesWarning ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 20:17:24 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 16 Nov 2021 01:17:24 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1637025444.85.0.791509617816.issue45582@roundup.psfhosted.org> Steve Dower added the comment: I have tests passing now, so reviews would be appreciated. There's definitely scope for optimising this algorithm both for speed and clarity, but I'd prefer to get the main translation in first so that any further changes have a reliable baseline (especially since we'll likely end up changing the behaviour slightly if we touch anything at all in getpath, so it'd be good to capture those as individual commits/bugs). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 22:11:19 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Nov 2021 03:11:19 +0000 Subject: [issue44295] self.assertDictContainsSubset warning is unhelpful In-Reply-To: <1622676760.31.0.209382096259.issue44295@roundup.psfhosted.org> Message-ID: <1637032279.32.0.923169611535.issue44295@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 15 23:54:39 2021 From: report at bugs.python.org (drakebohan) Date: Tue, 16 Nov 2021 04:54:39 +0000 Subject: [issue41114] "TypeError: unhashable type" could often be more clear In-Reply-To: <1593089297.5.0.960414313622.issue41114@roundup.psfhosted.org> Message-ID: <1637038479.7.0.851521769556.issue41114@roundup.psfhosted.org> drakebohan added the comment: The problem is that you can't use a list as the key in a dict, since dict keys need to be immutable. This means that when you try to hash an unhashable object it will result an error. For ex. when you use a list as a key in the dictionary , this cannot be done because lists can't be hashed. The standard way to solve this issue is to cast a list to a tuple . TypeError: unhashable type: 'list' usually means that you are trying to use a list as an hash argument. The standard way to solve this issue is to cast a list to tuple. Though tuples may seem similar to lists, they are often used in different situations and for different purposes. Tuples can be used as keys if they contain only strings, numbers, or tuples; if a tuple contains any mutable object either directly or indirectly, it cannot be used as a key. You can?t use lists as key. http://net-informations.com/python/iq/unhashable.htm ---------- nosy: +drakebohan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 03:06:23 2021 From: report at bugs.python.org (neonene) Date: Tue, 16 Nov 2021 08:06:23 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1637049983.14.0.834966702389.issue45116@roundup.psfhosted.org> neonene added the comment: I still have the issue in current main and PR29565 with msvc2022 (v142 or v143 toolset). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 03:16:45 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 08:16:45 +0000 Subject: [issue45812] SystemError when using code.interact In-Reply-To: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org> Message-ID: <1637050605.19.0.746549614764.issue45812@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: What versions does this affect? Only the main branch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 03:29:55 2021 From: report at bugs.python.org (Frost Ming) Date: Tue, 16 Nov 2021 08:29:55 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1637051395.03.0.743688858131.issue45235@roundup.psfhosted.org> Change by Frost Ming : ---------- nosy: +Frost Ming nosy_count: 10.0 -> 11.0 pull_requests: +27818 pull_request: https://github.com/python/cpython/pull/29574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 03:44:12 2021 From: report at bugs.python.org (Xinmeng Xia) Date: Tue, 16 Nov 2021 08:44:12 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 Message-ID: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> New submission from Xinmeng Xia : The following crashing can only reproduce on Python3.11. In this case, we import "asyncio" after deleting a coroutine object and before cleaning it up, leading to crashing. test.py ======================= async def f(): pass f = f() frame = f.cr_frame del f import asyncio frame.clear() ====================== >>>Python3.11 -Werror test.py Exception ignored in: Traceback (most recent call last): File "python311/Lib/warnings.py", line 506, in _warn_unawaited_coroutine warn(msg, category=RuntimeWarning, stacklevel=2, source=coro) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeWarning: coroutine 'f' was never awaited Segmentation fault (core dumped) Version: Python 3.11.0a2+ on Ubuntu 16.04 ---------- components: asyncio messages: 406388 nosy: asvetlov, xxm, yselivanov priority: normal severity: normal status: open title: Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 type: crash versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:02:43 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 09:02:43 +0000 Subject: [issue45812] SystemError when using code.interact In-Reply-To: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org> Message-ID: <1637053363.93.0.822936500161.issue45812@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I cannot reproduce this in the main branch: ? ./python.exe Python 3.11.0a2+ (heads/main:9bf2cbc4c4, Nov 16 2021, 08:59:12) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import code >>> code.interact() Python 3.11.0a2+ (heads/main:9bf2cbc4c4, Nov 16 2021, 08:59:12) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> a = 3 \ 4 File "", line 1 a = 3 \ 4 ^ SyntaxError: unexpected character after line continuation character >>> ^D now exiting InteractiveConsole... >>> a = 3 \ 4 File "", line 1 a = 3 \ 4 ^ SyntaxError: unexpected character after line continuation character ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:07:30 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 09:07:30 +0000 Subject: [issue45812] SystemError when using code.interact In-Reply-To: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org> Message-ID: <1637053650.52.0.325034686444.issue45812@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Same with 3.10: ? ./python.exe Python 3.10.0+ (heads/3.10:7c99e434a9, Nov 16 2021, 09:03:07) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = 3 \ 4 File "", line 1 a = 3 \ 4 ^ SyntaxError: unexpected character after line continuation character >>> import code >>> code.interact() Python 3.10.0+ (heads/3.10:7c99e434a9, Nov 16 2021, 09:03:07) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> a = 3 \ 4 File "", line 1 a = 3 \ 4 ^ SyntaxError: unexpected character after line continuation character and 3.9: ? ./python.exe Python 3.9.9+ (heads/3.9:a40d066e8e, Nov 16 2021, 09:02:19) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> a = 3 \ 4 File "", line 1 a = 3 \ 4 ^ SyntaxError: unexpected character after line continuation character >>> import code >>> code.interact() Python 3.9.9+ (heads/3.9:a40d066e8e, Nov 16 2021, 09:02:19) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> a = 3 \ 4 File "", line 1 a = 3 \ 4 ^ SyntaxError: unexpected character after line continuation character ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:09:39 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 09:09:39 +0000 Subject: [issue45812] SystemError when using code.interact In-Reply-To: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org> Message-ID: <1637053779.87.0.157099985242.issue45812@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: You seem to be using commit e2b4e4b (the release commit), but this issue was fixed very likely in https://bugs.python.org/issue45738. Could you confirm that you cannot reproduce this with the latest main branch? In general, I would kindly recommend to always do this check when opening a new issue :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:23:24 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 09:23:24 +0000 Subject: [issue45807] Strange SyntaxError message / suggestions for "@x = 123" In-Reply-To: <1636987261.75.0.479908594511.issue45807@roundup.psfhosted.org> Message-ID: <1637054604.2.0.375560124515.issue45807@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I agree this is weird, but technically is not incorrect. For example, consider this: >>> def foo(f): ... return f ... >>> @x = foo File "", line 1 @x = foo ^^^^^^^ SyntaxError: invalid syntax. Maybe you meant '==' or ':=' instead of '='? but with ':=' it works: >>> @x := foo ... def g(): ... ... ... Same for using '==' (although much work): >>> def foo(f): ... return f ... >>> class A: ... def __eq__(self, other): ... return foo ... >>> @A() = A() File "", line 1 @A() = A() ^^^ SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='? But it works with '==': >>> @A() == A() ... def g(): ... ... ... >>> g This shows two things: * Is technically syntactically valid, but semantically invalid. Notice that the suggestion is not false: the parser tells you that if you use '==' or ':=' it won't be a SyntaxError, and that is true. * There are ridiculous cases when this can succeed, and actually some where it does even make sense (':='). I am therefore closing this as 'not a bug', but please, feel free to comment back if you disagree :) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 04:57:21 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 16 Nov 2021 09:57:21 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1637056641.73.0.927962194647.issue45792@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset c37a0d9c0ae4aa0d9135fac9a58afc7b34ff71d6 by Miss Islington (bot) in branch '3.8': bpo-45792: Fix contextvar.Token's intersphinx FQN (GH-29533) (GH-29537) https://github.com/python/cpython/commit/c37a0d9c0ae4aa0d9135fac9a58afc7b34ff71d6 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 05:15:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 16 Nov 2021 10:15:25 +0000 Subject: [issue30514] test_poplib replace asyncore In-Reply-To: <1496165040.07.0.652591907468.issue30514@psf.upfronthosting.co.za> Message-ID: <1637057725.77.0.08419271101.issue30514@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 05:35:33 2021 From: report at bugs.python.org (Andre Roberge) Date: Tue, 16 Nov 2021 10:35:33 +0000 Subject: [issue45812] SystemError when using code.interact In-Reply-To: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org> Message-ID: <1637058933.07.0.106335547097.issue45812@roundup.psfhosted.org> Andre Roberge added the comment: I am sorry, but I am not set up to work from the main branch and must rely on official releases. In the future, for alpha and beta releases, I will try to wait for the next release, see immediately if I can reproduce bugs that I had noted before, and submit then at that time. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 05:40:29 2021 From: report at bugs.python.org (Yevhenii Hyzyla) Date: Tue, 16 Nov 2021 10:40:29 +0000 Subject: [issue45814] Use same function signature for datetime.time.strftime Message-ID: <1637059229.27.0.494506093671.issue45814@roundup.psfhosted.org> New submission from Yevhenii Hyzyla : Method datetime.time.strftime in Python and C implementation has different signature. Python implementation use `fmt` as argument and C implementation use `format` as argument. Python implementation: ```python def strftime(self, fmt): ... ``` C implementation ```C static PyObject * time_strftime(PyDateTime_Time *self, PyObject *args, PyObject *kw) { PyObject *result; PyObject *tuple; PyObject *format; static char *keywords[] = {"format", NULL}; if (! PyArg_ParseTupleAndKeywords(args, kw, "U:strftime", keywords, &format)) return NULL; ``` My suggestion to use the same argument name for both implementations, for example to use `format` as in C implementation. ---------- components: Library (Lib) messages: 406395 nosy: hyzyla priority: normal severity: normal status: open title: Use same function signature for datetime.time.strftime type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 05:41:24 2021 From: report at bugs.python.org (Yevhenii Hyzyla) Date: Tue, 16 Nov 2021 10:41:24 +0000 Subject: [issue45814] Use the same function signature for datetime.time.strftime In-Reply-To: <1637059229.27.0.494506093671.issue45814@roundup.psfhosted.org> Message-ID: <1637059284.21.0.100949903333.issue45814@roundup.psfhosted.org> Change by Yevhenii Hyzyla : ---------- title: Use same function signature for datetime.time.strftime -> Use the same function signature for datetime.time.strftime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 05:46:44 2021 From: report at bugs.python.org (Dimitri Papadopoulos Orfanos) Date: Tue, 16 Nov 2021 10:46:44 +0000 Subject: [issue45815] Document exceptions raised by fnmtach Message-ID: <1637059604.78.0.155105501767.issue45815@roundup.psfhosted.org> New submission from Dimitri Papadopoulos Orfanos : The fnmatch documentation should explicitly mention the type of exceptions raised by fnmatch.fnmatch(): https://docs.python.org/3/library/fnmatch.html In my case it raised sre_constants.error, and it took some time to understand that the proper way to catch this type of exceptions is to catch the re.error superclass, by reading https://bugs.python.org/issue795379. Actually that would be the case for any module using the re module under the hood, possibly passing an ill-formed regex to a re function. ---------- assignee: docs at python components: Documentation, Library (Lib), Regular Expressions files: sre_constants.error_stderr.txt messages: 406396 nosy: DimitriPapadopoulosOrfanos, docs at python, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Document exceptions raised by fnmtach versions: Python 3.11 Added file: https://bugs.python.org/file50442/sre_constants.error_stderr.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 06:02:06 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 16 Nov 2021 11:02:06 +0000 Subject: [issue45753] Further speed up Python-to-Python calls. In-Reply-To: <1636391875.36.0.891525405866.issue45753@roundup.psfhosted.org> Message-ID: <1637060526.0.0.0619678389635.issue45753@roundup.psfhosted.org> Mark Shannon added the comment: New changeset b9310773756f40f77e075f221a90dd41e6964efc by Mark Shannon in branch 'main': bpo-45753: Make recursion checks more efficient. (GH-29524) https://github.com/python/cpython/commit/b9310773756f40f77e075f221a90dd41e6964efc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 06:14:08 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 11:14:08 +0000 Subject: [issue45812] SystemError when using code.interact In-Reply-To: <1637023663.78.0.877430736208.issue45812@roundup.psfhosted.org> Message-ID: <1637061248.8.0.185347758438.issue45812@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: In that case don't worry. I prefer that you report potential bugs without waiting if that's ok with you, my comment was just in case you are familiar with compiling from the CPython repo. Thanks for all the help! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 06:37:56 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 16 Nov 2021 11:37:56 +0000 Subject: [issue45753] Further speed up Python-to-Python calls. In-Reply-To: <1636391875.36.0.891525405866.issue45753@roundup.psfhosted.org> Message-ID: <1637062676.41.0.514429938034.issue45753@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +27819 pull_request: https://github.com/python/cpython/pull/29575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 06:45:45 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 16 Nov 2021 11:45:45 +0000 Subject: [issue45725] test_freeze doesn't clean up after itself In-Reply-To: <1636111041.41.0.0249123262066.issue45725@roundup.psfhosted.org> Message-ID: <1637063145.03.0.397227058409.issue45725@roundup.psfhosted.org> Mark Shannon added the comment: test_tools also seems to fail a lot unless `make clean` is run first. Possibly related? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 06:58:31 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Nov 2021 11:58:31 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1637063911.56.0.227496445615.issue45292@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: New changeset 8b06d01507fd708468570eaa43a349828784489a by Irit Katriel in branch 'main': bpo-45292: Use raw strings for regex in tests (GH-29545) https://github.com/python/cpython/commit/8b06d01507fd708468570eaa43a349828784489a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:03:19 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 16 Nov 2021 12:03:19 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637064199.68.0.495430417532.issue45512@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27820 pull_request: https://github.com/python/cpython/pull/29576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:16:42 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Nov 2021 12:16:42 +0000 Subject: [issue45725] test_freeze doesn't clean up after itself In-Reply-To: <1636111041.41.0.0249123262066.issue45725@roundup.psfhosted.org> Message-ID: <1637065002.36.0.359498374461.issue45725@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://github.com/python/cpython/pull/29527 uses a temporary directory for the test instead that should help with the cleanup. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:22:06 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Nov 2021 12:22:06 +0000 Subject: [issue45814] Use the same function signature for datetime.time.strftime In-Reply-To: <1637059229.27.0.494506093671.issue45814@roundup.psfhosted.org> Message-ID: <1637065326.62.0.228782351436.issue45814@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:46:05 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 16 Nov 2021 12:46:05 +0000 Subject: [issue45792] contextvars.Token has wrong module name in Sphinx's objects.inv In-Reply-To: <1636703975.97.0.094417369522.issue45792@roundup.psfhosted.org> Message-ID: <1637066765.82.0.871769909099.issue45792@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 07:48:15 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 16 Nov 2021 12:48:15 +0000 Subject: [issue45814] datetime.time.strftime: use the same function signature for C and Python implementations In-Reply-To: <1637059229.27.0.494506093671.issue45814@roundup.psfhosted.org> Message-ID: <1637066895.09.0.0815415612127.issue45814@roundup.psfhosted.org> Change by Alex Waygood : ---------- title: Use the same function signature for datetime.time.strftime -> datetime.time.strftime: use the same function signature for C and Python implementations _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 08:41:28 2021 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 16 Nov 2021 13:41:28 +0000 Subject: [issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION In-Reply-To: <1633940907.8.0.793399065339.issue45429@roundup.psfhosted.org> Message-ID: <1637070088.47.0.997218937667.issue45429@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 55868f1a335cd3853938082a5b25cfba66563135 by Dong-hee Na in branch 'main': bpo-45429: Support CREATE_WAITABLE_TIMER_HIGH_RESOLUTION if possible (GH-29203) https://github.com/python/cpython/commit/55868f1a335cd3853938082a5b25cfba66563135 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 08:54:06 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 16 Nov 2021 13:54:06 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1637070846.27.0.426171598016.issue45636@roundup.psfhosted.org> Brandt Bucher added the comment: New changeset 6a84d61c55f2e543cf5fa84522d8781a795bba33 by Brandt Bucher in branch 'main': bpo-45636: Simplify BINARY_OP (GH-29565) https://github.com/python/cpython/commit/6a84d61c55f2e543cf5fa84522d8781a795bba33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:13:17 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 16 Nov 2021 14:13:17 +0000 Subject: [issue10572] Move test sub-packages to Lib/test In-Reply-To: <1290991979.58.0.262973706564.issue10572@psf.upfronthosting.co.za> Message-ID: <1637071997.86.0.53646065448.issue10572@roundup.psfhosted.org> Erlend E. Aasland added the comment: > Do we need Lib/test/test_sqlite3/__init__.py? Would not tests in package be loaded automatically? If I remove it, the test suite is not run. Maybe another change is needed for autodetection to work better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:35:04 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Tue, 16 Nov 2021 14:35:04 +0000 Subject: [issue45816] Python does not support building with Visual Studio 2022 Message-ID: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> New submission from theeshallnotknowethme : Python does not support building with Visual Studio 2022, which is the latest officially released stable version [1]. [1] https://devblogs.microsoft.com/visualstudio/visual-studio-2022-now-available/ ---------- components: Build messages: 406405 nosy: February291948 priority: normal severity: normal status: open title: Python does not support building with Visual Studio 2022 versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:42:29 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Tue, 16 Nov 2021 14:42:29 +0000 Subject: [issue45816] Python does not support building with Visual Studio 2022 In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1637073749.13.0.431570539444.issue45816@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- keywords: +patch pull_requests: +27821 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:53:43 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Nov 2021 14:53:43 +0000 Subject: [issue45126] [sqlite3] cleanup and harden Connection and Cursor __init__ In-Reply-To: <1631015162.08.0.638095834379.issue45126@roundup.psfhosted.org> Message-ID: <1637074423.46.0.923606059955.issue45126@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 9d6215a54c177a5e359c37ecd1c50b594b194f41 by Erlend Egeberg Aasland in branch 'main': bpo-45126: Harden `sqlite3` connection initialisation (GH-28227) https://github.com/python/cpython/commit/9d6215a54c177a5e359c37ecd1c50b594b194f41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 09:55:49 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 16 Nov 2021 14:55:49 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1637074549.79.0.0603631395391.issue45116@roundup.psfhosted.org> Brandt Bucher added the comment: Hm. If removing 26 opcodes didn't fix this, then maybe the size of _PyEval_EvalFrameDefault isn't really the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:20:56 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Nov 2021 15:20:56 +0000 Subject: [issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap. In-Reply-To: <1630926648.9.0.514792822043.issue45113@roundup.psfhosted.org> Message-ID: <1637076056.27.0.521366061539.issue45113@roundup.psfhosted.org> Petr Viktorin added the comment: Back to this issue -- do we have any use case other than setting the internal Py_TPFLAGS_DISALLOW_INSTANTIATION flag? If not, I'd like to close this (with apologies for not doing my research and letting Hai Shi do unmerged work). If a use case is found, I suspect it'll need a different solution ? perhaps allowing PyType_Slot?s. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:21:23 2021 From: report at bugs.python.org (Aivar Annamaa) Date: Tue, 16 Nov 2021 15:21:23 +0000 Subject: [issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12 Message-ID: <1637076083.27.0.779565986622.issue45817@roundup.psfhosted.org> New submission from Aivar Annamaa : New version contains several bugfixes: https://github.com/tcltk/tk/blob/8baf7d337ca0aab7fafb0e670927ab2c0200e80a/changes#L7869 ---------- assignee: terry.reedy components: IDLE, Tkinter, Windows, macOS messages: 406409 nosy: aivarannamaa, ned.deily, paul.moore, ronaldoussoren, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: Build Windows and macOS installers with Tcl/Tk 8.6.12 versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:21:33 2021 From: report at bugs.python.org (Aivar Annamaa) Date: Tue, 16 Nov 2021 15:21:33 +0000 Subject: [issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12 In-Reply-To: <1637076083.27.0.779565986622.issue45817@roundup.psfhosted.org> Message-ID: <1637076093.08.0.433191574722.issue45817@roundup.psfhosted.org> Change by Aivar Annamaa : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:22:48 2021 From: report at bugs.python.org (Aivar Annamaa) Date: Tue, 16 Nov 2021 15:22:48 +0000 Subject: [issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12 In-Reply-To: <1637076083.27.0.779565986622.issue45817@roundup.psfhosted.org> Message-ID: <1637076168.6.0.297976654124.issue45817@roundup.psfhosted.org> Aivar Annamaa added the comment: Sorry, duplicate of #45732 ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:24:37 2021 From: report at bugs.python.org (Aivar Annamaa) Date: Tue, 16 Nov 2021 15:24:37 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1637076277.68.0.648301335506.issue45732@roundup.psfhosted.org> Change by Aivar Annamaa : ---------- nosy: +aivarannamaa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:30:18 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Tue, 16 Nov 2021 15:30:18 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1637076618.53.0.844263921418.issue45816@roundup.psfhosted.org> theeshallnotknowethme added the comment: Rephrasing: Python does not support building with standalone MSVC v143 Build Tools, which is the version of MS Build Tools under Visual Studio 2022 (version 17.0). Visual Studio 2022 is the latest stable release of Visual Studio [1]. [1] https://devblogs.microsoft.com/visualstudio/visual-studio-2022-now-available/ ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: Python does not support building with Visual Studio 2022 -> Python does not support standalone MSVC v143 (VS 2022) Build Tools _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 10:54:52 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Nov 2021 15:54:52 +0000 Subject: [issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12 In-Reply-To: <1637076083.27.0.779565986622.issue45817@roundup.psfhosted.org> Message-ID: <1637078092.03.0.835335038156.issue45817@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: terry.reedy -> resolution: -> duplicate superseder: -> Make python.org Windows and macOS installers use Tk 8.6.12 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:21:37 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Nov 2021 16:21:37 +0000 Subject: [issue45817] Build Windows and macOS installers with Tcl/Tk 8.6.12 In-Reply-To: <1637076083.27.0.779565986622.issue45817@roundup.psfhosted.org> Message-ID: <1637079697.95.0.830596916213.issue45817@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you for the link. E.Paine's report for this 2021-09-21 (bug)[033886] Win: hang in font loading (e-paine,vogel) was the result of #45103, based on an IDLE user's SO question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:21:51 2021 From: report at bugs.python.org (Sergey M.) Date: Tue, 16 Nov 2021 16:21:51 +0000 Subject: [issue45818] socketserver.BaseRequestHandler inherited class Message-ID: <1637079711.69.0.730324544936.issue45818@roundup.psfhosted.org> New submission from Sergey M. : Due to ```python try: self.handle() finally: self.finish() ``` construct in `socketserver.BaseRequestHandler.__init__()` method inherited classes with `overrided __init__()` method may suffer from incomplete initialization. For example, in the following snippet ```python def __init__(self, request, client_address, server): super().__init__(request, client_address, server) self.foo = 1 ``` in some cases all the code after `super()` call will not be executed. This is a MWE of the server with partially initialized Handler class ```python from socketserver import UnixStreamServer, StreamRequestHandler, ForkingMixIn class Handler(StreamRequestHandler): def __init__(self, request, client_address, server): super().__init__(request, client_address, server) self.foo = 1 def handle(self): print(self.foo) class ThreadedUnixStreamServer(ForkingMixIn, UnixStreamServer): pass with ThreadedUnixStreamServer("/tmp/test.socket", Handler) as server: server.serve_forever() ``` ---------- components: Library (Lib) messages: 406413 nosy: matsievskiysv priority: normal severity: normal status: open title: socketserver.BaseRequestHandler inherited class type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:27:41 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Nov 2021 16:27:41 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1637080061.95.0.691108325778.issue45732@roundup.psfhosted.org> Terry J. Reedy added the comment: Steve, thank you for patching all current versions. Previous policy has been to freeze tcl/tk x.y.z in python x.y because tk x.y.z may include a few enhancements among the bug fixes and hence indirectly add new features to tkinter in python x.y.z. However ... E.Paine's report for this bugfix "2021-09-21 (bug)[033886] Win: hang in font loading (e-paine,vogel)" was the result of #45103, based on an IDLE user's SO question about IDLE's config dialog hanging. It turned out that adding a particular font (Phaistos) to Windows was the cause, and the fix was to remove it. Ned's link specifically says they fixed " - Windows loading of the Phaistos font.", so I can now close our #45103. Fine with me if we continue to update tcl/tk 8.6.z as possible on Windows as well as Mac. Switching to 8.7, when released, would likely have to wait for discussion and a new Python version, which now is never too far away. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:38:55 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Nov 2021 16:38:55 +0000 Subject: [issue45103] IDLE: make configdialog font page survive font failures In-Reply-To: <1630790219.84.0.830457804554.issue45103@roundup.psfhosted.org> Message-ID: <1637080735.7.0.00580277021086.issue45103@roundup.psfhosted.org> Terry J. Reedy added the comment: This has been (supposedly) fixed in tcl/tk 8.6.12, included with all our Windows installers starting with 3.9.9. Thank you for investigating reporting to tcl/tk. Bugfix list at https://github.com/tcltk/tk/blob/8baf7d337ca0aab7fafb0e670927ab2c0200e80a/changes#L7869 credits you along with 'vogel': "2021-09-21 (bug)[033886] Win: hang in font loading (e-paine,vogel)" https://sourceforge.net/p/tcl/mailman/message/37380142/ specifically says fixes include "" - Windows loading of the Phaistos font.". ---------- resolution: -> third party stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:44:41 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 16 Nov 2021 16:44:41 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1637074549.79.0.0603631395391.issue45116@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: I'd like to know how to reproduce this. @neonene can you write down the steps I should do to get the results you get? I have VS 2019, if I need VS 2022 I can install that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:55:25 2021 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 16 Nov 2021 16:55:25 +0000 Subject: [issue45814] datetime.time.strftime: use the same function signature for C and Python implementations In-Reply-To: <1637059229.27.0.494506093671.issue45814@roundup.psfhosted.org> Message-ID: <1637081725.21.0.103307132926.issue45814@roundup.psfhosted.org> Paul Ganssle added the comment: I think this is mostly a duplicate of bpo-41260, which has an open PR on it. I think that got lost in the shuffle, I'm sad we didn't fix it in Python 3.10. I think we should migrate all of these signatures that differ to whichever one the C implementation is using (I believe that's 3.11). I'm going to close that one and edit the other one to cover `time` and `date` as well. Thanks for the report Yevhenii! ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> datetime: strftime method takes different keyword argument: fmt (pure) or format (C) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 11:56:04 2021 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 16 Nov 2021 16:56:04 +0000 Subject: [issue41260] datetime, date and time: strftime method takes different keyword argument: fmt (pure) or format (C) In-Reply-To: <1594314108.83.0.615817711225.issue41260@roundup.psfhosted.org> Message-ID: <1637081764.61.0.0377097759379.issue41260@roundup.psfhosted.org> Paul Ganssle added the comment: Updating this issue to cover the problem in date, time and datetime. ---------- title: datetime: strftime method takes different keyword argument: fmt (pure) or format (C) -> datetime, date and time: strftime method takes different keyword argument: fmt (pure) or format (C) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 12:23:51 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 16 Nov 2021 17:23:51 +0000 Subject: [issue42376] Add helpers to populate modules in C In-Reply-To: <1605554841.18.0.0577877222829.issue42376@roundup.psfhosted.org> Message-ID: <1637083431.54.0.583943373781.issue42376@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 12:30:06 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 16 Nov 2021 17:30:06 +0000 Subject: [issue45126] [sqlite3] cleanup and harden Connection and Cursor __init__ In-Reply-To: <1631015162.08.0.638095834379.issue45126@roundup.psfhosted.org> Message-ID: <1637083806.59.0.638156696606.issue45126@roundup.psfhosted.org> Erlend E. Aasland added the comment: The remaining PR (GH 28234) deprecates reinitialisation. I'm not sure it is a good idea to pursue this, so I'm leaning towards closing this as fixed, and also closing GH 28234. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 12:32:50 2021 From: report at bugs.python.org (Chris Eykamp) Date: Tue, 16 Nov 2021 17:32:50 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1637083970.74.0.0136005498731.issue45796@roundup.psfhosted.org> Chris Eykamp added the comment: The behavior I described is definitely a bug, though it may be (and I suspect is) Windows specific. You may also be right that the problem is upstream, but please don't declare this "not a bug" until you've tested it on Windows. ---------- nosy: +watusimoto2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:24:20 2021 From: report at bugs.python.org (Adrian Garcia Badaracco) Date: Tue, 16 Nov 2021 18:24:20 +0000 Subject: [issue26175] Fully implement IOBase abstract on SpooledTemporaryFile In-Reply-To: <1453413274.25.0.536987988375.issue26175@psf.upfronthosting.co.za> Message-ID: <1637087060.42.0.871605746223.issue26175@roundup.psfhosted.org> Change by Adrian Garcia Badaracco : ---------- nosy: +adriangb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:25:08 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 16 Nov 2021 18:25:08 +0000 Subject: [issue41260] datetime, date and time: strftime method takes different keyword argument: fmt (pure) or format (C) In-Reply-To: <1594314108.83.0.615817711225.issue41260@roundup.psfhosted.org> Message-ID: <1637087108.04.0.0257554785629.issue41260@roundup.psfhosted.org> Change by Alex Waygood : ---------- versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:30:56 2021 From: report at bugs.python.org (Sebastian Rittau) Date: Tue, 16 Nov 2021 18:30:56 +0000 Subject: [issue41260] datetime, date and time: strftime method takes different keyword argument: fmt (pure) or format (C) In-Reply-To: <1594314108.83.0.615817711225.issue41260@roundup.psfhosted.org> Message-ID: <1637087456.9.0.0434023267233.issue41260@roundup.psfhosted.org> Sebastian Rittau added the comment: Ref https://github.com/python/typeshed/pull/6317 for a discussion about this in typeshed. ---------- nosy: +srittau _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:35:25 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 16 Nov 2021 18:35:25 +0000 Subject: [issue41260] datetime, date and time: strftime method takes different keyword argument: fmt (pure) or format (C) In-Reply-To: <1594314108.83.0.615817711225.issue41260@roundup.psfhosted.org> Message-ID: <1637087725.17.0.22950591325.issue41260@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:51:40 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 16 Nov 2021 18:51:40 +0000 Subject: [issue45819] Avoid releasing the GIL in nonblocking socket operations Message-ID: <1637088700.35.0.697825575179.issue45819@roundup.psfhosted.org> New submission from Jim Crist-Harif : In https://bugs.python.org/issue7946 an issue with how the current GIL interacts with mixing IO and CPU bound work. Quoting this issue: > when an I/O bound thread executes an I/O call, > it always releases the GIL. Since the GIL is released, a CPU bound > thread is now free to acquire the GIL and run. However, if the I/O > call completes immediately (which is common), the I/O bound thread > immediately stalls upon return from the system call. To get the GIL > back, it now has to go through the timeout process to force the > CPU-bound thread to release the GIL again. This issue can come up in any application where IO and CPU bound work are mixed (we've found it to be a cause of performance issues in https://dask.org for example). Fixing the general problem is tricky and likely requires changes to the GIL's internals, but in the specific case of mixing asyncio running in one thread and CPU work happening in background threads, there may be a simpler fix - don't release the GIL if we don't have to. Asyncio relies on nonblocking socket operations, which by definition shouldn't block. As such, releasing the GIL shouldn't be needed for many operations (`send`, `recv`, ...) on `socket.socket` objects provided they're in nonblocking mode (as suggested in https://bugs.python.org/issue7946#msg99477). Likewise, dropping the GIL can be avoided when calling `select` on `selectors.BaseSelector` objects with a timeout of 0 (making it a non-blocking call). I've made a patch (https://github.com/jcrist/cpython/tree/keep-gil-for-fast-syscalls) with these two changes, and run a benchmark (attached) to evaluate the effect of background threads with/without the patch. The benchmark starts an asyncio server in one process, and a number of clients in a separate process. A number of background threads that just spin are started in the server process (configurable by the `-t` flag, defaults to 0), then the server is loaded to measure the RPS. Here are the results: ``` # Main branch $ python bench.py -c1 -t0 Benchmark: clients = 1, msg-size = 100, background-threads = 0 16324.2 RPS $ python bench.py -c1 -t1 Benchmark: clients = 1, msg-size = 100, background-threads = 1 Spinner spun 1.52e+07 cycles/second 97.6 RPS $ python bench.py -c2 -t0 Benchmark: clients = 2, msg-size = 100, background-threads = 0 31308.0 RPS $ python bench.py -c2 -t1 Benchmark: clients = 2, msg-size = 100, background-threads = 1 Spinner spun 1.52e+07 cycles/second 96.2 RPS $ python bench.py -c10 -t0 Benchmark: clients = 10, msg-size = 100, background-threads = 0 47169.6 RPS $ python bench.py -c10 -t1 Benchmark: clients = 10, msg-size = 100, background-threads = 1 Spinner spun 1.54e+07 cycles/second 95.4 RPS # With this patch $ ./python bench.py -c1 -t0 Benchmark: clients = 1, msg-size = 100, background-threads = 0 18201.8 RPS $ ./python bench.py -c1 -t1 Benchmark: clients = 1, msg-size = 100, background-threads = 1 Spinner spun 9.03e+06 cycles/second 194.6 RPS $ ./python bench.py -c2 -t0 Benchmark: clients = 2, msg-size = 100, background-threads = 0 34151.8 RPS $ ./python bench.py -c2 -t1 Benchmark: clients = 2, msg-size = 100, background-threads = 1 Spinner spun 8.72e+06 cycles/second 729.6 RPS $ ./python bench.py -c10 -t0 Benchmark: clients = 10, msg-size = 100, background-threads = 0 53666.6 RPS $ ./python bench.py -c10 -t1 Benchmark: clients = 10, msg-size = 100, background-threads = 1 Spinner spun 5e+06 cycles/second 21838.2 RPS ``` A few comments on the results: - On the main branch, any GIL contention sharply decreases the number of RPS an asyncio server can handle, regardless of the number of clients. This makes sense - any socket operation will release the GIL, and the server thread will have to wait to reacquire it (up to the switch interval), rinse and repeat. So if every request requires 1 recv and 1 send, a server with background GIL contention is stuck at a max of `1 / (2 * switchinterval)` or 200 RPS with default configuration. This effectively prioritizes the background thread over the IO thread, since the IO thread releases the GIL very frequently and the background thread never does. - With the patch, we still see a performance degradation, but the degradation is less severe and improves with the number of clients. This is because with these changes the asyncio thread only releases the GIL when doing a blocking poll for new IO events (or when the switch interval is hit). With low load (1 client), the IO thread becomes idle more frequently and releases the GIL. Under higher load though the event loop frequently still has work to do at the end of a cycle and issues a `selector.select` call with a 0 timeout (nonblocking), avoiding releasing the GIL at all during that loop (note the nonlinear effect of adding more clients). Since the IO thread still releases the GIL sometimes, the background thread still holds the GIL a larger percentage of the time than the IO thread, but the difference between them is less severe than without this patch. I have also tested this patch on a Dask cluster running some real-world problems and found that it did improve performance where IO was throttled due to GIL contention. ---------- components: C API, IO files: bench.py messages: 406422 nosy: jcristharif priority: normal severity: normal status: open title: Avoid releasing the GIL in nonblocking socket operations type: performance versions: Python 3.11 Added file: https://bugs.python.org/file50443/bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:58:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 18:58:10 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input Message-ID: <1637089090.21.0.74869570109.issue45820@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: pablogsal priority: normal severity: normal status: open title: Parser can segfault if an error happens before reading any input _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:58:22 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 16 Nov 2021 18:58:22 +0000 Subject: [issue45819] Avoid releasing the GIL in nonblocking socket operations In-Reply-To: <1637088700.35.0.697825575179.issue45819@roundup.psfhosted.org> Message-ID: <1637089102.36.0.610577282969.issue45819@roundup.psfhosted.org> Change by Jim Crist-Harif : ---------- keywords: +patch pull_requests: +27822 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 13:58:17 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 18:58:17 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input Message-ID: <1637089097.25.0.999110306356.issue45820@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- components: +Parser nosy: +lys.nikolaou versions: +Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:00:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 19:00:10 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input Message-ID: <1637089210.15.0.601417427012.issue45820@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27823 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:21:08 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 16 Nov 2021 19:21:08 +0000 Subject: [issue45821] Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation Message-ID: <1637090468.13.0.603790423029.issue45821@roundup.psfhosted.org> New submission from Alex Waygood : The following methods have parameters that are positional-only in the C implementation of the `datetime` module, but positional-or-keyword in the pure-Python implementation: * tzinfo.tzname * tzinfo.utcoffset * tzinfo.dst * tzinfo.fromutc * date.fromordinal * date.fromisoformat * date.__format__ * date.__le__ * date.__lt__ * date.__ge__ * date.__gt__ * date.__add__ * date.__radd__ * date.__sub__ * date.__reduce_ex__ * time.__le__ * time.__lt__ * time.__ge__ * time.__gt__ * time.fromisoformat * time.__format__ * timedelta.__add__ * timedelta.__radd__ * timedelta.__sub__ * timedelta.__rsub__ * timedelta.__mul__ * timedelta.__rmul__ * timedelta.__floordiv__ * timedelta.__truediv__ * timedelta.__mod__ * timedelta.__divmod__ * timedelta.__le__ * timedelta.__lt__ * timedelta.__ge__ * timedelta.__gt__ * datetime.utcfromtimestamp * datetime.fromisoformat * datetime.strptime * datetime.__le__ * datetime.__lt__ * datetime.__ge__ * datetime.__gt__ These inconsistencies make it extremely difficult to provide an accurate stub for these methods in typeshed. ---------- components: Extension Modules, Library (Lib) messages: 406423 nosy: AlexWaygood, belopolsky, p-ganssle priority: normal severity: normal status: open title: Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:27:41 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 16 Nov 2021 19:27:41 +0000 Subject: [issue41260] datetime, date and time: strftime method takes different keyword argument: fmt (pure) or format (C) In-Reply-To: <1594314108.83.0.615817711225.issue41260@roundup.psfhosted.org> Message-ID: <1637090861.78.0.846930819221.issue41260@roundup.psfhosted.org> Alex Waygood added the comment: In addition to `date.strftime` and `time.strftime`, there is also a discrepancy in `datetime.fromtimestamp`. In the C implementation, the first parameter is called "timestamp"; in the pure-Python implementation, the first parameter is called "t". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:34:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 16 Nov 2021 19:34:03 +0000 Subject: [issue45292] Implement PEP 654: Exception Groups In-Reply-To: <1632667049.99.0.614000687095.issue45292@roundup.psfhosted.org> Message-ID: <1637091243.69.0.453842862005.issue45292@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +27824 pull_request: https://github.com/python/cpython/pull/29581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:39:26 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 19:39:26 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty Message-ID: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : When executing Py_CompileString with a source string that has a coding cookie, this is not respected as with the old parser. ---------- components: Parser messages: 406425 nosy: lys.nikolaou, pablogsal, twouters priority: normal severity: normal status: open title: Py_CompileString does not respect the coding cookie with the new parser if flags are empty versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:41:01 2021 From: report at bugs.python.org (Roxana 7) Date: Tue, 16 Nov 2021 19:41:01 +0000 Subject: [issue45823] phyton stopped working Message-ID: <1637091661.28.0.129849432506.issue45823@roundup.psfhosted.org> New submission from Roxana 7 : Hello everyone, I try to program a simple calculator for a university project but the sotfware always get an error window "phyton stopped working" when i add it on a IDE. I have reinstalled it so many times and it's always the same ---------- components: Windows messages: 406426 nosy: paul.moore, steve.dower, tim.golden, vicentpaul869, zach.ware priority: normal severity: normal status: open title: phyton stopped working type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:42:26 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 19:42:26 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637091746.03.0.997259905836.issue45822@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27825 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:45:26 2021 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 16 Nov 2021 19:45:26 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637091926.91.0.847266821878.issue45822@roundup.psfhosted.org> Thomas Wouters added the comment: Py_CompileString() in Python 3.9 and later, using the PEG parser, appears to no longer honours source encoding cookies. A reduced test case: #include "Python.h" #include const char *src = ( "# -*- coding: Latin-1 -*-\n" "'''\xc3'''\n"); int main(int argc, char **argv) { Py_Initialize(); PyObject *res = Py_CompileString(src, "some_path", Py_file_input); if (res) { fprintf(stderr, "Compile succeeded.\n"); return 0; } else { fprintf(stderr, "Compile failed.\n"); PyErr_Print(); return 1; } } Compiling and running the resulting binary with Python 3.8 (or earlier): % ./encoding_bug Compile succeeded. With 3.9 and PYTHONOLDPARSER=1: % PYTHONOLDPARSER=1 ./encoding_bug Compile succeeded. With 3.9 (without the env var) or 3.10: % ./encoding_bug Compile failed. File "some_path", line 2 '''?''' ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc3 in position 0: unexpected end of data Writing the same bytes to a file and making python3.9 or python3.10 import them works fine, as does passing the bytes to compile(): Python 3.10.0+ (heads/3.10-dirty:7bac598819, Nov 16 2021, 20:35:12) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> b = open('encoding_bug.py', 'rb').read() >>> b b"# -*- coding: Latin-1 -*-\n'''\xc3'''\n" >>> import encoding_bug >>> encoding_bug.__doc__ '?' >>> co = compile(b, 'some_path', 'exec') >>> co at 0x7f447e1b0c90, file "some_path", line 1> >>> co.co_consts[0] '?' It's just Py_CompileString() that fails. I don't understand why, and I do believe it's a regression. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:48:30 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 16 Nov 2021 19:48:30 +0000 Subject: [issue45819] Avoid releasing the GIL in nonblocking socket operations In-Reply-To: <1637088700.35.0.697825575179.issue45819@roundup.psfhosted.org> Message-ID: <1637092110.93.0.17995852608.issue45819@roundup.psfhosted.org> Change by Jim Crist-Harif : ---------- components: +asyncio -C API nosy: +asvetlov, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:52:01 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 19:52:01 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input Message-ID: <1637092321.17.0.719228525226.issue45820@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : New changeset df4ae55e66e34ea8de6a34f0b104871ddaf35d53 by Pablo Galindo Salgado in branch 'main': bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580) https://github.com/python/cpython/commit/df4ae55e66e34ea8de6a34f0b104871ddaf35d53 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:52:16 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Nov 2021 19:52:16 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input In-Reply-To: <1637092321.17.0.719228525226.issue45820@roundup.psfhosted.org> Message-ID: <1637092336.18.0.793184944987.issue45820@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27827 pull_request: https://github.com/python/cpython/pull/29584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:52:12 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Nov 2021 19:52:12 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input In-Reply-To: <1637092321.17.0.719228525226.issue45820@roundup.psfhosted.org> Message-ID: <1637092332.88.0.737791970944.issue45820@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27826 pull_request: https://github.com/python/cpython/pull/29583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:59:42 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 16 Nov 2021 19:59:42 +0000 Subject: [issue45823] phyton stopped working In-Reply-To: <1637091661.28.0.129849432506.issue45823@roundup.psfhosted.org> Message-ID: <1637092782.71.0.647224803692.issue45823@roundup.psfhosted.org> Steve Dower added the comment: It's impossible for us to tell what's causing this without much more information, but could you first try switching to Python 3.10? Even if we figured it out, we wouldn't be fixing 3.7 at this stage. If 3.10 still crashes, information about your OS, IDE, any packages you've installed, and any details you can find in Event Viewer (check the Application log) will be needed to track this down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 14:59:53 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Nov 2021 19:59:53 +0000 Subject: [issue37800] Clean up the documentation on module attributes Message-ID: <1637092793.51.0.535137873888.issue37800@roundup.psfhosted.org> New submission from miss-islington : New changeset d7e210070f915d8df5fa863ecba8628304ee1ded by G?ry Ogam in branch 'main': bpo-37800: Clean up importlib documentation for some module attributes (GH-10016) https://github.com/python/cpython/commit/d7e210070f915d8df5fa863ecba8628304ee1ded ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:10:58 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Nov 2021 20:10:58 +0000 Subject: [issue45819] Avoid releasing the GIL in nonblocking socket operations In-Reply-To: <1637088700.35.0.697825575179.issue45819@roundup.psfhosted.org> Message-ID: <1637093458.96.0.122710519187.issue45819@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 There is almost no upside for the current behavior. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:11:24 2021 From: report at bugs.python.org (Roxana 7) Date: Tue, 16 Nov 2021 20:11:24 +0000 Subject: [issue45823] phyton stopped working In-Reply-To: <1637091661.28.0.129849432506.issue45823@roundup.psfhosted.org> Message-ID: <1637093484.15.0.62225535589.issue45823@roundup.psfhosted.org> Roxana 7 added the comment: i'm using a low end laptop with windows 86x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:31:00 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 16 Nov 2021 20:31:00 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637094660.79.0.275256827924.issue45822@roundup.psfhosted.org> miss-islington added the comment: New changeset da20d7401de97b425897d3069f71f77b039eb16f by Pablo Galindo Salgado in branch 'main': bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582) https://github.com/python/cpython/commit/da20d7401de97b425897d3069f71f77b039eb16f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 15:58:41 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Nov 2021 20:58:41 +0000 Subject: [issue28533] Remove asyncore, asynchat and smtpd modules In-Reply-To: <1477420324.44.0.338895938894.issue28533@psf.upfronthosting.co.za> Message-ID: <1637096321.29.0.651540140685.issue28533@roundup.psfhosted.org> STINNER Victor added the comment: About the PEP 387 process, Brett wrote on python-dev that "the modules got yanked prematurely", so I formally requested a SC exception: https://github.com/python/steering-council/issues/86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:35:43 2021 From: report at bugs.python.org (E. Paine) Date: Tue, 16 Nov 2021 21:35:43 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1637098543.81.0.674789127886.issue45796@roundup.psfhosted.org> E. Paine added the comment: > please don't declare this "not a bug" until you've tested it on Windows Sorry, I didn't explain my reasoning for that resolution. I did test it on Windows, but my trail of though went something like: "unexpected behaviour doesn't necessarily mean it's a bug". You are right, though, and a resolution of "third party" would be more suitable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:44:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Nov 2021 21:44:22 +0000 Subject: [issue45819] Avoid releasing the GIL in nonblocking socket operations In-Reply-To: <1637088700.35.0.697825575179.issue45819@roundup.psfhosted.org> Message-ID: <1637099062.39.0.0823244561745.issue45819@roundup.psfhosted.org> Christian Heimes added the comment: Do POSIX and Windows APIs guarantee that operations on a nonblocking socket can never ever block? We cannot safely keep the GIL unless you can turn "nonblocking socket operations by definition shouldn't block" into "standard guarantees that nonblocking socket operations never block". ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 16:59:21 2021 From: report at bugs.python.org (firewave) Date: Tue, 16 Nov 2021 21:59:21 +0000 Subject: [issue45789] Python execution broken after update via Windows Store In-Reply-To: <1636661843.78.0.241514284598.issue45789@roundup.psfhosted.org> Message-ID: <1637099961.55.0.0896520670789.issue45789@roundup.psfhosted.org> firewave added the comment: Today 3.9.2544.0 was automatically installed on my system. Interestingly it did not update the broken "python3.9.exe" appexec links. The timestamp is still from the last update and the links still point to 3.9.2032.0. All other links were updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:15:53 2021 From: report at bugs.python.org (Wesley Altham) Date: Tue, 16 Nov 2021 22:15:53 +0000 Subject: [issue45824] CSV module document does not include how to append files Message-ID: <1637100953.03.0.703206320049.issue45824@roundup.psfhosted.org> New submission from Wesley Altham : easy- The CSV module does not include how to append a file which is using 'a' and not 'w' or 'r'. There might be more to appending but it is not documented for me to know, I saw a stackoverflow post about it when I looked and I tried it and worked. I hope whoever knows the CSV module could document append at all. ---------- messages: 406438 nosy: wesrl priority: normal severity: normal status: open title: CSV module document does not include how to append files type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:31:49 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 22:31:49 +0000 Subject: [issue45716] Confusing parsing error message when trying to use True as keyword argument In-Reply-To: <1636047949.0.0.244366488793.issue45716@roundup.psfhosted.org> Message-ID: <1637101909.77.0.398664901211.issue45716@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 5618c81e139419b4665dc1f1e8a468738546f542 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-45716: Improve the error message when using True/False/None as keywords in a call (GH-29413). (GH-29428) https://github.com/python/cpython/commit/5618c81e139419b4665dc1f1e8a468738546f542 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:34:20 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 22:34:20 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637102060.24.0.181159218823.issue45822@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27828 pull_request: https://github.com/python/cpython/pull/29585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:36:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 22:36:10 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637102170.36.0.225091249285.issue45822@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 Nov 16 17:37:44 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 16 Nov 2021 22:37:44 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637102264.51.0.932156054151.issue45822@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27829 pull_request: https://github.com/python/cpython/pull/29586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:37:55 2021 From: report at bugs.python.org (Wesley Altham) Date: Tue, 16 Nov 2021 22:37:55 +0000 Subject: [issue45824] CSV module document does not include how to append files In-Reply-To: <1637100953.03.0.703206320049.issue45824@roundup.psfhosted.org> Message-ID: <1637102275.32.0.438312989743.issue45824@roundup.psfhosted.org> Wesley Altham added the comment: I now see other things on it but I think the doc should have it as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:43:35 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Nov 2021 22:43:35 +0000 Subject: [issue45824] CSV module document does not include how to append files In-Reply-To: <1637100953.03.0.703206320049.issue45824@roundup.psfhosted.org> Message-ID: <1637102615.58.0.897167380322.issue45824@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't think that is the job of CSV docs. Appending is a general skill and not specific to that module. Likewise, the CSV module docs don't cover other general file manipulation skills like closing, using seek() to rewind, manipulating filenames and paths, setting permissions, etc. The csv.writer docs seem reasonable to me: """Return a writer object responsible for converting the user?s data into delimited strings on the given file-like object. csvfile can be any object with a write() method.""" ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 17:55:57 2021 From: report at bugs.python.org (Chris Eykamp) Date: Tue, 16 Nov 2021 22:55:57 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1637098543.81.0.674789127886.issue45796@roundup.psfhosted.org> Message-ID: Chris Eykamp added the comment: Thanks for the clarification. I don't want to belabor the point, but if you observe what happens as you hit tab and cycle through the widgets, the way the color changes cannot be intended behavior, and makes no sense from any rational UI perspective. I do accept that it may not be a Python bug (though I don't really know); I do not understand the relationship between Python and Tcl in terms of who is responsible for what. But regardless, I filed a bug report at the URL you provided. I don't know if they accept documentation of problems written in Python, and I cannot write the code in Tcl, but we'll find out in a day or two (I hope). Thanks again! On Tue, Nov 16, 2021, at 13:35, E. Paine wrote: > E. Paine added the comment: > >> please don't declare this "not a bug" until you've tested it on Windows > > Sorry, I didn't explain my reasoning for that resolution. I did test it > on Windows, but my trail of though went something like: "unexpected > behaviour doesn't necessarily mean it's a bug". You are right, though, > and a resolution of "third party" would be more suitable. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 20:55:46 2021 From: report at bugs.python.org (Bill Borskey) Date: Wed, 17 Nov 2021 01:55:46 +0000 Subject: [issue45825] Heap Segmentation Fault Message-ID: <1637114146.37.0.859649606626.issue45825@roundup.psfhosted.org> New submission from Bill Borskey : Dereferencing a python object that does not exist through ctypes caused a segfault in pymalloc_alloc. rdi: 0x0000000000000006 rsi: 0x0000000000000006 0 org.python.python 0x00000001081ee277 pymalloc_alloc + 74 1 org.python.python 0x00000001081ed3dc _PyObject_Malloc + 17 2 org.python.python 0x0000000108296a94 normalizestring + 55 3 org.python.python 0x0000000108296540 _PyCodec_Lookup + 76 Looks like six was passed to the allocator, not sure exactly what was written to it, or if I can control that. But I guess it was more than six bytes. I don't have the id I used with the debug info above, but: I had a smallish list of characters, overwrote it with zeros, called del on it. I checked the value a couple times with ctypes. What I think happened is the garbage collector finally reclaimed the memory and crashed when I dereferenced again with the bad value. I checked it out using 0xCC to get an idea of where the value was landing, and I'm overwriting rbx directly. But it doesn't get as far as above and segfaults at O_get rather than the allocator. I looked and I see this function: static PyObject * O_get(void *ptr, Py_ssize_t size) { PyObject *ob = *(PyObject **)ptr; if (ob == NULL) { if (!PyErr_Occurred()) /* Set an error if not yet set */ PyErr_SetString(PyExc_ValueError, "PyObject is NULL"); return NULL; } Py_INCREF(ob); return ob; } Seems like the code is increasing the reference count on the non-existing python object at 0xCCCCCCCCCCCCCCCC and writing out of bounds. $ python3 -X dev Python 3.9.2 (default, Mar 26 2021, 23:27:12) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes >>> ctypes.cast(0xCCCCCCCCCCCCCCCC, ctypes.py_object).value Fatal Python error: Segmentation fault (below does not have the heap debugger on it seemed to mess with results) Current thread 0x0000000104b83dc0 (most recent call first): File "", line 1 in Segmentation fault: 11 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x000000010e1be8c0 rbx: 0xcccccccccccccccc rcx: 0x000000010e2775c9 rdx: 0x000000010e283890 rdi: 0x000000010e1be8c0 rsi: 0x0000000000000008 rbp: 0x00007ffee20f24e0 rsp: 0x00007ffee20f24d0 r8: 0x0000000000000004 r9: 0x6a2bff3e46d2619c r10: 0x000000010e1d4b80 r11: 0x000000010e1d4bb8 r12: 0x000000010defc5e0 r13: 0x00007f94edc5c390 r14: 0x000000010e1e1b90 r15: 0x0000000000000000 rip: 0x000000010e2775d7 rfl: 0x0000000000010286 cr2: 0x000000010e2730f3 ---------- components: ctypes files: debug.txt messages: 406443 nosy: thewb priority: normal severity: normal status: open title: Heap Segmentation Fault type: crash versions: Python 3.9 Added file: https://bugs.python.org/file50444/debug.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 21:14:43 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Nov 2021 02:14:43 +0000 Subject: [issue45760] Remove "PyNumber_InMatrixMultiply" In-Reply-To: <1636418955.82.0.973177651555.issue45760@roundup.psfhosted.org> Message-ID: <1637115283.09.0.00564585795569.issue45760@roundup.psfhosted.org> Raymond Hettinger added the comment: Alternatively, fix the misspelling in the macro and delete the redundant expanded code below. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 21:50:58 2021 From: report at bugs.python.org (Xinmeng Xia) Date: Wed, 17 Nov 2021 02:50:58 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. Message-ID: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> New submission from Xinmeng Xia : In Python 3.11, unittest.assertRaisesRegex is broken and leading to crashing if tested regex does not match name. See the following example: test.py ========================================= import unittest class uTest(unittest.TestCase): pass uTest = uTest() with uTest.assertRaisesRegex(Exception, 'aaa'): aab ========================================= Output in Python3.9.2, 3.10: -------------------------------------- NameError: name 'aab' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/xxm/Desktop/test.py", line 29, in aab File "/usr/local/python310/lib/python3.10/unittest/case.py", line 239, in __exit__ self._raiseFailure('"{}" does not match "{}"'.format( File "/usr/local/python310/lib/python3.10/unittest/case.py", line 163, in _raiseFailure raise self.test_case.failureException(msg) AssertionError: "aaa" does not match "name 'aab' is not defined -------------------------------------------------- Actual output in Python3.11.0a1,Python3.11.0a2: Segmentation fault (core dumped) System: Ubuntu 16.04 ---------- components: Library (Lib) messages: 406445 nosy: xxm priority: normal severity: normal status: open title: unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. type: crash versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:31:40 2021 From: report at bugs.python.org (Ma Lin) Date: Wed, 17 Nov 2021 03:31:40 +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: <1637119900.05.0.993821927301.issue41735@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +27830 pull_request: https://github.com/python/cpython/pull/29587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:41:00 2021 From: report at bugs.python.org (Ma Lin) Date: Wed, 17 Nov 2021 03:41:00 +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: <1637120460.65.0.240695205215.issue41735@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +27831 pull_request: https://github.com/python/cpython/pull/29588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 22:57:55 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Nov 2021 03:57:55 +0000 Subject: [issue38625] SpooledTemporaryFile does not seek correctly after being rolled over In-Reply-To: <1572306406.72.0.0542092082155.issue38625@roundup.psfhosted.org> Message-ID: <1637121475.55.0.87015223977.issue38625@roundup.psfhosted.org> Inada Naoki added the comment: Is this bug fixed by #26730? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:05:37 2021 From: report at bugs.python.org (Ma Lin) Date: Wed, 17 Nov 2021 04:05:37 +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: <1637121937.81.0.856306707638.issue41735@roundup.psfhosted.org> Ma Lin added the comment: Sorry, I found an omission. The previous PRs fixed the bug in these methods: zlib.Compress.compress() zlib.Decompress.decompress() This method also has this bug, fix in PR29587 (main/3.10) and PR29588 (3.9-): zlib.Decompress.flush() Attached file `test_flush.py` can reliably reproduce the bug. This time I carefully checked bz2/lzma/zlib modules, it should be no problem anymore. Gregory P. Smith should understand these codes, add him to nosy list. ---------- nosy: +gregory.p.smith resolution: fixed -> later status: closed -> open Added file: https://bugs.python.org/file50445/test_flush.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:08:21 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Nov 2021 04:08:21 +0000 Subject: [issue38625] SpooledTemporaryFile does not seek correctly after being rolled over In-Reply-To: <1572306406.72.0.0542092082155.issue38625@roundup.psfhosted.org> Message-ID: <1637122101.39.0.135453909477.issue38625@roundup.psfhosted.org> Inada Naoki added the comment: I confirmed that this bug is fixed, but I found another error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:08:52 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Nov 2021 04:08:52 +0000 Subject: [issue38625] SpooledTemporaryFile does not seek correctly after being rolled over In-Reply-To: <1572306406.72.0.0542092082155.issue38625@roundup.psfhosted.org> Message-ID: <1637122132.2.0.444815679559.issue38625@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:28:37 2021 From: report at bugs.python.org (Jamie Chaisson) Date: Wed, 17 Nov 2021 04:28:37 +0000 Subject: [issue45827] Unittest - commenting passing tests cause previous failing tests to pass Message-ID: <1637123317.28.0.291429551369.issue45827@roundup.psfhosted.org> New submission from Jamie Chaisson : Ubuntu Release 20.04.3 LTS (Focal Fossa) 64-bit Using unittest, testing with assertEqual on int values and known good output. Unittest produces one-off error on handful of edge-case tests causing assert to fail. Commenting out passing assertEquals tests to isolate failing tests causes previous failing tests to pass (reproducible). All input values produce output values when testing by hand, only different when using unittest. Pardon the homework. Removing the class and moving member variables into my_datetime function resolves the issue; however, the behavior as written should not be happening. ---------- components: Tests files: tests.py messages: 406449 nosy: nuse priority: normal severity: normal status: open title: Unittest - commenting passing tests cause previous failing tests to pass type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file50446/tests.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:29:47 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Nov 2021 04:29:47 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637123387.39.0.378349211881.issue45826@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Running it in debug build mode ./python -X dev ../bpo45826.py python: Python/suggestions.c:215: offer_suggestions_for_name_error: Assertion `frame != NULL' failed. Fatal Python error: Aborted Current thread 0x00007f4c717f3280 (most recent call first): [1] 15180 abort (core dumped) ./python -X dev ../bpo45826.py ---------- nosy: +pablogsal, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:37:46 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 17 Nov 2021 04:37:46 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637123866.89.0.393774226817.issue45826@roundup.psfhosted.org> Dennis Sweeney added the comment: I got a segfault in a similar location: static PyObject * offer_suggestions_for_name_error(PyNameErrorObject *exc) { PyObject *name = exc->name; // borrowed reference PyTracebackObject *traceback = (PyTracebackObject *) exc->traceback; // borrowed reference // Abort if we don't have a variable name or we have an invalid one // or if we don't have a traceback to work with if (name == NULL || traceback == NULL || !PyUnicode_CheckExact(name)) { return NULL; } // Move to the traceback of the exception while (traceback->tb_next != NULL) { <<<<<<<<<<<<<<< segfault: traceback is junk (but not null) pointer traceback = traceback->tb_next; } ... Adding ```assert(Py_TYPE(exc) == PyExc_NameError);``` fails, so somehow something is getting cast to ```PyNameErrorObject *``` when it shouldn't be. Here is some debugging code I used that also causes the crash: ---------------------------------------------- from unittest import TestCase from unittest.case import _AssertRaisesContext import sys import traceback manager = _AssertRaisesContext(Exception, TestCase(), 'aaa') # inline this: # with manager: # aab try: aab except: # inline __exit__ exc_type, exc_value, tb = sys.exc_info() traceback.clear_frames(tb) manager.exception = exc_value.with_traceback(None) output = '"{}" does not match "{}"'.format( manager.expected_regex.pattern, str(exc_value)) # inline manager._raiseFailure(output) msg = manager.test_case._formatMessage(manager.msg, output) print("A:", f"{msg=!r}") e = manager.test_case.failureException(msg) print("B:", f"{e=!r}") raise e # Output: # A: msg='"aaa" does not match "name \'aab\' is not defined"' # B: e=AssertionError('"aaa" does not match "name \'aab\' is not defined"') ----------------------------------------------- ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:38:10 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 17 Nov 2021 04:38:10 +0000 Subject: [issue45756] mock raises exception when using a spec with an attribute that raises exception on access In-Reply-To: <1636400873.51.0.88200985051.issue45756@roundup.psfhosted.org> Message-ID: <1637123890.54.0.181080293742.issue45756@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to be similar to https://bugs.python.org/issue41768 . ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:46:11 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 17 Nov 2021 04:46:11 +0000 Subject: [issue45827] Unittest - commenting passing tests cause previous failing tests to pass In-Reply-To: <1637123317.28.0.291429551369.issue45827@roundup.psfhosted.org> Message-ID: <1637124371.44.0.772122569534.issue45827@roundup.psfhosted.org> Steven D'Aprano added the comment: At a quick glance, I am 95% sure the problem lies in these two snippets of your code, not unittest: class My_Time: months = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] if is_leapyr(year): my_time.months[1] = 29 The first snippet makes months, a mutable list, a class attribute, which means it is shared by all instances of the class. The second snippet mutates that list, which means every single instance will see the same value. So commenting out some tests will change whether or not the shared list gets mutated, which will change whether or not other tests pass or fail. I think the smallest change you need make to fix your code is to put the initialisation of My_Time into an `__init__` method, so that the attributes (including the list) are no longer shared between all instances. class My_Time: def __init__(self): ... ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 16 23:53:55 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 17 Nov 2021 04:53:55 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637124835.79.0.159914308277.issue45826@roundup.psfhosted.org> Dennis Sweeney added the comment: Here's shorter reproducer not involving unittest: import sys try: aab except: exc_type, exc_value, tb = sys.exc_info() exc_value.with_traceback(None) raise ZeroDivisionError() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 00:49:37 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 17 Nov 2021 05:49:37 +0000 Subject: [issue38625] SpooledTemporaryFile does not seek correctly after being rolled over In-Reply-To: <1572306406.72.0.0542092082155.issue38625@roundup.psfhosted.org> Message-ID: <1637128177.51.0.860061157094.issue38625@roundup.psfhosted.org> Inada Naoki added the comment: The another error I found is already reported as #42868. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 00:58:06 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 17 Nov 2021 05:58:06 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637128686.84.0.847391268427.issue45826@roundup.psfhosted.org> Dennis Sweeney added the comment: Even shorter reproducer: ----------------------------- try: aab except BaseException as E: E.with_traceback(None) raise ZeroDivisionError() ----------------------------- Bisection points to the initial implementation of suggestions.c: 5bf8bf2267cd109970b2d946d43b2e9f71379ba2 is the first bad commit commit 5bf8bf2267cd109970b2d946d43b2e9f71379ba2 Author: Pablo Galindo Date: Wed Apr 14 15:10:33 2021 +0100 bpo-38530: Offer suggestions on NameError (GH-25397) When printing NameError raised by the interpreter, PyErr_Display will offer suggestions of simmilar variable names in the function that the exception was raised from: >>> schwarzschild_black_hole = None >>> schwarschild_black_hole Traceback (most recent call last): File "", line 1, in NameError: name 'schwarschild_black_hole' is not defined. Did you mean: schwarzschild_black_hole? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 01:09:41 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Nov 2021 06:09:41 +0000 Subject: [issue45827] Unittest - commenting passing tests cause previous failing tests to pass In-Reply-To: <1637123317.28.0.291429551369.issue45827@roundup.psfhosted.org> Message-ID: <1637129381.12.0.572297772975.issue45827@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 01:44:09 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 17 Nov 2021 06:44:09 +0000 Subject: [issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION In-Reply-To: <1633940907.8.0.793399065339.issue45429@roundup.psfhosted.org> Message-ID: <1637131449.53.0.703414386362.issue45429@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +27832 pull_request: https://github.com/python/cpython/pull/29589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 02:58:41 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Wed, 17 Nov 2021 07:58:41 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637135921.9.0.248157971203.issue45826@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch pull_requests: +27833 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 03:54:50 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 17 Nov 2021 08:54:50 +0000 Subject: [issue45126] [sqlite3] cleanup and harden Connection and Cursor __init__ In-Reply-To: <1631015162.08.0.638095834379.issue45126@roundup.psfhosted.org> Message-ID: <1637139290.63.0.0586225910097.issue45126@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:08:39 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Nov 2021 09:08:39 +0000 Subject: [issue28806] Improve the netrc library In-Reply-To: <1480158810.39.0.736994382472.issue28806@psf.upfronthosting.co.za> Message-ID: <1637140119.78.0.0670963152466.issue28806@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 15409c720be0503131713e3d3abc1acd0da07378 by Emmanuel Arias in branch 'main': bpo-28806: Continue work: improve the netrc library (GH-26330) https://github.com/python/cpython/commit/15409c720be0503131713e3d3abc1acd0da07378 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:09:34 2021 From: report at bugs.python.org (Shantanu) Date: Wed, 17 Nov 2021 09:09:34 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1637140174.35.0.568908604991.issue40059@roundup.psfhosted.org> Shantanu added the comment: I'd love it if we could make this happen for Python 3.11. What can I do to help, e.g. would it be helpful if I drafted a PEP? Several projects have switched to using tomli (https://github.com/hukkin/tomli), which is fully compatible with TOML v1.0.0 and is maybe 800 LoC with claimed 100% branch coverage. There's also tomlkit, which has been around for longer, but is perhaps larger and more feature-ful than we'd want in stdlib, e.g. it allows you to roundtrip dump and load TOML documents preserving comments, whitespace, etc. ---------- nosy: +hauntsaninja _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:12:58 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 17 Nov 2021 09:12:58 +0000 Subject: [issue28806] Improve the netrc library In-Reply-To: <1480158810.39.0.736994382472.issue28806@psf.upfronthosting.co.za> Message-ID: <1637140378.67.0.644029736053.issue28806@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.11 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:42:19 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 17 Nov 2021 09:42:19 +0000 Subject: [issue45828] [sqlite3] use unraisable exceptions in callbacks Message-ID: <1637142139.17.0.325447635638.issue45828@roundup.psfhosted.org> New submission from Erlend E. Aasland : In order to print tracebacks from exceptions in SQLite callbacks, the sqlite3 extension module provides sqlite3.enable_callback_tracebacks(flag). Setting the flag to True instructs the sqlite3 extension module to PyErr_Print() if an exception occurs during a callback. Else, PyErr_Clear() is called. >From the sqlite3.enable_callback_tracebacks() docs: By default you will not get any tracebacks in user-defined functions, aggregates, converters, authorizer callbacks etc. If you want to debug them, you can call this function with flag set to True. Afterwards, you will get tracebacks from callbacks on sys.stderr. Use False to disable the feature again. Few other exceptions use a similar approach: $ grep -r PyErr_Print Modules Modules/_tkinter.c: PyErr_Print(); Modules/_testcapimodule.c: PyErr_Print(); Modules/main.c: PyErr_Print(); Modules/main.c: PyErr_Print(); Modules/main.c: PyErr_Print(); Modules/_io/bytesio.c: PyErr_Print(); Modules/_sqlite/connection.c: PyErr_Print(); Modules/_sqlite/cursor.c: PyErr_Print(); Modules/_xxtestfuzz/fuzzer.c: PyErr_Print(); Modules/_xxtestfuzz/fuzzer.c: PyErr_Print(); Modules/_xxtestfuzz/fuzzer.c: PyErr_Print(); Modules/_xxtestfuzz/fuzzer.c: PyErr_Print(); Modules/_xxtestfuzz/fuzzer.c: PyErr_Print(); Modules/_xxtestfuzz/fuzzer.c: PyErr_Print(); Modules/_xxtestfuzz/fuzzer.c: PyErr_Print(); Modules/_ctypes/callbacks.c: PyErr_Print(); We get a higher hit for unraisable exceptions: $ grep -r PyErr_WriteUnraisable Modules | wc -l 45 AFAICS, using unraisable exceptions is a better approach. Current behaviour: Python 3.10.0 (v3.10.0:b494f5935c, Oct 4 2021, 14:59:20) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> cx = sqlite3.connect(":memory:") >>> cx.set_trace_callback(lambda stmt: 5/0) >>> cx.execute("select 1") >>> sqlite3.enable_callback_tracebacks(True) >>> cx.execute("select 1") Traceback (most recent call last): File "", line 1, in ZeroDivisionError: division by zero With unraisable exceptions: Python 3.11.0a2+ (heads/sqlite-unraisable-exceptions-dirty:de29590d6a, Nov 17 2021, 10:29:19) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> cx = sqlite3.connect(":memory:") >>> cx.set_trace_callback(lambda stmt: 5/0) >>> cx.execute("select 1") >>> sqlite3.enable_callback_tracebacks(True) >>> cx.execute("select 1") Exception ignored in: at 0x10b4e3ee0> Traceback (most recent call last): File "", line 1, in ZeroDivisionError: division by zero The user experience is mostly unchanged; we get one extra line, telling us that the exception was ignored. Also, users can now use sys.unraisablehook: >>> sys.unraisablehook = lambda unraisable: print(unraisable) >>> cx.execute("select 1") UnraisableHookArgs(exc_type=, exc_value=ZeroDivisionError('division by zero'), exc_traceback=, err_msg=None, object= at 0x10b4e3ee0>) The only question I have, is if we should deprecate sqlite3.enable_callback_tracebacks() after switching to unraisable exceptions. ---------- components: Extension Modules messages: 406459 nosy: erlendaasland priority: normal severity: normal status: open title: [sqlite3] use unraisable exceptions in callbacks versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:42:52 2021 From: report at bugs.python.org (Gareth Rees) Date: Wed, 17 Nov 2021 09:42:52 +0000 Subject: [issue45643] SIGSTKFLT is missing from the signals module on Linux In-Reply-To: <1635417063.88.0.746261778756.issue45643@roundup.psfhosted.org> Message-ID: <1637142172.88.0.680228848602.issue45643@roundup.psfhosted.org> Gareth Rees added the comment: Tagging vstinner as you have touched Modules/signalmodule.c a few times in the last year. What do you think? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:44:48 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 17 Nov 2021 09:44:48 +0000 Subject: [issue45828] [sqlite3] use unraisable exceptions in callbacks In-Reply-To: <1637142139.17.0.325447635638.issue45828@roundup.psfhosted.org> Message-ID: <1637142288.02.0.406876375233.issue45828@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:47:14 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 17 Nov 2021 09:47:14 +0000 Subject: [issue45828] [sqlite3] use unraisable exceptions in callbacks In-Reply-To: <1637142139.17.0.325447635638.issue45828@roundup.psfhosted.org> Message-ID: <1637142434.33.0.881823632094.issue45828@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- keywords: +patch pull_requests: +27834 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:50:11 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 17 Nov 2021 09:50:11 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR Message-ID: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> New submission from Mark Shannon : We can remove the C stack use and general overhead of calling special methods implemented in Python for attribute access and indexing. Each operation has a special method that implements it. When that special method is implemented in Python, we should avoid the `tp_xxx` slot machinery and use the same mechanism we use for normal calls to Python functions. * BINARY_SUBSCR: `__getitem__` * STORE_SUBSCR: `__setitem__` * LOAD_ATTR: `__getattribute__` (and maybe `__getattr__`) * STORE_ATTR: `__setattr__` It probably isn't worth bothering with the deletion forms. The getters (`__getitem__` and `__getattribute__`) are relatively simple, as the call returns the result. The setters are a bit more complicated as the return value needs to be discarded, so an additional frame which discards the result of the call needs to be inserted. ---------- assignee: Mark.Shannon components: Interpreter Core messages: 406461 nosy: Mark.Shannon, brandtbucher, pablogsal priority: normal severity: normal status: open title: Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 04:52:37 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 17 Nov 2021 09:52:37 +0000 Subject: [issue45256] Remove the usage of the C stack in Python to Python calls In-Reply-To: <1632220919.85.0.309558064668.issue45256@roundup.psfhosted.org> Message-ID: <1637142757.86.0.961064782706.issue45256@roundup.psfhosted.org> Mark Shannon added the comment: https://bugs.python.org/issue45829 is the related issue for special methods ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 05:01:59 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 17 Nov 2021 10:01:59 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637143319.35.0.219255892151.issue45512@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 5f9247e36a0213b0dcfd43533db5cf6570895cfd by Erlend Egeberg Aasland in branch 'main': bpo-45512: Extend `sqlite3` test suite regarding isolation levels (GH-29576) https://github.com/python/cpython/commit/5f9247e36a0213b0dcfd43533db5cf6570895cfd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 05:07:30 2021 From: report at bugs.python.org (Ma Lin) Date: Wed, 17 Nov 2021 10:07:30 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1637143650.8.0.72180435235.issue45816@roundup.psfhosted.org> Ma Lin added the comment: There are 5 link errors when building the PGO build. Command: build --pgo ---------- nosy: +malin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 05:13:11 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 17 Nov 2021 10:13:11 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1637143991.12.0.705425284234.issue45829@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +27835 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 05:54:09 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 17 Nov 2021 10:54:09 +0000 Subject: [issue45824] CSV module document does not include how to append files In-Reply-To: <1637100953.03.0.703206320049.issue45824@roundup.psfhosted.org> Message-ID: <1637146449.11.0.716092367579.issue45824@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with Raymond. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 06:44:14 2021 From: report at bugs.python.org (Gaige Paulsen) Date: Wed, 17 Nov 2021 11:44:14 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637149454.01.0.712115870821.issue39026@roundup.psfhosted.org> Gaige Paulsen added the comment: Short version is not yet. I spent time on it but ran into an issue getting the full build on the machine I was building on. I expect to try it again before the weekend. Is there a binary copy of the framework from the CI somewhere? If so, I can certainly do a much faster check against building with the framework, saving me the step I'm having problem with right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 07:45:37 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 17 Nov 2021 12:45:37 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1637153137.92.0.109431400329.issue40059@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 07:47:34 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 17 Nov 2021 12:47:34 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637153254.47.0.642552661417.issue45512@roundup.psfhosted.org> Dong-hee Na added the comment: @erlendaasland Now we close this issue right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 07:47:39 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 17 Nov 2021 12:47:39 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637153259.99.0.120195532625.issue45512@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset e002bbc6cce637171fb2b1391ffeca8643a13843 by Dong-hee Na in branch 'main': bpo-45512: Simplify manage isolation level (GH-29562) https://github.com/python/cpython/commit/e002bbc6cce637171fb2b1391ffeca8643a13843 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 07:57:40 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 17 Nov 2021 12:57:40 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637153860.27.0.0810656677406.issue45512@roundup.psfhosted.org> Erlend E. Aasland added the comment: > Now we close this issue right? Not yet ;) I have an AC tweak I'd like to add. Wait for a PR anytime soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 08:04:20 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Wed, 17 Nov 2021 13:04:20 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637154260.84.0.73810483693.issue45512@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27836 pull_request: https://github.com/python/cpython/pull/29593 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 09:08:53 2021 From: report at bugs.python.org (Zachary Ware) Date: Wed, 17 Nov 2021 14:08:53 +0000 Subject: [issue45825] Heap Segmentation Fault In-Reply-To: <1637114146.37.0.859649606626.issue45825@roundup.psfhosted.org> Message-ID: <1637158133.3.0.177617094312.issue45825@roundup.psfhosted.org> Zachary Ware added the comment: In general, as soon as you touch ctypes you're on your own :). ctypes has no protections for this kind of case, so you need to protect yourself. If you came across this some way that *should* have been safe, please provide more information. But just passing a random memory address to ctypes is likely to cause segfaults or worse. ---------- nosy: +zach.ware resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 09:26:10 2021 From: report at bugs.python.org (neonene) Date: Wed, 17 Nov 2021 14:26:10 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1637159170.1.0.96621397837.issue45116@roundup.psfhosted.org> neonene added the comment: Here are the 3 steps to reproduce with minimal pgo training. (vs2019) 1. Download the source archive of PR29565 and extract. https://github.com/python/cpython/archive/6a84d61c55f2e543cf5fa84522d8781a795bba33.zip 2. Apply the following patch. ============================== --- PCbuild/build.bat +++ PCbuild/build.bat @@ -66 +66 @@ -set pgo_job=-m test --pgo +set pgo_job=-c"pass" --- PCbuild/pyproject.props +++ PCbuild/pyproject.props @@ -47,2 +47,3 @@ /utf-8 %(AdditionalOptions) + /d2inlinelogfull:_PyEval_EvalFrameDefault %(AdditionalOptions) ============================== 3. Build [Rebuild] PCbuild\build --no-tkinter --pgo > build.log [-r] According to the inlining section in the log, any function that has one or more conditional expressions got "reject" from inliner. > Inlinee for function _PyEval_EvalFrameDefault > -_Py_EnsureFuncTstateNotNULL (pgo hard reject) > ... > _Py_INCREF (pgu decision) > _Py_INCREF (pgu decision) > -_Py_XDECREF (pgo hard reject) > -_Py_XDECREF (pgo hard reject) > -_Py_DECREF (pgo hard reject) > -_Py_DECREF (pgo hard reject) > ... Profiling scores can be shown on VS2019 Command Prompt. pgomgr PCbuild\amd64\python311.pgd /summary [/detail] > largefile.txt * pgomgr.exe (or profile itself) has an issue. https://developercommunity.visualstudio.com/t/1560909 Unused opcodes in this training ROT_THREE, DUP_TOP_TWO, UNARY_POSITIVE, UNARY_NEGATIVE, BINARY_OP_ADD_FLOAT, UNARY_INVERT, BINARY_OP_MULTIPLY_INT, BINARY_OP_MULTIPLY_FLOAT, GET_LEN, MATCH_MAPPING, MATCH_SEQUENCE, MATCH_KEYS, LOAD_ATTR_SLOT, LOAD_METHOD_CLASS, GET_AITER, GET_ANEXT, BEFORE_ASYNC_WITH, END_ASYNC_FOR, STORE_ATTR_SLOT, STORE_ATTR_WITH_HINT, GET_YIELD_FROM_ITER, PRINT_EXPR, YIELD_FROM, GET_AWAITABLE, LOAD_ASSERTION_ERROR, SETUP_ANNOTATIONS, UNPACK_EX, DELETE_ATTR, DELETE_GLOBAL, ROT_N, COPY, DELETE_DEREF, LOAD_CLASSDEREF, MATCH_CLASS, SET_UPDATE, DO_TRACING I managed to activate inliner experimentally by removing the 36 op-cases from switch and merging/removing many macros. Static instruction counts of _PyEval_EvalFrameDefault() PR29565 : 6882 (down to 4400 with above change) PR29482 : 7035 PR29482~1 : 7742 3.10.0+ : 3980 (well inlined sharing DISPATCH macro) 3.10.0 : 5559 3.10b1 : 5680 3.10a7 : 4117 (well inlined) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 09:44:46 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Nov 2021 14:44:46 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637160286.56.0.220501872873.issue45573@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27837 pull_request: https://github.com/python/cpython/pull/29594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 10:11:42 2021 From: report at bugs.python.org (Bill Borskey) Date: Wed, 17 Nov 2021 15:11:42 +0000 Subject: [issue45825] Heap Segmentation Fault In-Reply-To: <1637158133.3.0.177617094312.issue45825@roundup.psfhosted.org> Message-ID: <97BC979B-414C-48FC-A56D-51F2E19B1EFE@gmail.com> Bill Borskey added the comment: No worries. I find bugs in my day job, thought this might be a useful segfault but it segfaults because it?s incrementing that reference count on the pyobj that don?t exist. So pretty lame. I did spend an hour tracking it down so I thought I?d let y?all know in case you wanted to fix it. Cheers > On Nov 17, 2021, at 6:08 AM, Zachary Ware wrote: > > > Zachary Ware added the comment: > > In general, as soon as you touch ctypes you're on your own :). ctypes has no protections for this kind of case, so you need to protect yourself. > > If you came across this some way that *should* have been safe, please provide more information. But just passing a random memory address to ctypes is likely to cause segfaults or worse. > > ---------- > nosy: +zach.ware > resolution: -> not a bug > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 10:16:10 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Nov 2021 15:16:10 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1637162170.45.0.841289199509.issue45829@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 10:58:20 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Nov 2021 15:58:20 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1637164700.14.0.587141635999.issue45829@roundup.psfhosted.org> Guido van Rossum added the comment: Of these, presumably LOAD_GETATTR is by far the most used, so should we try that first? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 11:16:42 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Nov 2021 16:16:42 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1637165802.17.0.663036703455.issue45116@roundup.psfhosted.org> Steve Dower added the comment: > -set pgo_job=-m test --pgo > +set pgo_job=-c"pass" This essentially disables PGO. You won't get anything valid or useful from analysing its results if you don't give it a somewhat reasonable profile (preferably one that exercises the interpreter loop, which "pass" does not). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 11:17:03 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Nov 2021 16:17:03 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1637165823.14.0.923275558038.issue45816@roundup.psfhosted.org> Steve Dower added the comment: Could you post the errors? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 11:19:19 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 17 Nov 2021 16:19:19 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1637165959.21.0.0524334712961.issue45829@roundup.psfhosted.org> Mark Shannon added the comment: I don't think it matter much which we do first. I happened to do BINARY_SUBSCR first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 11:32:32 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Nov 2021 16:32:32 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1637166752.24.0.782152999996.issue45829@roundup.psfhosted.org> Guido van Rossum added the comment: That's a good one too, and perhaps simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 11:42:22 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 17 Nov 2021 16:42:22 +0000 Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org> Message-ID: <1637167342.12.0.688687367662.issue44525@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +27838 pull_request: https://github.com/python/cpython/pull/29595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 11:42:29 2021 From: report at bugs.python.org (Douglas Raillard) Date: Wed, 17 Nov 2021 16:42:29 +0000 Subject: [issue45830] Custom pickler memory leak Message-ID: <1637167348.82.0.904300950392.issue45830@roundup.psfhosted.org> New submission from Douglas Raillard : The following script exhibits the memory leak. It only happens if "dispatch_table" is set _before_ calling super().__init__, which is pretty unexpected. import pickle import io import gc import tracemalloc tracemalloc.start(10) snap = tracemalloc.take_snapshot() class MyPickler(pickle.Pickler): def __init__(self, *args, **kwargs): # Swapping the next 2 lines "solves" the memory leak for some reason self.dispatch_table = dict() super().__init__(*args, **kwargs) l=[] for i in range(10000): if i % 1000 == 0: print('='*80) snap2 = tracemalloc.take_snapshot() stats=snap2.compare_to(snap, 'lineno') for s in stats[:10]: print(s) snap = snap2 f = io.BytesIO() MyPickler(f) gc.collect() The output of the last iteration is as follow. The leak of 562 kiB is apparent: testmem.py:12: size=562 KiB (+62.5 KiB), count=9000 (+1000), average=64 B /usr/lib/python3.10/tracemalloc.py:125: size=2376 B (-72 B), count=33 (-1), average=72 B /usr/lib/python3.10/tracemalloc.py:129: size=72 B (+72 B), count=1 (+1), average=72 B /usr/lib/python3.10/tracemalloc.py:502: size=252 B (+28 B), count=9 (+1), average=28 B /usr/lib/python3.10/tracemalloc.py:498: size=2104 B (+0 B), count=36 (+0), average=58 B /home/dourai01/Work/lisa/lisa/testmem.py:10: size=1844 B (+0 B), count=9 (+0), average=205 B /usr/lib/python3.10/tracemalloc.py:193: size=1680 B (+0 B), count=35 (+0), average=48 B /usr/lib/python3.10/tracemalloc.py:547: size=1256 B (+0 B), count=3 (+0), average=419 B /usr/lib/python3.10/tracemalloc.py:226: size=832 B (+0 B), count=2 (+0), average=416 B /usr/lib/python3.10/tracemalloc.py:173: size=800 B (+0 B), count=2 (+0), average=400 B If "dispatch_table" is set after calling super().__init__, there is no leak anymore: /usr/lib/python3.10/tracemalloc.py:135: size=740 B (+740 B), count=7 (+7), average=106 B /usr/lib/python3.10/tracemalloc.py:125: size=2088 B (-656 B), count=29 (-4), average=72 B /usr/lib/python3.10/tracemalloc.py:136: size=320 B (+320 B), count=1 (+1), average=320 B /usr/lib/python3.10/tracemalloc.py:132: size=0 B (-256 B), count=0 (-1) /usr/lib/python3.10/tracemalloc.py:129: size=72 B (+72 B), count=1 (+1), average=72 B /usr/lib/python3.10/tracemalloc.py:498: size=2008 B (+48 B), count=34 (+1), average=59 B /usr/lib/python3.10/tracemalloc.py:193: size=1584 B (+48 B), count=33 (+1), average=48 B /usr/lib/python3.10/tracemalloc.py:502: size=196 B (-28 B), count=7 (-1), average=28 B /usr/lib/python3.10/tracemalloc.py:126: size=84 B (+28 B), count=3 (+1), average=28 B ---------- components: Library (Lib) messages: 406478 nosy: douglas-raillard-arm priority: normal severity: normal status: open title: Custom pickler memory leak type: resource usage versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 12:00:42 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Nov 2021 17:00:42 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1637165802.17.0.663036703455.issue45116@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: @neonene what's the importance of PR29565? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 12:59:55 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 17:59:55 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks Message-ID: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> New submission from ?ukasz Langa : This is also a performance issue but I'm mostly concerned about the stdout corruption aspect. When more than one thread aborts at the same time, output ends up looking like the example below on the terminal. Unless you understand the issue is output written out byte-by-byte, you might get misled into seeing memory corruption. Fatal Python error: Aborted Fatal Python error: Fatal Python error: Fatal Python error: AbortedAborted AbortedCurrent thread 0x 0000000110cf4dc0 (most recent call first): Current thread 0xCurrent thread 0x File 0000000110cf4dc0Current thread 0x (most recent call first): 0000000110cf4dc00000000110cf4dc0 (most recent call first): (most recent call first): " File File File /tmp"""////tctmtmppmpyp//tcchppoy/nytc-hptrohyonoton-t-rh-ormooaoontt-i--rnmomo/aatiLi-nni/m/baLLriiinbab/rrLraayirr/byyr//FFaFrrrayam/mrFeearwmaowermwoeorkrwkkossr//kPPsyy/ttPhsyo/tnhP.hyotnoh.nof.nrff.arfmarreaammwmeeoewwrowkro/orVrkkek///rVVseVierorsesnirsioson/ns3si.//o331.n1s.111///l13il.bi1/b1//pl/ypiltybht/ihopbno/n3yp3.t.1hy11o1/n/m3mu.tul1lth1ti/oipmnrpu3ol.rc1toe1cs/esmsiunsliignt/pigspr/yorncocscehysnrseocsihnsnirigoz/nesi.yzpnyen."cgph/yrs"oy, line nn95i, line in c95z_ in e__h.e_pnertnyoet"ernr_i__z_ , line e File File .95p in y_""_//"ttemmnppt//, line ccepp95yy in ttr_h_ho_on_-ner-nr ooto File ote-rm"_a/_ti nm File p//Lcitbp"yr-ta/hrtym/pFm/racaipmnye/owLtoihbrokrnnas-r/-Pyry/rtFoohooorttn-a.mfma-eirmnwaamoiernwk/osL//rikPL/yiVtbherroansrb.iyfo/nrFasr/ma3emw.e1owr1o/kr/lkiVsbe/r/Pspyyittohhnoosnn/.33f..r11a11m//elmwiuolbrt/kpi/pyVtrehorocsenis3os.n1is1n//g3/m.uq1ul1te/iulpeirsb.o/cppeyys"ts, line h102io in nng3g/.qe1utr e1u File a/"rme/uytsl/.mtppFi/yrpc"rpa, line yomt102ehcw in eosgnose-rirtnk gs File o//o"Pt/qty-mumpea/ticunpey/hLtosih.bopnrnya-".rr, line yfo/r102oF in argtaemm-temew woaor File rikkns/"L//Pi/ybtVtrmhapeor/nyc/.pFfyrrtaahmmoerwensow-rorkorsok/t/Pi-Vymoetarhisonnin.o/sfnLrs//ai33mb.er.1w11o1ar/rk/l/lyViieb/brF/srp/aipyomntyhseo/tn3w3.ho1.r11o1/k/lsnic3ob//n.cpPu1yr1yrt/ehmntuothl/otfinup.rtfourrcaeenss3s/.ip1nr1gom/c/qecusoesne.uwpceyuosr."rp, line ry236ke in /"_nVpt, line re/o102fcr in sueitgsuesr_toewn ... ---------- components: Interpreter Core messages: 406480 nosy: lukasz.langa priority: normal severity: normal stage: patch review status: open title: _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 13:00:31 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Nov 2021 18:00:31 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637172031.66.0.470794882813.issue45831@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch nosy: +vstinner nosy_count: 1.0 -> 2.0 pull_requests: +27839 pull_request: https://github.com/python/cpython/pull/29596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 13:08:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Nov 2021 18:08:06 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637172486.89.0.289585251316.issue45831@roundup.psfhosted.org> STINNER Victor added the comment: > This is also a performance issue Yep. On Windows, it already happened to me to see characters written one by one when the machine and the terminal was super slow. I expect faster dump if an ASCII string can be written at once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 13:08:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Nov 2021 18:08:37 +0000 Subject: [issue40222] "Zero cost" exception handling In-Reply-To: <1586338863.3.0.393749013734.issue40222@roundup.psfhosted.org> Message-ID: <1637172517.3.0.600257300675.issue40222@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 13:12:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Nov 2021 18:12:35 +0000 Subject: [issue21876] os.rename(src, dst) does nothing when src and dst files are hard-linked In-Reply-To: <1403891675.36.0.790137038971.issue21876@psf.upfronthosting.co.za> Message-ID: <1637172755.85.0.188440274827.issue21876@roundup.psfhosted.org> STINNER Victor added the comment: It's nice if os.rename() can be atomic. It can be atomic if it is implemented as a single syscall and the source and the destination are on the same filesystem. If we modify the implement to check if src and/or dst is a hardlink, we will need more syscalls which cannot be atomic. What if another process replaces src or dst before or after the rename() syscall? I suggest to document the issue. Or maybe we need a new flavor which keeps the current behavior. "Atomic write" is an old topic and no one managed to implement it in a portable way. So maybe you can ignore the atomicity constraint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 13:14:21 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Nov 2021 18:14:21 +0000 Subject: [issue45691] Partial moving of core objects to interpreter state is incorrect at best, unsafe at worse. In-Reply-To: <1635869089.92.0.280577291297.issue45691@roundup.psfhosted.org> Message-ID: <1637172861.74.0.877738263126.issue45691@roundup.psfhosted.org> STINNER Victor added the comment: > many classes are allocated statically Right. Changing that is an hard problem :-( See for example bpo-40601 "[C API] Hide static types from the limited C API". I tried once to "free" / reset static types in Py_Finalize(), but it's hard to implement properly :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 13:37:26 2021 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Nov 2021 18:37:26 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1637174246.28.0.707510812118.issue40059@roundup.psfhosted.org> Brett Cannon added the comment: > I'd love it if we could make this happen for Python 3.11. What can I do to help, e.g. would it be helpful if I drafted a PEP? A PEP isn't necessarily required right now as https://discuss.python.org/t/how-do-we-want-to-manage-additions-removals-to-the-stdlib/10681 needs to be resolved by the steering council first (it's on our agenda). > Several projects have switched to using tomli (https://github.com/hukkin/tomli), which is fully compatible with TOML v1.0.0 and is maybe 800 LoC with claimed 100% branch coverage. Part of the issue with tomli is how new it is; https://pypi.org/project/tomli/#history shows it is only 6 months old and we typically require a project be at least a year old before we consider pulling it in. If you want to help you could ask the author of tomli what they think about it being added to the stdlib and whether they support that idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 14:00:34 2021 From: report at bugs.python.org (Harald Husum) Date: Wed, 17 Nov 2021 19:00:34 +0000 Subject: [issue45832] Misleading membersip expression documentation Message-ID: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> New submission from Harald Husum : https://docs.python.org/3/reference/expressions.html#membership-test-operations > For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression `x in y` is equivalent to `any(x is e or x == e for e in y)`. Yet: ```py import pandas as pd import numpy as np pd_0_dt = pd.Timedelta(0) np_0_dt = np.timedelta64(0) cm = (pd_0_dt, np_0_dt) d1 = {np_0_dt: pd_0_dt} d2 = {pd_0_dt: np_0_dt} def test_membership_doc_claim(candidate_members, dct): for m in candidate_members: if m in dct: assert any(m is e or m == e for e in dct) if any(m is e or m == e for e in dct): assert m in dct if __name__ == "__main__": test_membership_doc_claim(cm, d1) # Fails test_membership_doc_claim(cm, d2) # Fails ``` Not too surprised, given the td.__hash__() implementation differs between these classes, but they are considered equal none the less. Unsure whether it is the dict implementation or the doc claim that needs to budge here. ---------- assignee: docs at python components: Documentation messages: 406485 nosy: docs at python, eric.araujo, ezio.melotti, harahu, mdk, willingc priority: normal severity: normal status: open title: Misleading membersip expression documentation type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 14:12:23 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 17 Nov 2021 19:12:23 +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: <1637176343.6.0.0670772326997.issue41735@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith resolution: later -> stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 14:20:17 2021 From: report at bugs.python.org (Bozhi You) Date: Wed, 17 Nov 2021 19:20:17 +0000 Subject: [issue45518] Invalid example for typing In-Reply-To: <1634595219.24.0.159671466805.issue45518@roundup.psfhosted.org> Message-ID: <1637176817.56.0.819040182516.issue45518@roundup.psfhosted.org> Bozhi You added the comment: My bad. Didn't notice the version constraint. Thank you, Logan! ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 14:34:47 2021 From: report at bugs.python.org (neonene) Date: Wed, 17 Nov 2021 19:34:47 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1637177687.82.0.949802295816.issue45116@roundup.psfhosted.org> neonene added the comment: >This essentially disables PGO. Thank you for the suggestion. I'll take another experimental aproach to reduce the size of 3.11 evalfunc for stronger validation. >@neonene what's the importance of PR29565? While we are talking about function size, I would like to use around PR29565 for consistent reporting. I think any commit is okay to reproduce the issue. And please ignore the patch to build.bat. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 14:49:01 2021 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Wed, 17 Nov 2021 19:49:01 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1637178541.6.0.0148439835258.issue40059@roundup.psfhosted.org> Micha? G?rny added the comment: I've already asked that, and the author said it's fine but with the deprecated text file support removed: https://github.com/hukkin/tomli/issues/141#issuecomment-968056905 That said, for consistency with json and so on we'd probably want to combine tomli and tomli_w to get dumping support as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 15:12:27 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 20:12:27 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637179946.99.0.366229137309.issue45831@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset b919d8105c4d77f00509b6d3ab2073f09db640de by Victor Stinner in branch 'main': bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) https://github.com/python/cpython/commit/b919d8105c4d77f00509b6d3ab2073f09db640de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 15:12:58 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Nov 2021 20:12:58 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637179978.23.0.0135260656244.issue45831@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27840 pull_request: https://github.com/python/cpython/pull/29597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 15:13:01 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Nov 2021 20:13:01 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637179981.65.0.860862712978.issue45831@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27841 pull_request: https://github.com/python/cpython/pull/29598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 15:29:30 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Nov 2021 20:29:30 +0000 Subject: [issue45832] Misleading membersip expression documentation In-Reply-To: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> Message-ID: <1637180970.15.0.439716528846.issue45832@roundup.psfhosted.org> Raymond Hettinger added the comment: This section presumes that the usual hash invariant holds: a==b implies hash(a)==hash(b). We could repeat that here but I don't think it makes the docs better or more useable to require that docs repeat the same facts in multiple places. Alternatively, the sentence could be split to cover both cases: """ For sequence container types such as list, tuple, or collections.deque, the expression `x in y` is equivalent to `any(x is e or x == e for e in y)`. For container that use hashing, such as dict, set, or frozenset, the expression `x in y` is equivalent to `any(x is e or x == e for e in y if hash(x) == hash(e))`. """ While that is more precise, it borders on being pedantic and likely doesn't make the average reader better off. Consider submitting a feature request to pandas suggesting that they harmonize their hash functions with their counterparts in numpy. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 15:34:15 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 17 Nov 2021 20:34:15 +0000 Subject: [issue21876] os.rename(src, dst) does nothing when src and dst files are hard-linked In-Reply-To: <1403891675.36.0.790137038971.issue21876@psf.upfronthosting.co.za> Message-ID: <1637181255.24.0.167003702005.issue21876@roundup.psfhosted.org> Eryk Sun added the comment: > It's nice if os.rename() can be atomic. How about fixing the behavior in shutil.move()? Currently it tries os.rename(src, dst) without checking for this case. For example: >>> os.path.samefile('src', 'dst') True >>> shutil.move('src', 'dst') 'dst' >>> os.path.exists('src') True >>> os.stat('src').st_nlink 2 --- Note that there's nothing to fix, and not much to document in Windows. It works as expected. A slight difference from the general case is that os.replace() is required only when replacing a different file, not a hard link for the same file. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 15:51:16 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Nov 2021 20:51:16 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637182276.39.0.801743977554.issue42540@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27842 pull_request: https://github.com/python/cpython/pull/29599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 15:51:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Nov 2021 20:51:46 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637182306.11.0.212043893444.issue42540@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 736684b1bb67369a2e95a9f621752deead44e7ef by Sam Gross in branch 'main': bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564) https://github.com/python/cpython/commit/736684b1bb67369a2e95a9f621752deead44e7ef ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:04:54 2021 From: report at bugs.python.org (Sam Gross) Date: Wed, 17 Nov 2021 21:04:54 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637183094.42.0.345658793204.issue42540@roundup.psfhosted.org> Change by Sam Gross : ---------- pull_requests: +27843 pull_request: https://github.com/python/cpython/pull/29600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:16:10 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Nov 2021 21:16:10 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637183770.68.0.175184812911.issue42540@roundup.psfhosted.org> miss-islington added the comment: New changeset 1079b3e3cb3eba7062e174ecc6c0ab20c2d0722e by Miss Islington (bot) in branch '3.10': bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564) https://github.com/python/cpython/commit/1079b3e3cb3eba7062e174ecc6c0ab20c2d0722e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:22:11 2021 From: report at bugs.python.org (Brian McCutchon) Date: Wed, 17 Nov 2021 21:22:11 +0000 Subject: [issue45833] NamedTemporaryFile deleted before enclosing context manager exit Message-ID: <1637184131.4.0.431691431028.issue45833@roundup.psfhosted.org> New submission from Brian McCutchon : Consider the following code: # Copyright 2021 Google LLC. # SPDX-License-Identifier: Apache-2.0 import contextlib import os @contextlib.contextmanager def my_tmp_file(): with tempfile.NamedTemporaryFile('w') as f: yield f os.stat(my_tmp_file().__enter__().name) # File not found os.stat(contextlib.ExitStack().enter_context(my_tmp_file()).name) # Same I would expect the file to still exist, as __exit__ has not been called and I can't see why the file would have been closed. Also, it performs as expected when using NamedTemporaryFile directly, but not when it is nested in another context manager. It also performs as expected when my_tmp_file() or contextlib.ExitStack() is used in a "with" statement. ---------- components: Library (Lib) messages: 406494 nosy: Brian McCutchon priority: normal severity: normal status: open title: NamedTemporaryFile deleted before enclosing context manager exit type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:27:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 17 Nov 2021 21:27:57 +0000 Subject: [issue45834] Move runtime except: check to the parser Message-ID: <1637184477.04.0.544016485338.issue45834@roundup.psfhosted.org> New submission from Irit Katriel : The compiler has a runtime check that an "except:" without type can only be the last in the try block: https://github.com/python/cpython/blob/15409c720be0503131713e3d3abc1acd0da07378/Python/compile.c#L3251 This could be detected by the parser instead. ---------- components: Parser messages: 406495 nosy: iritkatriel, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Move runtime except: check to the parser versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:31:51 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Nov 2021 21:31:51 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637184711.4.0.776305027991.issue45795@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:38:58 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Nov 2021 21:38:58 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1637185138.36.0.291316649376.issue45796@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:40:45 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Nov 2021 21:40:45 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1637185245.13.0.550019321552.issue45796@roundup.psfhosted.org> Ned Deily added the comment: For the record, the Tk issue opened for this is at: https://core.tcl-lang.org/tk/tktview?name=300bad1beb ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:45:03 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 17 Nov 2021 21:45:03 +0000 Subject: [issue45832] Misleading membersip expression documentation In-Reply-To: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> Message-ID: <1637185503.39.0.643461154667.issue45832@roundup.psfhosted.org> Eric V. Smith added the comment: I don?t think repeating the hash invariant in multiple places adds anything, I think it would just add clutter. I also think the existing docs are easier to understand than the version with the hashing containers split out. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:57:20 2021 From: report at bugs.python.org (Sam Gross) Date: Wed, 17 Nov 2021 21:57:20 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures Message-ID: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> New submission from Sam Gross : The test_queue suite has a race condition that can lead to test failures in test_many_threads, test_many_threads_nonblock, and test_many_threads_timeout. Consumers are signaled to exit by a sentinel value (None). The sentinel values are at the end of the input list, but that doesn't mean they are necessarily enqueued at the end of the inter-thread queue when there are multiple "feeder" threads. In particular, a feeder thread may be delayed in enqueueing a non-sentinel value. The other feeder threads may finish popping and enqueueing the remaining values including all the sentinels, leading to the delayed non-sentinel value arriving AFTER all the sentinels. The "consumer" threads exit before processing all the values leading to the assertion error in run_threads() in test_queue.py: self.assertTrue(q.empty()) I will attach a patch that adds a delay in feed() to make the race condition occur more frequently so that the issue is easier to reproduce. ---------- components: Tests messages: 406498 nosy: colesbury priority: normal severity: normal status: open title: Race condition in test_queue can lead to test failures type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 16:59:50 2021 From: report at bugs.python.org (Sam Gross) Date: Wed, 17 Nov 2021 21:59:50 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637186390.87.0.405734686144.issue45835@roundup.psfhosted.org> Change by Sam Gross : ---------- keywords: +patch Added file: https://bugs.python.org/file50447/issue45835_repro.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:00:02 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 22:00:02 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637186402.42.0.75176110859.issue45831@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 4ffde90dccd741b04a448f2e44f0b82a41b6fe96 by Miss Islington (bot) in branch '3.10': bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) (GH-29598) https://github.com/python/cpython/commit/4ffde90dccd741b04a448f2e44f0b82a41b6fe96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:00:03 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 22:00:03 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637186403.04.0.043139598527.issue45831@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset ac89f8cab79800195687dd141de472f90c626ec3 by Miss Islington (bot) in branch '3.9': bpo-45831: _Py_DumpASCII() uses a single write() call if possible (GH-29596) (GH-29597) https://github.com/python/cpython/commit/ac89f8cab79800195687dd141de472f90c626ec3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:00:22 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 22:00:22 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637186422.96.0.488796217107.issue45831@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:00:36 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 22:00:36 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637186436.82.0.29571231179.issue45831@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Victor! ? ? ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:29:03 2021 From: report at bugs.python.org (Sam Gross) Date: Wed, 17 Nov 2021 22:29:03 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637188143.39.0.990181939476.issue45835@roundup.psfhosted.org> Change by Sam Gross : ---------- pull_requests: +27844 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:33:15 2021 From: report at bugs.python.org (Harald Husum) Date: Wed, 17 Nov 2021 22:33:15 +0000 Subject: [issue45832] Misleading membersip expression documentation In-Reply-To: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> Message-ID: <1637188395.64.0.95734469677.issue45832@roundup.psfhosted.org> Harald Husum added the comment: Might i then suggest mentioning in the docs that this assumes the invariance, combined with a backlink to the definition, instead of a full repeat? I'm sure the hash invariant is well known to you guys, working on python, but I was genuinely surprised by this behaviour. Not sure I should be ashamed or not, given that my job has revolved around python for the last couple of years. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:54:13 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 22:54:13 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637189653.21.0.992944698055.issue42540@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 87787c8774221c81602b31b0e0dc0678ad494e91 by Sam Gross in branch '3.9': [3.9] bpo-42540: reallocation of id_mutex should not force default allocator (GH-29564) (GH-29600) https://github.com/python/cpython/commit/87787c8774221c81602b31b0e0dc0678ad494e91 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 17:58:01 2021 From: report at bugs.python.org (Zachary Ware) Date: Wed, 17 Nov 2021 22:58:01 +0000 Subject: [issue45833] NamedTemporaryFile deleted before enclosing context manager exit In-Reply-To: <1637184131.4.0.431691431028.issue45833@roundup.psfhosted.org> Message-ID: <1637189881.29.0.534479777545.issue45833@roundup.psfhosted.org> Zachary Ware added the comment: It's a bit convoluted, but the file is actually deleted before the `os.stat` call. Because there are no references to anything but the `name` (which is just a string), the `_GeneratorContextManager` (result of `my_tmp_file`) and the `_TemporaryFileWrapper` (result of `my_tmp_file().__enter__()`) are both destroyed. Because `NamedTemporaryFile` is called with `delete=True` (default), the `_TemporaryFileWrapper` has a `_closer` attribute which is a `_TemporaryFileCloser`, which calls `self.close()` in `__del__`, which deletes the file. If a reference to the result of `my_tmp_file()` is saved anywhere along the way, none of the objects are destroyed and the file still exists. This also wouldn't happen in an implementation without reference counting. ---------- nosy: +zach.ware resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 18:01:52 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 23:01:52 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637190112.74.0.927536402392.issue42540@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Sam! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 18:04:26 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 23:04:26 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637190266.7.0.133544310337.issue45826@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 5d90c467c02ffefdb13c1abc83a171db1a99ffad by Dennis Sweeney in branch 'main': bpo-45826: Fix a crash in suggestions.c by checking for `traceback is None` (GH-29590) https://github.com/python/cpython/commit/5d90c467c02ffefdb13c1abc83a171db1a99ffad ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 18:04:49 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 23:04:49 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637190289.82.0.586154887465.issue45826@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +27845 pull_request: https://github.com/python/cpython/pull/29602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 18:17:22 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 23:17:22 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637191042.05.0.876287929011.issue45822@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e3aa9fd77bf474bb3e8a7a1d1bd1ebf45147945a by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582) (GH-29586) https://github.com/python/cpython/commit/e3aa9fd77bf474bb3e8a7a1d1bd1ebf45147945a ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 18:18:20 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 17 Nov 2021 23:18:20 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637191100.73.0.263169733321.issue45822@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 0ef308a2890571c850c624fb99ac00f8951363c6 by Pablo Galindo Salgado in branch '3.9': bpo-45822: Respect PEP 263's coding cookies in the parser even if flags are not provided (GH-29582) (GH-29585) https://github.com/python/cpython/commit/0ef308a2890571c850c624fb99ac00f8951363c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 18:43:48 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 17 Nov 2021 23:43:48 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input In-Reply-To: <1637092321.17.0.719228525226.issue45820@roundup.psfhosted.org> Message-ID: <1637192628.11.0.44742999931.issue45820@roundup.psfhosted.org> miss-islington added the comment: New changeset b455df59a8eca1b0c0793bc11a116ffc2829b175 by Miss Islington (bot) in branch '3.10': bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580) https://github.com/python/cpython/commit/b455df59a8eca1b0c0793bc11a116ffc2829b175 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:25:04 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 00:25:04 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input In-Reply-To: <1637092321.17.0.719228525226.issue45820@roundup.psfhosted.org> Message-ID: <1637195104.71.0.918987402881.issue45820@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 00ee14e814d35587ac55f89c7de871a01360c876 by Miss Islington (bot) in branch '3.9': [3.9] bpo-45820: Fix a segfault when the parser fails without reading any input (GH-29580) (GH-29584) https://github.com/python/cpython/commit/00ee14e814d35587ac55f89c7de871a01360c876 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:25:31 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 00:25:31 +0000 Subject: [issue45820] Parser can segfault if an error happens before reading any input In-Reply-To: <1637092321.17.0.719228525226.issue45820@roundup.psfhosted.org> Message-ID: <1637195131.24.0.441944106233.issue45820@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Pablo! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:27:03 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 00:27:03 +0000 Subject: [issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION In-Reply-To: <1633940907.8.0.793399065339.issue45429@roundup.psfhosted.org> Message-ID: <1637195223.67.0.135200418523.issue45429@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset fc4474e45eecbea8e88095f28c98c5d56438d841 by Dong-hee Na in branch 'main': bpo-45429: Merge whatsnew about time.sleep (GH-29589) https://github.com/python/cpython/commit/fc4474e45eecbea8e88095f28c98c5d56438d841 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:28:08 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 00:28:08 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637195288.33.0.554488737705.issue45826@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 8eabe60108b536b942c791b5d3dc3c3020497aac by ?ukasz Langa in branch '3.10': [3.10] bpo-45826: Fix a crash in suggestions.c by checking for `traceback is None` (GH-29590) (GH-29602) https://github.com/python/cpython/commit/8eabe60108b536b942c791b5d3dc3c3020497aac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:28:35 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 00:28:35 +0000 Subject: [issue45826] unittest.assertRaisesRegex is broken in Python 3.11 and leading to crashing if tested regex does not match name. In-Reply-To: <1637117458.73.0.114142270952.issue45826@roundup.psfhosted.org> Message-ID: <1637195315.79.0.0587839071249.issue45826@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Dennis! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:39:06 2021 From: report at bugs.python.org (Shantanu) Date: Thu, 18 Nov 2021 00:39:06 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1637195946.65.0.574784311795.issue40059@roundup.psfhosted.org> Shantanu added the comment: Hopefully tomli being less than a year old should not be a blocker, after all, TOML v1.0.0 is itself less than a year old. Despite tomli being new code, it's pretty widely used. Reverse dependencies include pip, pytest, mypy, black, flit, coverage, setuptools-scm, cibuildwheel. All in all, it should be well proven in practice by the time it comes to make 3.11 stable. It also helps that it's easy to anticipate the interface: dump, dumps, load, loads. Overall, hopefully risk here should be well within the budget of a provisional module. That's all to say, if and when the Steering Council decides that there's work to be done here, let me know how I can help :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 19:47:42 2021 From: report at bugs.python.org (Patrick Bourke) Date: Thu, 18 Nov 2021 00:47:42 +0000 Subject: [issue45836] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size (Python 3.9) Message-ID: <1637196462.86.0.173865369445.issue45836@roundup.psfhosted.org> New submission from Patrick Bourke : Hi all, Forgive me if this is not the correct way to report this, but we have run into the issue from #29620 ( https://bugs.python.org/issue29620 ) on Python 3.9. The fix appears to be present in the tip of 3.8: https://github.com/python/cpython/blob/c37a0d9c0ae4aa0d9135fac9a58afc7b34ff71d6/Lib/unittest/case.py#L254 and 3.10: https://github.com/python/cpython/blob/0ef308a2890571c850c624fb99ac00f8951363c6/Lib/unittest/case.py#L255 but missing from 3.9: https://github.com/python/cpython/blob/0ef308a2890571c850c624fb99ac00f8951363c6/Lib/unittest/case.py#L255 Here is our test case: import unittest import graspologic class MyTestCase(unittest.TestCase): def test_something(self): with self.assertWarns(UserWarning): pass if __name__ == '__main__': unittest.main() fails with: ====================================================================== ERROR: test_something (__main__.MyTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\pbourke\AppData\Roaming\JetBrains\PyCharm2021.2\scratches\test.py", line 7, in test_something with self.assertWarns(UserWarning): File "C:\Users\pbourke\.pyenv\pyenv-win\versions\3.9.7\lib\unittest\case.py", line 255, in __enter__ for v in sys.modules.values(): RuntimeError: dictionary changed size during iteration The module triggering the error appears to be IPython.utils.io, which is included somewhere in our dependencies. My CPython is: Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] ---------- components: Library (Lib) messages: 406516 nosy: pbourke priority: normal severity: normal status: open title: unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size (Python 3.9) type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 20:21:09 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 01:21:09 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1637198469.74.0.019498186718.issue29620@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27846 pull_request: https://github.com/python/cpython/pull/29605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 20:22:53 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 18 Nov 2021 01:22:53 +0000 Subject: [issue45836] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size (Python 3.9) In-Reply-To: <1637196462.86.0.173865369445.issue45836@roundup.psfhosted.org> Message-ID: <1637198573.21.0.177339806079.issue45836@roundup.psfhosted.org> Dennis Sweeney added the comment: https://github.com/python/cpython/pull/29605 was just opened as a backport ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 17 23:20:36 2021 From: report at bugs.python.org (Ma Lin) Date: Thu, 18 Nov 2021 04:20:36 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1637209236.49.0.103290488725.issue45816@roundup.psfhosted.org> Ma Lin added the comment: They are LNK1268 error: LINK : fatal error LNK1268: inconsistent option 'pdbthreads:5' specified with /USEPROFILE but not with /GENPROFILE [e:\dev\cpython\PCbuild\_queue.vcx proj] LINK : fatal error LNK1268: inconsistent option 'pdbthreads:1' specified with /USEPROFILE but not with /GENPROFILE [e:\dev\cpython\PCbuild\_asyncio.v cxproj] LINK : fatal error LNK1268: inconsistent option 'pdbthreads:5' specified with /USEPROFILE but not with /GENPROFILE [e:\dev\cpython\PCbuild\_elementtr ee.vcxproj] LINK : fatal error LNK1268: inconsistent option 'cgthreads:8' specified with /USEPROFILE but not with /GENPROFILE [e:\dev\cpython\PCbuild\_hashlib.vc xproj] ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 00:15:47 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Nov 2021 05:15:47 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1637212547.8.0.713961696954.issue45788@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +27847 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 01:03:39 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 18 Nov 2021 06:03:39 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637215419.91.0.148556463209.issue45795@roundup.psfhosted.org> Senthil Kumaran added the comment: > Timeout value should not be reset after client receives a data(bytes), because it can easily be abused to achieve DOS. Interesting. I looked the server example. Does clients like curl have something like this too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 01:26:34 2021 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 18 Nov 2021 06:26:34 +0000 Subject: [issue45429] [Windows] time.sleep() should use CREATE_WAITABLE_TIMER_HIGH_RESOLUTION In-Reply-To: <1633940907.8.0.793399065339.issue45429@roundup.psfhosted.org> Message-ID: <1637216794.32.0.359091451818.issue45429@roundup.psfhosted.org> Change by Dong-hee Na : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 02:33:43 2021 From: report at bugs.python.org (Ethan Furman) Date: Thu, 18 Nov 2021 07:33:43 +0000 Subject: [issue38397] __init_subclass__ causes TypeError when used with more standard library metaclasses (such as EnumMeta) In-Reply-To: <1570464400.89.0.0085195281122.issue38397@roundup.psfhosted.org> Message-ID: <1637220823.25.0.619774427162.issue38397@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:18:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Nov 2021 08:18:49 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637223529.32.0.590656140941.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 25ecc040d007a55e4b5c30fa739054b52c1aacac by Christian Heimes in branch 'main': bpo-45573: Introduce extension module flags in Makefile (GH-29594) https://github.com/python/cpython/commit/25ecc040d007a55e4b5c30fa739054b52c1aacac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:51:34 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Nov 2021 08:51:34 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637225494.59.0.222395785841.issue45835@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset df3e53d86b2ad67da9ac2b5a3f56257d1f394982 by Sam Gross in branch 'main': bpo-45835: Fix race condition in test_queue (#29601) https://github.com/python/cpython/commit/df3e53d86b2ad67da9ac2b5a3f56257d1f394982 ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:51:41 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 08:51:41 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637225501.8.0.15042894663.issue45835@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27848 pull_request: https://github.com/python/cpython/pull/29612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 03:51:46 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 08:51:46 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637225506.17.0.53087061207.issue45835@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27849 pull_request: https://github.com/python/cpython/pull/29613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 04:02:03 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Nov 2021 09:02:03 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637226123.12.0.177025772867.issue45573@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27850 pull_request: https://github.com/python/cpython/pull/29614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 04:18:16 2021 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 18 Nov 2021 09:18:16 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637227096.51.0.47637928142.issue45512@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 0920b61a0cb30128287ebafab1df8cad3a3dffdb by Erlend Egeberg Aasland in branch 'main': bpo-45512: Use Argument Clinic to set sqlite3 isolation level (GH-29593) https://github.com/python/cpython/commit/0920b61a0cb30128287ebafab1df8cad3a3dffdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 04:20:07 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 18 Nov 2021 09:20:07 +0000 Subject: [issue45510] Specialize BINARY_SUBTRACT In-Reply-To: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org> Message-ID: <1637227207.67.0.414610451862.issue45510@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 345ba3f080c140dee3102f472bc166c2db191bcc by Dong-hee Na in branch 'main': bpo-45510: Specialize BINARY_SUBTRACT (GH-29523) https://github.com/python/cpython/commit/345ba3f080c140dee3102f472bc166c2db191bcc ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 04:20:54 2021 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 18 Nov 2021 09:20:54 +0000 Subject: [issue45510] Specialize BINARY_SUBTRACT In-Reply-To: <1634555657.96.0.480345209598.issue45510@roundup.psfhosted.org> Message-ID: <1637227254.45.0.185493214837.issue45510@roundup.psfhosted.org> Dong-hee Na added the comment: Thank you Mark! ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 04:31:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 18 Nov 2021 09:31:51 +0000 Subject: [issue1778410] removeTest() method patch for unittest.TestSuite Message-ID: <1637227911.1.0.93490770789.issue1778410@roundup.psfhosted.org> Irit Katriel added the comment: I agree with Michael that it?s better not to include the test in the first place. This issue was abandoned 8 years ago, closing now. ---------- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 04:40:24 2021 From: report at bugs.python.org (Harald Husum) Date: Thu, 18 Nov 2021 09:40:24 +0000 Subject: [issue45832] Misleading membersip expression documentation In-Reply-To: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> Message-ID: <1637228424.55.0.0998426529045.issue45832@roundup.psfhosted.org> Harald Husum added the comment: I am realising that me not knowing about the hash invariance is likely a symptom of something I have in common with most Python users, but not with Python maintainers: Having access to a powerful ecosystem, we mostly get our classes from 3rd parties, rather than implement them ourselves. When I do define my own classes, I usually don't have to touch the `__hash__` or `__eq__` implementations, since I am either subclassing, making a plain dataclass, or leaning on `attrs` to help me out. I think it is telling that even the pandas core devs are able to mess this up, and it suggests to me that this invariance isn't emphasised enough. Here's a go at specifying what I mean with a backlink: """ For sequence container types such as list, tuple, or collections.deque, the expression `x in y` is equivalent to `any(x is e or x == e for e in y)`. For container that use hashing, such as dict, set, or frozenset, the same equivalence holds, assuming the [hash invariance](https://docs.python.org/3/glossary.html#term-hashable). """ I just derived this more or less directly from Hettinger's formulation. It could probably be made clearer. I am realising that this, (famous, it seems), hash invariance isn't defined in isolation anywhere, making it slightly hard to link to. Any better suggestions than the glossary entry for hashable, which has the definition included? To me, it seems that such a fundamental assumption/convention/requirement, that isn't automatically enforced, should be as easy as possible to point to. In my search for the definition (prompted by Hettinger) i discovered more surprised, by the way. Surprise 1: https://docs.python.org/3/library/collections.abc.html?highlight=hashable#collections.abc.Hashable > ABC for classes that provide the __hash__() method. Having now discovered the mentioned invariance, I am surprised this isn't explicitly formulated (and implemented? haven't checked) as: """ ABC for classes that provide the __hash__() and __eq__() methods. """ I also think this docstring deserves a backlink to the invariance definition, given it's importance, and how easy it is to shoot yourself in the foot. The current formulation of this docstring actually reflected what I (naively) assumed it meant to be hashable, suggesting this is the place in the docs I got my understanding of the term from. Surprise 2: https://docs.python.org/3/reference/expressions.html?highlight=hashable#value-comparisons > The `hash()` result should be consistent with equality. Objects that are equal should either have the same hash value, or be marked as unhashable. I appreciate that this is mentioned in this section (I was hoping to find it). But it feels like a reiteration of the definition of the invariant, and could thus be replaced with a backlink, like suggested above. I'd much rather see the text real estate be used for a motivating statement (you do't want weird behaviour in sets and dicts), and a reminder of the importance of checking the __hash__ implementation if you are modifying the __eq__ implementation, in, say, some subclass. Surprise 3: https://docs.python.org/3/reference/datamodel.html#object.__eq__ > See the paragraph on __hash__() for some important notes on creating hashable objects which support custom comparison operations and are usable as dictionary keys. Another case of the invariance being mentioned (I appreciate it), but in a way where it isn't directly evident that extreme care should be taken when modifying an __eq__ implementation. Perhaps another case where the invariance should be referred to by link, and the text should focus on the consequences of breaking it. Surprise 4: https://docs.python.org/3/reference/datamodel.html#object.__hash__ Another definition-in-passing of the invariance: > The only required property is that objects which compare equal have the same hash value. Also replaceable by backlink? There after follows descriptions of some, (in hindsight very important), protection mechanisms. > User-defined classes have __eq__() and __hash__() methods by default; with them, all objects compare unequal (except with themselves) and x.__hash__() returns an appropriate value such that x == y implies both that x is y and hash(x) == hash(y). > A class that overrides __eq__() and does not define __hash__() will have its __hash__() implicitly set to None. But yet again, without some motivating statement for why we care about the invariance, all of this seems, well, surprising and weird. Surprise 5: https://docs.python.org/3/library/functions.html#hash Perhaps another location where a backlink would be in order, although not sure in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 04:56:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Nov 2021 09:56:45 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637229405.4.0.70962498064.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 5275e59c0c1b26226608e6c7c2548c26192d6575 by Christian Heimes in branch 'main': bpo-45573: check for ossaudiodev in configure (GH-29614) https://github.com/python/cpython/commit/5275e59c0c1b26226608e6c7c2548c26192d6575 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 05:05:20 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 18 Nov 2021 10:05:20 +0000 Subject: [issue45834] Move runtime except: check to the parser In-Reply-To: <1637184477.04.0.544016485338.issue45834@roundup.psfhosted.org> Message-ID: <1637229920.91.0.00853303293013.issue45834@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Fantastic point, Irit! Will try to make s prototype this week ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 05:28:27 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 18 Nov 2021 10:28:27 +0000 Subject: [issue45512] [sqlite3] simplify "isolation level" In-Reply-To: <1634561951.05.0.13174221264.issue45512@roundup.psfhosted.org> Message-ID: <1637231307.78.0.413698897259.issue45512@roundup.psfhosted.org> Erlend E. Aasland added the comment: Thanks for reviews and improvements, Dong-hee :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 06:03:03 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 18 Nov 2021 11:03:03 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1637233383.03.0.218196224315.issue45829@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 21fa7a3e8f99a1a32467f85c877e40cbdafa9da7 by Mark Shannon in branch 'main': bpo-45829: Specialize BINARY_SUBSCR for __getitem__ implemented in Python. (GH-29592) https://github.com/python/cpython/commit/21fa7a3e8f99a1a32467f85c877e40cbdafa9da7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 06:20:38 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Nov 2021 11:20:38 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637234438.97.0.823613672352.issue45573@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27851 pull_request: https://github.com/python/cpython/pull/29615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 07:09:31 2021 From: report at bugs.python.org (Muhammad Farhan) Date: Thu, 18 Nov 2021 12:09:31 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637237371.0.0.367229009847.issue45795@roundup.psfhosted.org> Muhammad Farhan added the comment: Yes, other clients like curl does not reset the timeout See the attached screenshots for references. ---------- Added file: https://bugs.python.org/file50448/max_time.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 07:10:19 2021 From: report at bugs.python.org (Muhammad Farhan) Date: Thu, 18 Nov 2021 12:10:19 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637237419.56.0.21195943144.issue45795@roundup.psfhosted.org> Muhammad Farhan added the comment: See the max_time.png and curl.png ---------- Added file: https://bugs.python.org/file50449/curl.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 07:32:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Nov 2021 12:32:35 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637238755.72.0.214022344508.issue45573@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27852 pull_request: https://github.com/python/cpython/pull/29616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 07:42:27 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Nov 2021 12:42:27 +0000 Subject: [issue42540] Debug pymalloc crash when using os.fork() [regression] In-Reply-To: <1606918936.38.0.790172378115.issue42540@roundup.psfhosted.org> Message-ID: <1637239347.94.0.390820673765.issue42540@roundup.psfhosted.org> STINNER Victor added the comment: Do you think that it would be worth it to dump the memory allocation when a Fatal Python error related to a memory error is triggered? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 07:54:34 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Nov 2021 12:54:34 +0000 Subject: [issue45831] _Py_DumpASCII() writes characters one by one leading to corrupted tracebacks In-Reply-To: <1637171995.61.0.0611629637793.issue45831@roundup.psfhosted.org> Message-ID: <1637240074.9.0.232107857256.issue45831@roundup.psfhosted.org> STINNER Victor added the comment: > Thanks, Victor! ? ? ? I'm curious to know if the traceback became a little more readable than msg406480 with this minor enhancement ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 08:40:09 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Nov 2021 13:40:09 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637242809.66.0.072620510165.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: New changeset e4bb22fabbea72776b377733047e0f32e0388059 by Christian Heimes in branch 'main': bpo-45573: Add Modules/Setup.stdlib with conditional modules (GH-29615) https://github.com/python/cpython/commit/e4bb22fabbea72776b377733047e0f32e0388059 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 08:43:45 2021 From: report at bugs.python.org (Hugo van Kemenade) Date: Thu, 18 Nov 2021 13:43:45 +0000 Subject: [issue45837] Fix turtle deprecations Message-ID: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> New submission from Hugo van Kemenade : turtle's settiltangle was deprecated in Python 3.1: "Deprecated since version 3.1." https://docs.python.org/3.10/library/turtle.html#turtle.settiltangle says of settiltangle: And the reason: "`Turtle.tiltangle()` has been enhanced in functionality: it now can be used to get or set the tiltangle. `Turtle.settiltangle()` has been deprecated." https://docs.python.org/3.10/library/turtle.html#changes-since-python-3-0 However, in docstrings, tiltangle was accidentally marked as deprecated: "Deprecated since Python 3.1" https://github.com/python/cpython/blob/v3.10.0/Lib/turtle.py#L2880 Neither tiltangle nor settiltangle raise DeprecationWarnings. So let's: * Correct tiltangle's docstring to say it's not really deprecated * Update settiltangle's docstring to say it is deprecated * Add a DeprecationWarning to settiltangle * Internally call self.tiltangle instead of self.settiltangle BPO references: 2009 https://bugs.python.org/issue5923 - settiltangle originally deprecated, with rationale. 2010 https://bugs.python.org/issue7888 - the mixup was discovered and apparently corrected in py3k and release31-maint. I've not done the SCM archaeology to discover why this regressed. 2020 https://bugs.python.org/issue41165 - both mentioned as deprecated, mixup not noted. ---------- components: Library (Lib) messages: 406536 nosy: hugovk priority: normal severity: normal status: open title: Fix turtle deprecations versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 08:49:43 2021 From: report at bugs.python.org (Hugo van Kemenade) Date: Thu, 18 Nov 2021 13:49:43 +0000 Subject: [issue45837] Fix turtle deprecations In-Reply-To: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> Message-ID: <1637243383.27.0.19888453276.issue45837@roundup.psfhosted.org> Change by Hugo van Kemenade : ---------- keywords: +patch pull_requests: +27853 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 09:36:19 2021 From: report at bugs.python.org (Muhammad Farhan) Date: Thu, 18 Nov 2021 14:36:19 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637246179.75.0.822636807824.issue45795@roundup.psfhosted.org> Muhammad Farhan added the comment: So, the idea is to make timeout for the whole operation and it should not reset in any case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 10:02:56 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 15:02:56 +0000 Subject: [issue45837] Fix turtle deprecations In-Reply-To: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> Message-ID: <1637247776.92.0.138734372038.issue45837@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset c94664c262bddbff4604795d46ecd0935402df8e by Hugo van Kemenade in branch 'main': bpo-45837: Properly deprecate turtle.RawTurtle.settiltangle (GH-29618) https://github.com/python/cpython/commit/c94664c262bddbff4604795d46ecd0935402df8e ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 10:22:29 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Nov 2021 15:22:29 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1637248949.58.0.376106327033.issue10483@roundup.psfhosted.org> STINNER Victor added the comment: > I have put the question on Discuss and wait for (any) responses, Link to the discussion: https://discuss.python.org/t/issue-10483-http-server-what-is-executable-on-windows/11856 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 10:29:44 2021 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 18 Nov 2021 15:29:44 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637249384.38.0.173373128251.issue45775@roundup.psfhosted.org> Petr Viktorin added the comment: I argued for keeping colorsys: RGB/HLS/HSV are useful in several fields. Colorsys is a nice low-power battery to have around for e.g. picking a color for highlighting any kind of output. YIQ is the odd one out: it describes actual color, rather than instructions for a monitor. I think that if you need YIQ, YUV, CMYK, sRGB, XYZ or Lab, you should reach for a more specialized library. In other words, I don't see YIQ as an example to be followed. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 10:36:07 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Nov 2021 15:36:07 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1637249767.11.0.172520284173.issue10483@roundup.psfhosted.org> STINNER Victor added the comment: I searched for open issues which contain "cgi" in their title. I found 43 open issues. The oldest is 101 months ago. In 10 years, Lib/cgi.py got 43 commits. Only 13 commits in the last 5 years (since 2016-01-01). It seems like the cgi module is not really maintained anymore. One option is to do nothing: I guess that the most basic features continue to work. Another option is to start deprecating all code related to CGI in the stdlib. While CGI is not "commonly" used, it seems like it remains popular for specific usages. So I don't think that it's time to deprecate it :-) > You can for sure make a pull request and see if a core dev will review and merge it Yep, just do that ;-) So far, nobody proposed a PR to fix this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 10:54:52 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 15:54:52 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1637250892.23.0.589037858774.issue45680@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27854 pull_request: https://github.com/python/cpython/pull/29619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 10:54:57 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 15:54:57 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1637250897.6.0.795121410075.issue45680@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27855 pull_request: https://github.com/python/cpython/pull/29620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 10:54:38 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 15:54:38 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1637250878.1.0.493580165679.issue45680@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 31b3a70edb1216bdc8fab3b2eafd8ddb00487f41 by Alex Waygood in branch 'main': [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) https://github.com/python/cpython/commit/31b3a70edb1216bdc8fab3b2eafd8ddb00487f41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:01:27 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Nov 2021 16:01:27 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637251287.11.0.901243331891.issue45775@roundup.psfhosted.org> STINNER Victor added the comment: The GIMP image editor uses https://gegl.org/babl/ which supports tons of formats and supports color spaces, ICC profiles, etc. I would also prefer to keep colorsys simple and so not support ICC profiles for example. YUV is a common color encoding system. It's used by the JPEG image format and MPEG video format for example. https://en.wikipedia.org/wiki/YUV In terms of complexity and maintenance burden, supporting YUV (PR 29512) sounds reasonable me. If colorsys is limited to RGB/HLS/HSV, I'm not sure if it is useful. Nowadays, there are more color formats which are getting popular. If they are not supported, maybe it's better to just remove the module. I don't know. Well, I don't have a strong opinion on adding YUV support or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:05:49 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:05:49 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637251549.67.0.22517499497.issue45835@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 5cf05c71d13a4b4a94cc77da4214ee2f0b9c7de7 by Miss Islington (bot) in branch '3.10': bpo-45835: Fix race condition in test_queue (GH-29601) (GH-29612) https://github.com/python/cpython/commit/5cf05c71d13a4b4a94cc77da4214ee2f0b9c7de7 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:06:48 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 16:06:48 +0000 Subject: [issue45640] Production tokens are not clickable In-Reply-To: <1635390266.57.0.202926795869.issue45640@roundup.psfhosted.org> Message-ID: <1637251608.3.0.204987043838.issue45640@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27856 pull_request: https://github.com/python/cpython/pull/29621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:06:46 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:06:46 +0000 Subject: [issue45640] Production tokens are not clickable In-Reply-To: <1635390266.57.0.202926795869.issue45640@roundup.psfhosted.org> Message-ID: <1637251606.57.0.658124785947.issue45640@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 32959108f9c543e3cb9f2b68bbc782bddded6f42 by Arthur Milchior in branch 'main': bpo-45640: [docs] Tokens are now clickable (GH-29260) https://github.com/python/cpython/commit/32959108f9c543e3cb9f2b68bbc782bddded6f42 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:01:08 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Nov 2021 16:01:08 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637251268.34.0.0923649440307.issue45795@roundup.psfhosted.org> Christian Heimes added the comment: Please don't post screenshots. Screenshots are neither accessible nor searchable. It's better to link to documentation and copy the relevant sentences here. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:09:52 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:09:52 +0000 Subject: [issue29620] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size In-Reply-To: <1487780571.93.0.503711972358.issue29620@psf.upfronthosting.co.za> Message-ID: <1637251792.83.0.203984226886.issue29620@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 71d842b9c1e9d86ede449783e630b7a768b579d6 by Miss Islington (bot) in branch '3.9': bpo-29620: iterate over a copy of sys.modules (GH-4800) (GH-29605) https://github.com/python/cpython/commit/71d842b9c1e9d86ede449783e630b7a768b579d6 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:10:57 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:10:57 +0000 Subject: [issue45836] unittest.TestCase.assertWarns raises RuntimeEror if sys.modules changes size (Python 3.9) In-Reply-To: <1637196462.86.0.173865369445.issue45836@roundup.psfhosted.org> Message-ID: <1637251857.49.0.163853840226.issue45836@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Dennis! ? ? ? ---------- nosy: +lukasz.langa resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:12:16 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:12:16 +0000 Subject: [issue45701] Add tuple tests to `functools.lru_cache` In-Reply-To: <1635936448.66.0.888386290275.issue45701@roundup.psfhosted.org> Message-ID: <1637251936.88.0.102967244713.issue45701@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 0df5d31ac7b32d3b948952c834783cd357fa3e22 by Miss Islington (bot) in branch '3.10': bpo-45701: Improve documentation for *typed* parameter (GH-29498) (GH-29509) https://github.com/python/cpython/commit/0df5d31ac7b32d3b948952c834783cd357fa3e22 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:16:20 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 16:16:20 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637252180.33.0.749171800334.issue45835@roundup.psfhosted.org> miss-islington added the comment: New changeset 9450c751cc2053b1c2e03ec92ed822a41223b142 by Miss Islington (bot) in branch '3.9': bpo-45835: Fix race condition in test_queue (GH-29601) https://github.com/python/cpython/commit/9450c751cc2053b1c2e03ec92ed822a41223b142 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:17:37 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:17:37 +0000 Subject: [issue45736] 2to3 does not support integer division fixing In-Reply-To: <1636199426.55.0.893331092894.issue45736@roundup.psfhosted.org> Message-ID: <1637252257.09.0.413648789254.issue45736@roundup.psfhosted.org> ?ukasz Langa added the comment: We don't accept new features for 3.10 anymore, and since 2to3 is deprecated, we won't be updating it with new fixers and so on. It is pending removal in Python 3.13. Sorry, I understand this is a bummer but this part of Python hasn't seen serious development for the past few years and its parser is incompatible with modern 3.9+ code. ---------- nosy: +lukasz.langa resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:19:28 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:19:28 +0000 Subject: [issue44959] EXT_SUFFIX is missing '.sl' on HP-UX In-Reply-To: <1629452083.0.0.513630560234.issue44959@roundup.psfhosted.org> Message-ID: <1637252368.08.0.974128291019.issue44959@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 6d66de97f814fb504296c153957d87e49993f8ec by Miss Islington (bot) in branch '3.10': bpo-44959: Add fallback to extension modules with '.sl' suffix on HP-UX (GH-27857) (GH-29152) https://github.com/python/cpython/commit/6d66de97f814fb504296c153957d87e49993f8ec ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:21:05 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:21:05 +0000 Subject: [issue45835] Race condition in test_queue can lead to test failures In-Reply-To: <1637186240.11.0.170134157787.issue45835@roundup.psfhosted.org> Message-ID: <1637252465.15.0.650136055376.issue45835@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Sam! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:28:48 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:28:48 +0000 Subject: [issue45640] Production tokens are not clickable In-Reply-To: <1635390266.57.0.202926795869.issue45640@roundup.psfhosted.org> Message-ID: <1637252928.97.0.970747605166.issue45640@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 252d83cbf1bf0a6ac22a1347e760cd3e551bb834 by Miss Islington (bot) in branch '3.10': bpo-45640: [docs] Tokens are now clickable (GH-29260) (GH-29621) https://github.com/python/cpython/commit/252d83cbf1bf0a6ac22a1347e760cd3e551bb834 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 11:33:14 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 16:33:14 +0000 Subject: [issue45640] Production tokens are not clickable In-Reply-To: <1635390266.57.0.202926795869.issue45640@roundup.psfhosted.org> Message-ID: <1637253194.97.0.0241529201707.issue45640@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +27857 pull_request: https://github.com/python/cpython/pull/29623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 12:05:09 2021 From: report at bugs.python.org (mike mcleod) Date: Thu, 18 Nov 2021 17:05:09 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1637249767.11.0.172520284173.issue10483@roundup.psfhosted.org> Message-ID: mike mcleod added the comment: Hi Victor, Ok I'll do that. Regards, Mike On Thu, 18 Nov 2021 at 15:36, STINNER Victor wrote: > > STINNER Victor added the comment: > > I searched for open issues which contain "cgi" in their title. I found 43 > open issues. The oldest is 101 months ago. > > In 10 years, Lib/cgi.py got 43 commits. Only 13 commits in the last 5 > years (since 2016-01-01). > > It seems like the cgi module is not really maintained anymore. One option > is to do nothing: I guess that the most basic features continue to work. > Another option is to start deprecating all code related to CGI in the > stdlib. > > While CGI is not "commonly" used, it seems like it remains popular for > specific usages. So I don't think that it's time to deprecate it :-) > > > > You can for sure make a pull request and see if a core dev will review > and merge it > > Yep, just do that ;-) So far, nobody proposed a PR to fix this issue. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 12:13:32 2021 From: report at bugs.python.org (Muhammad Farhan) Date: Thu, 18 Nov 2021 17:13:32 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637255612.2.0.439689861959.issue45795@roundup.psfhosted.org> Muhammad Farhan added the comment: Maximum time in seconds that you allow the whole operation to take. This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down. Since 7.32.0, this option accepts decimal values, but the actual timeout will decrease in accuracy as the specified timeout increases in decimal precision. If this option is used several times, the last one will be used. Examples: curl --max-time 10 https://example.com curl --max-time 2.92 https://example.com Ref: https://curl.se/docs/manpage.html#-m ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 12:34:18 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 17:34:18 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1637256858.43.0.919313037587.issue45680@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset fde9f61e70bc38850783c81bf7c80c764ba6d9fa by Miss Islington (bot) in branch '3.10': [3.10] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) (GH-29620) https://github.com/python/cpython/commit/fde9f61e70bc38850783c81bf7c80c764ba6d9fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 12:41:16 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 17:41:16 +0000 Subject: [issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved In-Reply-To: <1635625289.5.0.271626210533.issue45680@roundup.psfhosted.org> Message-ID: <1637257276.87.0.8809254937.issue45680@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 591bf416090fb00795eed51f6863e3c5d9036c89 by Miss Islington (bot) in branch '3.9': [3.9] [doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389) (GH-29619) https://github.com/python/cpython/commit/591bf416090fb00795eed51f6863e3c5d9036c89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 13:37:58 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 18 Nov 2021 18:37:58 +0000 Subject: [issue45640] Production tokens are not clickable In-Reply-To: <1635390266.57.0.202926795869.issue45640@roundup.psfhosted.org> Message-ID: <1637260678.09.0.265410312854.issue45640@roundup.psfhosted.org> ?ukasz Langa added the comment: We won't be backporting this to 3.9 due to `make suspicious` being faulty on this version. More details on GH-29623. So this is fixed on 3.10 and 3.11. Thanks, Arthur! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 14:08:45 2021 From: report at bugs.python.org (Sam Gross) Date: Thu, 18 Nov 2021 19:08:45 +0000 Subject: [issue45838] Incorrect line numbers in GDB Python backtraces [3.9] Message-ID: <1637262525.44.0.265478658084.issue45838@roundup.psfhosted.org> New submission from Sam Gross : Starting in Python 3.6 the line numbers table contains a *signed* byte indicating line delta. The calculation in Tools/gdb/libpython.py was not updated to handle signed bytes leading to incorrect line numbers when running "py-bt" (or printing frames) in GDB. This issue does not exist in Python 3.10 or later because line number table was changed (and libpython.py was updated) in GH-23113. ---------- components: Demos and Tools messages: 406560 nosy: colesbury priority: normal severity: normal status: open title: Incorrect line numbers in GDB Python backtraces [3.9] type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 14:09:38 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 18 Nov 2021 19:09:38 +0000 Subject: [issue45834] Move runtime except: check to the parser In-Reply-To: <1637184477.04.0.544016485338.issue45834@roundup.psfhosted.org> Message-ID: <1637262578.64.0.230390855585.issue45834@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27858 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 14:22:54 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Nov 2021 19:22:54 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1637263374.27.0.250951339393.issue40059@roundup.psfhosted.org> Brett Cannon added the comment: > Hopefully tomli being less than a year old should not be a blocker, after all, TOML v1.0.0 is itself less than a year old. It's actually rather important as the semantics of how things work will effectively be locked in once a module is added to the stdlib, so we need to be careful. Plus had you asked this question less than a year go the answer would have been pypi.org/p/toml and now you're suggesting something different, so the year matters. ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 14:25:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 18 Nov 2021 19:25:08 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1637263508.61.0.0482340281646.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +27859 pull_request: https://github.com/python/cpython/pull/29627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 14:31:16 2021 From: report at bugs.python.org (Sam Gross) Date: Thu, 18 Nov 2021 19:31:16 +0000 Subject: [issue45838] Incorrect line numbers in GDB Python backtraces [3.9] In-Reply-To: <1637262525.44.0.265478658084.issue45838@roundup.psfhosted.org> Message-ID: <1637263876.21.0.636108978053.issue45838@roundup.psfhosted.org> Change by Sam Gross : ---------- keywords: +patch pull_requests: +27860 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 14:47:15 2021 From: report at bugs.python.org (Hugo van Kemenade) Date: Thu, 18 Nov 2021 19:47:15 +0000 Subject: [issue45837] Fix turtle deprecations In-Reply-To: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> Message-ID: <1637264835.92.0.500221846395.issue45837@roundup.psfhosted.org> Change by Hugo van Kemenade : ---------- pull_requests: +27861 pull_request: https://github.com/python/cpython/pull/29629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 14:47:24 2021 From: report at bugs.python.org (Hugo van Kemenade) Date: Thu, 18 Nov 2021 19:47:24 +0000 Subject: [issue45837] Fix turtle deprecations In-Reply-To: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> Message-ID: <1637264844.32.0.0476722684022.issue45837@roundup.psfhosted.org> Change by Hugo van Kemenade : ---------- pull_requests: +27862 pull_request: https://github.com/python/cpython/pull/29630 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 15:08:36 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 20:08:36 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1637266116.86.0.505642396756.issue45788@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +27863 pull_request: https://github.com/python/cpython/pull/29631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 15:08:41 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 18 Nov 2021 20:08:41 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1637266121.01.0.746479019792.issue45788@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27864 pull_request: https://github.com/python/cpython/pull/29632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 15:08:41 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Nov 2021 20:08:41 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1637266121.45.0.888302093614.issue45788@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4575c01b750cd26377e803247c38d65dad15e26a by Terry Jan Reedy in branch 'main': bpo-45788: Link sys.prefix doc to 'Installation paths' (#29606) https://github.com/python/cpython/commit/4575c01b750cd26377e803247c38d65dad15e26a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 15:30:24 2021 From: report at bugs.python.org (Ethan Furman) Date: Thu, 18 Nov 2021 20:30:24 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1637267424.3.0.328250373912.issue10483@roundup.psfhosted.org> Change by Ethan Furman : ---------- versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 15:57:34 2021 From: report at bugs.python.org (Glenn Linderman) Date: Thu, 18 Nov 2021 20:57:34 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1637249767.11.0.172520284173.issue10483@roundup.psfhosted.org> Message-ID: Glenn Linderman added the comment: On 11/18/2021 7:36 AM, STINNER Victor wrote: > STINNER Victor added the comment: > > I searched for open issues which contain "cgi" in their title. I found 43 open issues. The oldest is 101 months ago. > > In 10 years, Lib/cgi.py got 43 commits. Only 13 commits in the last 5 years (since 2016-01-01). > > It seems like the cgi module is not really maintained anymore. One option is to do nothing: I guess that the most basic features continue to work. I got the definite feeling 10 years ago that CGI wasn't being maintained, at least for Windows use, and that's why I forked it for private use and enhancement.? Nothing in the interim has made me change my mind, and your statistics support that.? I got the impression that most core developers used Unix-variants for their development, and likely most CGI users as well, and that Windows use of CGI just wasn't a priority for anyone in the core team.? But it has been useful for me, and if a little work were put into supporting it, I suspect it could be useful to others as well. But as a lowly non-core user unfamiliar with the ever-changing processes for submitting patches, I felt rather ignored (which apparently isn't an uncommon issue for users like me), but neither did I have the time to invest to learn the submission protocols, much less to advance to core development status, so I realized that it was partly my fault as well. > Another option is to start deprecating all code related to CGI in the stdlib. > > While CGI is not "commonly" used, it seems like it remains popular for specific usages. So I don't think that it's time to deprecate it :-) Deprecation would certainly be a disservice to the community, as CGI is the only (as far as I know) universal service available on pretty much all web server implementations.? There are probably better interfaces to user-supplied code on many web servers, but the ones I've heard about are not as universal, and not as simple for users to implement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 16:45:24 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Nov 2021 21:45:24 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1637271924.9.0.0411832590364.issue45788@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset c06c7c489a82b2db023bb947f0c4d21ad93b8308 by Miss Islington (bot) in branch '3.9': [3.9] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) (GH-29632) https://github.com/python/cpython/commit/c06c7c489a82b2db023bb947f0c4d21ad93b8308 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 16:46:15 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Nov 2021 21:46:15 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1637271975.86.0.728963199882.issue45788@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 2a630e716e488ac420d308736568829f76e388a3 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45788: Link sys.prefix doc to 'Installation paths' (GH-29606) https://github.com/python/cpython/commit/2a630e716e488ac420d308736568829f76e388a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 16:46:42 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 18 Nov 2021 21:46:42 +0000 Subject: [issue45788] Doc sys.prefix lib & include directories on Windows and Mac In-Reply-To: <1636654602.08.0.849024909649.issue45788@roundup.psfhosted.org> Message-ID: <1637272002.43.0.477170651793.issue45788@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 Nov 18 16:52:09 2021 From: report at bugs.python.org (Muhammad Irfan Asghar) Date: Thu, 18 Nov 2021 21:52:09 +0000 Subject: [issue45839] python3 executable is able to install pandas Message-ID: <1637272329.47.0.00758927636582.issue45839@roundup.psfhosted.org> New submission from Muhammad Irfan Asghar : pip3.10 install pandas WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pandas/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pandas/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pandas/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pandas/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/pandas/ Could not fetch URL https://pypi.org/simple/pandas/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))) - skipping ERROR: Could not find a version that satisfies the requirement pandas (from versions: none) ERROR: No matching distribution found for pandas Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))) - skipping ---------- components: Extension Modules messages: 406566 nosy: mirfanasghar priority: normal severity: normal status: open title: python3 executable is able to install pandas type: security versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 17:51:19 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Nov 2021 22:51:19 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1637275879.24.0.474054317496.issue10483@roundup.psfhosted.org> STINNER Victor added the comment: > I got the impression that most core developers used Unix-variants for their development, and likely most CGI users as well, and that Windows use of CGI just wasn't a priority for anyone in the core team. Core devs are volunteers who are free to pick what they like the most. There are few core devs who use Python on Windows, whereas they are many Python users on Windows. If you are able to split your enhancements as small PRs, I may be able to have a look. We do run our test suite on Windows. If each enhancement has a related test valided on Windows, it's ok. > Deprecation would certainly be a disservice to the community, as CGI is the only (as far as I know) universal service available on pretty much all web server implementations. The other question is not if CGI is useful or not, but if it should be maintained inside the stdlib, or on PyPI. Well, it's not exclusive :-) It's possible to have a more complete implementation on PyPI under a different name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 18:59:05 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 18 Nov 2021 23:59:05 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637272329.47.0.00758927636582.issue45839@roundup.psfhosted.org> Message-ID: <1637279945.85.0.621707397892.issue45839@roundup.psfhosted.org> Eric V. Smith added the comment: Please provide information about the system you?re running on. Also, tell us how Python was installed. I assume the title should be ?? is unable to install ??. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 21:01:26 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 19 Nov 2021 02:01:26 +0000 Subject: [issue45840] Improve cross-references in the data model documentation Message-ID: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> New submission from Alex Waygood : The documentation for the data model has a lot of cross-references to other parts of the data model. However, often these cross-references do not have proper hyperlinks online, as :meth:`__iter__` is used (for example), instead of :meth:`~object.__iter__`. The documentation would be much more readable and navigable if this were fixed. ---------- assignee: docs at python components: Documentation messages: 406569 nosy: AlexWaygood, docs at python priority: normal severity: normal status: open title: Improve cross-references in the data model documentation versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 21:01:35 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 19 Nov 2021 02:01:35 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1637287295.89.0.615124042715.issue45840@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 21:04:44 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 19 Nov 2021 02:04:44 +0000 Subject: [issue45840] Improve cross-references in the data model documentation In-Reply-To: <1637287286.96.0.846227383123.issue45840@roundup.psfhosted.org> Message-ID: <1637287484.5.0.311317424691.issue45840@roundup.psfhosted.org> Change by Alex Waygood : ---------- keywords: +patch pull_requests: +27865 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 18 23:06:58 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 19 Nov 2021 04:06:58 +0000 Subject: [issue34592] cdll.LoadLibrary allows None as an argument In-Reply-To: <1536183341.44.0.56676864532.issue34592@psf.upfronthosting.co.za> Message-ID: <1637294818.64.0.999434417402.issue34592@roundup.psfhosted.org> Gregory P. Smith added the comment: We do need to document this in ctypes.rst. Quite a bit of code depends on ctypes.CDLL(None) and similar to get at symbols linked into the interpreter or already dlopened into the process these days. It works on Linux; I'm assuming it likely does on everything POSIXy. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, gregory.p.smith stage: resolved -> needs patch status: closed -> open versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 01:01:52 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Nov 2021 06:01:52 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1637301712.55.0.263030230892.issue45235@roundup.psfhosted.org> Raymond Hettinger added the comment: Paul, should this be closed or do you think there is still a namespace issue to be resolved? ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 01:36:28 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Nov 2021 06:36:28 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1637303788.52.0.563416462132.issue19072@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +27866 pull_request: https://github.com/python/cpython/pull/29634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 02:04:25 2021 From: report at bugs.python.org (Don Chamberlin) Date: Fri, 19 Nov 2021 07:04:25 +0000 Subject: [issue45841] IDLE fails to save files in macO Message-ID: <1637305465.21.0.876821716058.issue45841@roundup.psfhosted.org> New submission from Don Chamberlin : Running Python 3.10.0 on MacOS 12.0.1 (Monterey). Start IDLE app to get an IDLE shell. Click File->New File. Edit window appears. Type # This is a comment in the edit window, then click File->Save or command-S. Error popup appears: "The save file operation failed to connect to the open and save panel service." (See attached screenshot.) Click "OK" on the error popup. File is now saved in the Documents folder with name "None". ---------- assignee: terry.reedy components: IDLE files: IDLE save error.png messages: 406572 nosy: don.chamberlin, terry.reedy priority: normal severity: normal status: open title: IDLE fails to save files in macO type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file50450/IDLE save error.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 02:07:05 2021 From: report at bugs.python.org (Don Chamberlin) Date: Fri, 19 Nov 2021 07:07:05 +0000 Subject: [issue45841] IDLE fails to save files in macOS 12.0.1 Monterey In-Reply-To: <1637305465.21.0.876821716058.issue45841@roundup.psfhosted.org> Message-ID: <1637305625.57.0.14749266726.issue45841@roundup.psfhosted.org> Change by Don Chamberlin : ---------- title: IDLE fails to save files in macO -> IDLE fails to save files in macOS 12.0.1 Monterey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 02:21:37 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 19 Nov 2021 07:21:37 +0000 Subject: [issue45829] Remove C stack use by specializing BINARY_SUBSCR, STORE_SUBSCR, LOAD_ATTR, and STORE_ATTR In-Reply-To: <1637142611.15.0.521267590311.issue45829@roundup.psfhosted.org> Message-ID: <1637306497.87.0.727785947967.issue45829@roundup.psfhosted.org> Dennis Sweeney added the comment: This snippet occurs a couple of times in ceval.c (BINARY_SUBSCR_GETITEM and CALL_FUNCTION_PY_SIMPLE): new_frame->previous = frame; frame = cframe.current_frame = new_frame; new_frame->depth = frame->depth + 1; Maybe I'm reading it wrong, but I think the last line is just setting new_frame->depth++, leaving new_frame->depth = 1 instead of frame->previous->depth + 1. I think the second and third lines should be swapped? ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 03:04:29 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Nov 2021 08:04:29 +0000 Subject: [issue45841] IDLE fails to save files in macOS 12.0.1 Monterey In-Reply-To: <1637305465.21.0.876821716058.issue45841@roundup.psfhosted.org> Message-ID: <1637309069.81.0.0705690037446.issue45841@roundup.psfhosted.org> Terry J. Reedy added the comment: Your OS and screenshot are identical to the one attached to #44828. #45641 is another duplicate. The fix should be in current 3.11, 3.10, and 3.9 mac installers. ---------- assignee: terry.reedy -> components: +macOS nosy: +ned.deily, ronaldoussoren resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> tkinter.filedialog linked with Tk 8.6.11 crashes on macOS 12 Monterey, breaking IDLE saves _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 03:06:09 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Nov 2021 08:06:09 +0000 Subject: [issue45841] IDLE fails to save files in macOS 12.0.1 Monterey In-Reply-To: <1637305465.21.0.876821716058.issue45841@roundup.psfhosted.org> Message-ID: <1637309169.94.0.910492533162.issue45841@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: -IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 03:31:56 2021 From: report at bugs.python.org (Julien Palard) Date: Fri, 19 Nov 2021 08:31:56 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637310716.48.0.781966019287.issue42238@roundup.psfhosted.org> Julien Palard added the comment: A new false positive today from 31b3a70edb1216bdc8fab3b2eafd8ddb00487f41: https://docs.python.org/dev/reference/datamodel.html#class-getitem-versus-getitem in: should be called:: from inspect import isclass def subscribe(obj, x): """Return the result of the expression `obj[x]`""" make suspicious whines about the backticks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 03:39:22 2021 From: report at bugs.python.org (Julien Palard) Date: Fri, 19 Nov 2021 08:39:22 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637311162.34.0.954551746162.issue42238@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +27867 pull_request: https://github.com/python/cpython/pull/29636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 04:27:32 2021 From: report at bugs.python.org (Ryan May) Date: Fri, 19 Nov 2021 09:27:32 +0000 Subject: [issue44556] ctypes unittest crashes with libffi 3.4.2 In-Reply-To: <1625275664.18.0.784580950779.issue44556@roundup.psfhosted.org> Message-ID: <1637314052.27.0.0330557816795.issue44556@roundup.psfhosted.org> Change by Ryan May : ---------- nosy: +Ryan May _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 05:16:57 2021 From: report at bugs.python.org (4-launchpad-kalvdans-no-ip-org) Date: Fri, 19 Nov 2021 10:16:57 +0000 Subject: [issue32696] Fix pickling exceptions with multiple arguments In-Reply-To: <1517156155.35.0.467229070634.issue32696@psf.upfronthosting.co.za> Message-ID: <1637317017.79.0.596002008787.issue32696@roundup.psfhosted.org> Change by 4-launchpad-kalvdans-no-ip-org : ---------- nosy: +4-launchpad-kalvdans-no-ip-org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 05:24:28 2021 From: report at bugs.python.org (=?utf-8?q?D=C3=A1vid_Nemeskey?=) Date: Fri, 19 Nov 2021 10:24:28 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1637317468.75.0.366338413147.issue42233@roundup.psfhosted.org> D?vid Nemeskey added the comment: Guys, any chance the fix will land in 3.9? It is affected as well. ---------- nosy: +nemeskeyd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 05:30:49 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 19 Nov 2021 10:30:49 +0000 Subject: [issue45609] Specialize STORE_SUBSCR In-Reply-To: <1635208946.04.0.990921573614.issue45609@roundup.psfhosted.org> Message-ID: <1637317849.21.0.340098589448.issue45609@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 036fead695a9a1e1082992d16ab46bca1cd61a25 by Dennis Sweeney in branch 'main': bpo-45609: Specialize STORE_SUBSCR (GH-29242) https://github.com/python/cpython/commit/036fead695a9a1e1082992d16ab46bca1cd61a25 ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 05:53:23 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 19 Nov 2021 10:53:23 +0000 Subject: [issue45636] Merge BINARY_*/INPLACE_* into BINARY_OP In-Reply-To: <1635372832.22.0.99301821488.issue45636@roundup.psfhosted.org> Message-ID: <1637319203.98.0.258207273143.issue45636@roundup.psfhosted.org> Change by Mark Shannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 07:06:17 2021 From: report at bugs.python.org (Francesc Elies) Date: Fri, 19 Nov 2021 12:06:17 +0000 Subject: [issue45842] AddressSanitizer: bad-free - hello world c extension Message-ID: <1637323577.79.0.578225391074.issue45842@roundup.psfhosted.org> New submission from Francesc Elies : Hi, Context ======= we are compiling a dll with clang and it's address sanitizer and loading it via cffi, at random spots ASAN complains with bad-free. ==15100==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x01991a850310 in thread T0 #0 0x7ffa1dcc7f31 (C:\LLVM-13.0.0-win64\lib\clang\13.0.0\lib\windows\clang_rt.asan_dynamic-x86_64.dll+0x180037f31) #1 0x7ffa3aea59ec in _PyObject_Realloc D:\_w\1\s\Objects\obmalloc.c:2011 #2 0x7ffa3af7f347 in _PyObject_GC_Resize D:\_w\1\s\Modules\gcmodule.c:2309 #3 0x7ffa3aedeeaa in _PyEval_EvalCode D:\_w\1\s\Python\ceval.c:4101 ... See links below for a full trace The project where we see this it's quite complex and with many moving parts therefore we made a minimal reproducible example. Reprex ====== The test boils down to the following: win32api.LoadLibrary("LLVM-13.0.0-win64/lib/clang/13.0.0/lib/windows/clang_rt.asan_dynamic-x86_64.dll") import hello # hello is our compiled c extension with clang and ASAN print(hello.system()) import pdb If if comment the last line (import pdb) ASAN does not complain. If instead of import pdb you import numpy the same problem can be seen. See the following failing build https://github.com/FrancescElies/min_reprex_python_c_extension_asan/runs/4263693010?check_suite_focus=true See here the CI test https://github.com/FrancescElies/min_reprex_python_c_extension_asan/blob/d966d3a472df71977dc6519a76be0120d2d58d39/test.py We did not try this in linux yet, would that help? Is this a bug? Or are we doing something wrong? Thanks in advance for your time. ---------- components: Windows messages: 406578 nosy: FrancescElies, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: AddressSanitizer: bad-free - hello world c extension versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 07:13:32 2021 From: report at bugs.python.org (Ad Timmering) Date: Fri, 19 Nov 2021 12:13:32 +0000 Subject: [issue42367] Restore os.makedirs ability to apply mode to all directories created In-Reply-To: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org> Message-ID: <1637324012.47.0.345477110427.issue42367@roundup.psfhosted.org> Change by Ad Timmering : ---------- nosy: +awtimmering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 07:17:36 2021 From: report at bugs.python.org (mike mcleod) Date: Fri, 19 Nov 2021 12:17:36 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1637324256.1.0.689836479782.issue1284670@roundup.psfhosted.org> mike mcleod added the comment: I would like to help with this issue. I note the history (using Git Dag) of the modulefinder.py shows that it has been modified with changes related here: Author: ?ric Araujo 2011-07-28 22:35:29 Committer: ?ric Araujo 2011-07-28 22:35:29 Parent: 867754e3e3c907f87d1bb0282df628deb392cd62 (merge 11164) Child: cee6bb549946bb096aa380a49f3b11daf2d8713e (Fix bug I unwittingly added in 1521d9837d16 (found by Ezio Melotti)) Branches: main, remotes/origin/3.10, remotes/origin/3.6, remotes/origin/3.7, remotes/origin/3.8, remotes/origin/3.9, remotes/origin/bpo-45514/deprecate-importlib-resources-legacy, remotes/origin/buildbot-custom, remotes/origin/main, remotes/upstream/3.10, remotes/upstream/3.6, remotes/upstream/3.7, remotes/upstream/3.8, remotes/upstream/3.9, remotes/upstream/bpo-45514/deprecate-importlib-resources-legacy, remotes/upstream/buildbot-custom, remotes/upstream/main, remotes/upstream/windeepfreeze Follows: v3.2.1 Precedes: v3.3.0a1 Modernize modulefinder module and tests a bit. The tests don?t use an internal distutils function anymore, and use regular assertEqual with sorted lists instead of a convoluted manual diff. and Author: ?ric Araujo 2011-08-01 14:29:07 Committer: ?ric Araujo 2011-08-01 14:29:07 Parent: 1e3a68d36b08cd9d59084a37c8cb6c2d911868ce (Modernize modulefinder module and tests a bit.) Child: cb66eb0deca1d5cd232f97c76a215ecaab958d30 (Issue #13959: Deprecate imp.get_suffixes() for new attributes on) Branches: main, remotes/origin/3.10, remotes/origin/3.6, remotes/origin/3.7, remotes/origin/3.8, remotes/origin/3.9, remotes/origin/bpo-45514/deprecate-importlib-resources-legacy, remotes/origin/buildbot-custom, remotes/origin/main, remotes/upstream/3.10, remotes/upstream/3.6, remotes/upstream/3.7, remotes/upstream/3.8, remotes/upstream/3.9, remotes/upstream/bpo-45514/deprecate-importlib-resources-legacy, remotes/upstream/buildbot-custom, remotes/upstream/main, remotes/upstream/windeepfreeze Follows: v3.2.1 Precedes: v3.3.0a1 Fix bug I unwittingly added in 1521d9837d16 (found by Ezio Melotti) And the modulefinder.py file has been subsequently modified by another 28 changes. So I am wondering if this issue is still relevant? ---------- nosy: +mikecmcleod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 07:33:18 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 19 Nov 2021 12:33:18 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1637325198.72.0.442472576906.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27868 pull_request: https://github.com/python/cpython/pull/29637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 08:14:29 2021 From: report at bugs.python.org (Patrick Yang) Date: Fri, 19 Nov 2021 13:14:29 +0000 Subject: [issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not In-Reply-To: <1388260592.79.0.323683192221.issue20092@psf.upfronthosting.co.za> Message-ID: <1637327669.68.0.0844385750724.issue20092@roundup.psfhosted.org> Patrick Yang added the comment: I ended up in this issue after I learnt the following from the Python Library Reference Manual. ---- float(..). For a general Python object x, float(x) delegates to x.__float__(). If __float__() is not defined then it falls back to __index__(). ---- The discussion on __int__() and __index__() was very interesting but I still didn't get the answer I wanted. If __int__() is assumed to be a possibly approximate conversion and it's possible that __int__() may exist while __index__() doesn't, shouldn't __int__() be used as a fall back before __index__()? The downside would be that the resulting float may not be "very close" to the original object because __int__() is only an approximation while __index__() guarantees exact, but loss of precision is acceptable during type conversion, isn't it? (i.e. int(3.14) -> 3). Perhaps it's not acceptable if the conversion is a widening conversion and that's why __int__() is skipped? ---------- nosy: +patrick.yang.1248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 08:14:24 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 19 Nov 2021 13:14:24 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1637327664.79.0.222682435543.issue45709@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +27869 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 08:14:41 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 19 Nov 2021 13:14:41 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1637327681.53.0.563345397699.issue45709@roundup.psfhosted.org> Mark Shannon added the comment: Sorry about the delay in fixing this. ---------- keywords: -patch stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:06:30 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Fri, 19 Nov 2021 14:06:30 +0000 Subject: [issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) Message-ID: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> New submission from theeshallnotknowethme : Result of `255581293 > 12938373 and 113314 < 2`: Unoptimized: 5000000 loops, best of 5: 42.6 nsec per loop Optimized: 20000000 loops, best of 5: 14.4 nsec per loop ---------- components: Interpreter Core messages: 406582 nosy: February291948 priority: normal severity: normal status: open title: Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:07:28 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Fri, 19 Nov 2021 14:07:28 +0000 Subject: [issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637330848.37.0.136383283853.issue45843@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- keywords: +patch pull_requests: +27870 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:09:12 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Fri, 19 Nov 2021 14:09:12 +0000 Subject: [issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637330952.48.0.319709633455.issue45843@roundup.psfhosted.org> theeshallnotknowethme added the comment: Above tested using `timeit.main`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:10:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 14:10:45 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637331045.8.0.0784085574436.issue45774@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 29e5874d5a9205c488f783356d0cf3f115399327 by Erlend Egeberg Aasland in branch 'main': bpo-45774: Autoconfiscate SQLite detection (GH-29507) https://github.com/python/cpython/commit/29e5874d5a9205c488f783356d0cf3f115399327 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:12:31 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 19 Nov 2021 14:12:31 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637331151.59.0.258493412431.issue45774@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:13:02 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 14:13:02 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637331182.47.0.582542389267.issue45774@roundup.psfhosted.org> Christian Heimes added the comment: Awesome work! Thanks to your tireless effort we know have a blue print how to use pkg-config for other librariess. ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:16:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 14:16:12 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637331372.48.0.505446414226.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: Erlend implemented pkg-config for sqlite3 in bpo-45774. Thanks to his tireless effort we now have a blue print how to port other checks to optional pkg-config lookup. ---------- superseder: -> Detect SQLite in configure.ac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:20:18 2021 From: report at bugs.python.org (Muhammad Irfan Asghar) Date: Fri, 19 Nov 2021 14:20:18 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637279945.85.0.621707397892.issue45839@roundup.psfhosted.org> Message-ID: Muhammad Irfan Asghar added the comment: Hi Eric Thanks for your reply. I am using MacOS Big Sur version 11.5.1. And I installed from python.org by downloading version for macOS and double click and installed it. Also installed PyCharm On Fri, Nov 19, 2021 at 12:59 AM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Please provide information about the system you?re running on. Also, tell > us how Python was installed. > > I assume the title should be ?? is unable to install ??. > > ---------- > nosy: +eric.smith > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:31:08 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 14:31:08 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637272329.47.0.00758927636582.issue45839@roundup.psfhosted.org> Message-ID: <1637332268.88.0.62904608342.issue45839@roundup.psfhosted.org> Christian Heimes added the comment: The bug report is a duplicate of bpo-43404. Python cannot use the system trust store on macOS. You need to follow the instructions at the end of the installation process to install root CA certificates. tl;dr run the " Install Certificates.command" from the installation folder. ---------- components: +Installation, macOS -Extension Modules nosy: +christian.heimes, ned.deily, ronaldoussoren resolution: -> not a bug stage: -> resolved status: open -> closed superseder: -> No SSL certificates when using the Mac installer type: security -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 09:35:18 2021 From: report at bugs.python.org (Ken Jin) Date: Fri, 19 Nov 2021 14:35:18 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1637332518.11.0.90986731768.issue42233@roundup.psfhosted.org> Ken Jin added the comment: @D?vid No it won't land in 3.9. Union type expressions (PEP 604) were only officially added in 3.10. We don't backport new features, only bugfixes. Sorry! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 10:14:20 2021 From: report at bugs.python.org (h-vetinari) Date: Fri, 19 Nov 2021 15:14:20 +0000 Subject: [issue44556] ctypes unittest crashes with libffi 3.4.2 In-Reply-To: <1625275664.18.0.784580950779.issue44556@roundup.psfhosted.org> Message-ID: <1637334860.19.0.590415014042.issue44556@roundup.psfhosted.org> Change by h-vetinari : ---------- nosy: +h-vetinari _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 10:16:58 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 19 Nov 2021 15:16:58 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1637335018.9.0.936794720229.issue45709@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 337cb480e9dc1d27594ebd87a0045d00ec8b1c3a by Mark Shannon in branch 'main': bpo-45709: Fix tracing when exception is handled. (GH-29638) https://github.com/python/cpython/commit/337cb480e9dc1d27594ebd87a0045d00ec8b1c3a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 10:41:03 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 15:41:03 +0000 Subject: [issue45573] Use pkg-config autoconf macros to detect flags for Modules/Setup In-Reply-To: <1634916163.65.0.792026628337.issue45573@roundup.psfhosted.org> Message-ID: <1637336463.26.0.729230878543.issue45573@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 7e44dc0ba768451f287a541cd1c85f7d87a41561 by Christian Heimes in branch 'main': bpo-45573: Move mandatory core modules to Modules/Setup.bootstrap (GH-29616) https://github.com/python/cpython/commit/7e44dc0ba768451f287a541cd1c85f7d87a41561 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:07:10 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 19 Nov 2021 16:07:10 +0000 Subject: [issue45806] Cannot Recover From StackOverflow in 3.9 Tests In-Reply-To: <1636954828.71.0.201093900258.issue45806@roundup.psfhosted.org> Message-ID: <1637338030.2.0.758498399869.issue45806@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +27871 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:18:39 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 19 Nov 2021 16:18:39 +0000 Subject: [issue45821] Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation In-Reply-To: <1637090468.13.0.603790423029.issue45821@roundup.psfhosted.org> Message-ID: <1637338719.84.0.682081159865.issue45821@roundup.psfhosted.org> Alex Waygood added the comment: It seems to me that there are two ways of resolving this: (1) Change the Python implementation to match the C implementation (make these parameters positional-only in the Python implementation). (2) Change the C implementation to match the Python implementation (make these parameters positional-or-keyword in the C implementation). If the decision is that solution (1) is the way to go, I'd be happy to submit a PR fixing this. If the decision is that solution (2) would be better, however, I'm not confident enough with writing C code to submit a PR. The C implementation is most widely used, so I think strategy (1) would not have too many backwards-compatibility concerns. Strategy (2) is still probably slightly more backwards-compatible, however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:41:42 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Nov 2021 16:41:42 +0000 Subject: [issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4 In-Reply-To: <1249679476.65.0.0604043126333.issue6669@psf.upfronthosting.co.za> Message-ID: <1637340102.76.0.191508266922.issue6669@roundup.psfhosted.org> STINNER Victor added the comment: File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 24, in read32 return struct.unpack(" Date: Tue Jan 22 17:01:59 2013 +0200 Issue #1159051: GzipFile now raises EOFError when reading a corrupted file with truncated header or footer. Added tests for reading truncated gzip and bzip2 files. --- File "/home/apy/ActivePython-2.6/lib/python2.6/tarfile.py", line 2307, in next self.fileobj.seek(self.offset) File "/home/apy/ActivePython-2.6/lib/python2.6/gzip.py", line 382, in seek self.read(1024) Moreover, gzip.GzipFile().seek() no longer calls self.read(1024): commit 2dbc6e6bce0a29757acddd8000d55f7c844295a2 Author: Antoine Pitrou Date: Sat Apr 11 00:31:01 2015 +0200 Issue #23529: Limit the size of decompressed data when reading from GzipFile, BZ2File or LZMAFile. This defeats denial of service attacks using compressed bombs (i.e. compressed payloads which decompress to a huge size). Patch by Martin Panter and Nikolaus Rath. IMO it's no longer possible to reproduce the gzip.error on gzip.GzipFile.seek(), so I close the issue as out of date. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:41:55 2021 From: report at bugs.python.org (JMcB) Date: Fri, 19 Nov 2021 16:41:55 +0000 Subject: [issue45844] Dead link 'consolelib' in faq/library Message-ID: <1637340115.5.0.328123119567.issue45844@roundup.psfhosted.org> New submission from JMcB : At https://docs.python.org/3/faq/library.html#is-there-a-curses-termcap-package-for-python it says: For Windows: use the consolelib module. And links to: http://effbot.org/zone/console-index.htm This link is dead. Also, a quick google search for consolelib doesn't yield any good results, and I've never heard of it myself. ---------- assignee: docs at python components: Documentation messages: 406594 nosy: JMcB17, docs at python priority: normal severity: normal status: open title: Dead link 'consolelib' in faq/library type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:43:21 2021 From: report at bugs.python.org (JMcB) Date: Fri, 19 Nov 2021 16:43:21 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library Message-ID: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> New submission from JMcB : At https://docs.python.org/3/faq/library.html#how-do-i-program-using-threads it says: Aahz has a set of slides from his threading tutorial that are helpful; see http://www.pythoncraft.com/OSCON2001/. This link is dead. ---------- assignee: docs at python components: Documentation messages: 406595 nosy: JMcB17, docs at python priority: normal severity: normal status: open title: Dead link 'pythoncraft.com/OSCON2001' in faq/library type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:45:15 2021 From: report at bugs.python.org (JMcB) Date: Fri, 19 Nov 2021 16:45:15 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming Message-ID: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> New submission from JMcB : At https://docs.python.org/3/faq/programming.html#how-can-i-have-modules-that-mutually-import-each-other it says: van Rossum doesn?t like this approach much because the imports appear in a strange place, but it does work. The V should be capitalised. References: https://gvanrossum.github.io/ https://en.wikipedia.org/wiki/Guido_van_Rossum#Life_and_education ---------- assignee: docs at python components: Documentation messages: 406596 nosy: JMcB17, docs at python priority: normal severity: normal status: open title: Incorrect name capitalisation in faq/programming type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:50:52 2021 From: report at bugs.python.org (JMcB) Date: Fri, 19 Nov 2021 16:50:52 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637340652.69.0.991399361062.issue45846@roundup.psfhosted.org> Change by JMcB : ---------- keywords: +patch pull_requests: +27872 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 11:56:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 16:56:30 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() Message-ID: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> New submission from Christian Heimes : bpo-45573 added the PY_STDLIB_MOD() autoconf macro, Modules/Setup.stdlib.in template, and setup.py helper method addext(). The macro sets up * MODULE_{NAME}_TRUE/FALSE conditional * MODULE_{NAME} variable with values yes, disabled, missing, or n/a * MODULE_{NAME}_CFLAGS * MODULE_{NAME}_LDFLAGS Additionally there is a MODULE_{NAME}_DEPS variable with dependency information. The Modules/Setup.stdlib.in template and addext() method consume the variables and set up extension compilation and linking. There is no need to look for headers or libraries in setup.py any more. Let's port all modules to the new approach. ---------- components: Build messages: 406597 nosy: christian.heimes priority: normal severity: normal status: open title: Port module setup to PY_STDLIB_MOD() macro and addext() type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:04:17 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 17:04:17 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637341457.04.0.0772225533245.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27874 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:05:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Nov 2021 17:05:41 +0000 Subject: [issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found In-Reply-To: <1394233042.66.0.931126122313.issue20868@psf.upfronthosting.co.za> Message-ID: <1637341541.17.0.528233008163.issue20868@roundup.psfhosted.org> Irit Katriel added the comment: > when you run the test suite in a chroot (to do "pure" builds) or in a network sandbox (for other functions) Do we support that? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:05:35 2021 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Nov 2021 17:05:35 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1637341535.22.0.869587428144.issue10202@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:10:36 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 17:10:36 +0000 Subject: [issue20868] Lib/test/test_socket.py: skip testGetServBy if /etc/services is not found In-Reply-To: <1394233042.66.0.931126122313.issue20868@psf.upfronthosting.co.za> Message-ID: <1637341836.58.0.0674277569454.issue20868@roundup.psfhosted.org> Christian Heimes added the comment: Nope, we don't have to support this edge case. ---------- nosy: +christian.heimes resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:16:06 2021 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Nov 2021 17:16:06 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1637342166.6.0.0933717966365.issue1284670@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:31:55 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Nov 2021 17:31:55 +0000 Subject: [issue45356] Calling `help` executes @classmethod @property decorated methods In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org> Message-ID: <1637343115.14.0.266435969089.issue45356@roundup.psfhosted.org> Raymond Hettinger added the comment: Also see: https://bugs.python.org/issue42073 The classmethod pass through broke some existing code and the "fix" for it looks dubious: if hasattr(type(self.f), '__get__'): return self.f.__get__(cls, cls) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:34:43 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Nov 2021 17:34:43 +0000 Subject: [issue29010] Incorrect description about scope related with inheritance In-Reply-To: <1482122733.15.0.137275171819.issue29010@psf.upfronthosting.co.za> Message-ID: <1637343283.27.0.868581476908.issue29010@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy, newcomer friendly versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:37:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Nov 2021 17:37:23 +0000 Subject: [issue28132] impossible to uninstall python3.6.0b1-amd64 from windows 10 In-Reply-To: <1473784984.9.0.26484337307.issue28132@psf.upfronthosting.co.za> Message-ID: <1637343443.52.0.828328532584.issue28132@roundup.psfhosted.org> Irit Katriel added the comment: 3.6 is no longer maintained. Please create a new issue if you have problems with a current version (3.9+). ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:46:25 2021 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 19 Nov 2021 17:46:25 +0000 Subject: [issue45848] Pegen's nice error reporting crashes non-UTF-8 files Message-ID: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> New submission from Petr Viktorin : Parsing a script with non-UTF-8 encoding and a missing close parenthesis, like a file with the following 2 lines: # encoding: ascii ( ... crashes with: python: Parser/pegen.c:408: get_error_line: Assertion `p->tok->fp == NULL || p->tok->fp == stdin' failed. Aborted (core dumped) ---------- components: Parser files: missing_paren_ascii.py messages: 406602 nosy: lys.nikolaou, pablogsal, petr.viktorin priority: normal severity: normal status: open title: Pegen's nice error reporting crashes non-UTF-8 files Added file: https://bugs.python.org/file50451/missing_paren_ascii.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 12:47:02 2021 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 19 Nov 2021 17:47:02 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637344022.86.0.906048349307.issue45848@roundup.psfhosted.org> Change by Petr Viktorin : ---------- title: Pegen's nice error reporting crashes non-UTF-8 files -> Pegen's nice error reporting crashes with non-UTF-8 files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:07:15 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:07:15 +0000 Subject: [issue45507] Small oversight in 3.11 gzip.decompress implementation with regards to backwards compatibility In-Reply-To: <1634547092.41.0.572458235667.issue45507@roundup.psfhosted.org> Message-ID: <1637345235.62.0.484672581097.issue45507@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 0ff3d95b9875805ac03aeffc37ae4458ce3b8ac0 by Ruben Vorderman in branch 'main': bpo-45507: EOFErrors should be thrown for truncated gzip members (GH-29029) https://github.com/python/cpython/commit/0ff3d95b9875805ac03aeffc37ae4458ce3b8ac0 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:11:33 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:11:33 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637345493.92.0.719962183694.issue42238@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset d32316a2aacc3b3c4f6f56f96edb09a4437c8bdb by Julien Palard in branch 'main': bpo-42238: [doc]: Hide false positive in make suspicious. (GH-29636) https://github.com/python/cpython/commit/d32316a2aacc3b3c4f6f56f96edb09a4437c8bdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:12:27 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 19 Nov 2021 18:12:27 +0000 Subject: [issue45356] Calling `help` executes @classmethod @property decorated methods In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org> Message-ID: <1637345547.62.0.764840774154.issue45356@roundup.psfhosted.org> Raymond Hettinger added the comment: I propose deprecating classmethod chaining. It has become clear that it doesn't really do what people wanted and can't easily be made to work. By even suggesting that some stateful decorators are composable, we've ventured onto thin ice. Wrapping property in a classmethod doesn't produce something that behaves like a real property. Mixing staticmethod and property doesn't work at all. Putting abstractmethod in the mix doesn't work well either. The ecosystem of code inspection tools, like help() in this issue, is wholly unprepared for recognizing and working around these combinations. The latest "fix" for classmethod chaining looks weird and worriesome as well: self.f.__get__(cls, cls). Classmethod chaining is relatively new, so we will affect very little code by deprecating it. Any of the possible use cases can be served in other ways like the wrapt package or by explicit code in __getattribute__. ---------- nosy: +lukasz.langa, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:15:58 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:15:58 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1637345758.82.0.249142963224.issue43185@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> Cannot Recover From StackOverflow in 3.9 Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:16:43 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:16:43 +0000 Subject: [issue42500] crash with unbounded recursion in except statement In-Reply-To: <1606635563.54.0.549807759752.issue42500@roundup.psfhosted.org> Message-ID: <1637345803.12.0.0292604267034.issue42500@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- superseder: -> Cannot Recover From StackOverflow in 3.9 Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:29:25 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 19 Nov 2021 18:29:25 +0000 Subject: [issue45356] Calling `help` executes @classmethod @property decorated methods In-Reply-To: <1633290355.98.0.210301350099.issue45356@roundup.psfhosted.org> Message-ID: <1637346565.31.0.303962025222.issue45356@roundup.psfhosted.org> Alex Waygood added the comment: It makes me sad that the stdlib will no longer provide a way to compose classmethods with other descriptors. However, I agree that deprecating classmethod chaining is probably the correct course of action, given the complications this feature has caused, and the backwards-compatibility issues it raises. This is probably a conversation for another BPO issue or the python-ideas mailing list, but I hope some consideration can be given in the future as to whether a new classmethod-like feature could possibly be added to functools that would enable this kind of decorator chaining without the same code-breakage concerns that this feature has had. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:43:59 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:43:59 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1637347439.81.0.929806516036.issue19072@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e34809e1c2a09478f4e0651d551c9c12d3c556ab by Raymond Hettinger in branch 'main': bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634) https://github.com/python/cpython/commit/e34809e1c2a09478f4e0651d551c9c12d3c556ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:44:20 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Nov 2021 18:44:20 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1637347460.59.0.256058024249.issue19072@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27875 pull_request: https://github.com/python/cpython/pull/29643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:44:42 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:44:42 +0000 Subject: [issue45507] Small oversight in 3.11 gzip.decompress implementation with regards to backwards compatibility In-Reply-To: <1634547092.41.0.572458235667.issue45507@roundup.psfhosted.org> Message-ID: <1637347482.9.0.250469319003.issue45507@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks for noticing, Ruben! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:51:58 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:51:58 +0000 Subject: [issue45806] Cannot Recover From StackOverflow in 3.9 Tests In-Reply-To: <1636954828.71.0.201093900258.issue45806@roundup.psfhosted.org> Message-ID: <1637347918.35.0.785489244568.issue45806@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 4296396db017d782d3aa16100b366748c9ea4a04 by Mark Shannon in branch '3.9': [3.9] bpo-45806: Fix recovery from stack overflow for 3.9. Again. (GH-29640) https://github.com/python/cpython/commit/4296396db017d782d3aa16100b366748c9ea4a04 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:52:28 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:52:28 +0000 Subject: [issue45806] Cannot Recover From StackOverflow in 3.9 Tests In-Reply-To: <1636954828.71.0.201093900258.issue45806@roundup.psfhosted.org> Message-ID: <1637347948.21.0.289254417498.issue45806@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:53:54 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:53:54 +0000 Subject: [issue45838] Incorrect line numbers in GDB Python backtraces [3.9] In-Reply-To: <1637262525.44.0.265478658084.issue45838@roundup.psfhosted.org> Message-ID: <1637348034.48.0.183637797625.issue45838@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 2a32dbf110cf80ec9a00290ea6bc84f409948cb0 by Sam Gross in branch '3.9': [3.9] bpo-45838: Fix incorrect line numbers in Tools/gdb/libpython.py (GH-29628) https://github.com/python/cpython/commit/2a32dbf110cf80ec9a00290ea6bc84f409948cb0 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:54:24 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:54:24 +0000 Subject: [issue45838] Incorrect line numbers in GDB Python backtraces [3.9] In-Reply-To: <1637262525.44.0.265478658084.issue45838@roundup.psfhosted.org> Message-ID: <1637348064.37.0.373792545548.issue45838@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Sam! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:54:51 2021 From: report at bugs.python.org (neonene) Date: Fri, 19 Nov 2021 18:54:51 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1637348091.95.0.446860479887.issue45116@roundup.psfhosted.org> neonene added the comment: In the eval-loop of PR29565, inlining seems to be enabled within about 70 op-brahches, trained with 44 tests. log & source: ceval_PR29565_split_func.c (not for performance) ---------- Added file: https://bugs.python.org/file50452/ceval_PR29565_split_func.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:55:28 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:55:28 +0000 Subject: [issue45837] Fix turtle deprecations In-Reply-To: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> Message-ID: <1637348128.81.0.557977584631.issue45837@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e8d41eea7a73a91cf1da2a4e60245902226bc599 by Hugo van Kemenade in branch '3.9': bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29630) https://github.com/python/cpython/commit/e8d41eea7a73a91cf1da2a4e60245902226bc599 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:55:48 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:55:48 +0000 Subject: [issue45837] Fix turtle deprecations In-Reply-To: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> Message-ID: <1637348148.98.0.985287983256.issue45837@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 9501e8d3a339c5a9217b7d90275d2a8c8cba5d13 by Hugo van Kemenade in branch '3.10': bpo-45837: Note tiltangle is not deprecated, it's really settiltangle (GH-29629) https://github.com/python/cpython/commit/9501e8d3a339c5a9217b7d90275d2a8c8cba5d13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 13:56:10 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 18:56:10 +0000 Subject: [issue45837] Fix turtle deprecations In-Reply-To: <1637243025.5.0.541899962975.issue45837@roundup.psfhosted.org> Message-ID: <1637348170.78.0.904355215147.issue45837@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks, Hugo! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 14:00:06 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Nov 2021 19:00:06 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637348406.31.0.0173638661661.issue45848@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27876 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 14:01:10 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 19:01:10 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637348470.64.0.477421502748.issue45848@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 14:11:38 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 19 Nov 2021 19:11:38 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637349098.82.0.0868692243529.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 14:12:24 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 19 Nov 2021 19:12:24 +0000 Subject: [issue19072] classmethod doesn't honour descriptor protocol of wrapped callable In-Reply-To: <1379856164.11.0.6368818134.issue19072@psf.upfronthosting.co.za> Message-ID: <1637349144.59.0.278374235353.issue19072@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset bbe3c57c865439f2194eb760a4362b5506d221a7 by Miss Islington (bot) in branch '3.10': bpo-19072: Classmethod can wrap other classmethod like descriptors (GH-29634) (GH-29643) https://github.com/python/cpython/commit/bbe3c57c865439f2194eb760a4362b5506d221a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 14:20:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 19:20:40 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637349640.44.0.625018793354.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset c8c21bdd199f9feb75fc6cdb398a686dc133b99f by Christian Heimes in branch 'main': bpo-45847: Port builtin hashlib extensions to PY_STDLIB_MOD (GH-29642) https://github.com/python/cpython/commit/c8c21bdd199f9feb75fc6cdb398a686dc133b99f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 14:55:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Nov 2021 19:55:53 +0000 Subject: [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1637351753.82.0.344075070771.issue28445@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy, newcomer friendly type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 16:23:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 19 Nov 2021 21:23:11 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637356991.18.0.310478282993.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27877 pull_request: https://github.com/python/cpython/pull/29644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:00:04 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2021 22:00:04 +0000 Subject: [issue45844] Dead link 'consolelib' in faq/library In-Reply-To: <1637340115.5.0.328123119567.issue45844@roundup.psfhosted.org> Message-ID: <1637359204.3.0.101782409134.issue45844@roundup.psfhosted.org> ?ric Araujo added the comment: Archived version: https://web.archive.org/web/20191202041245/http://effbot.org/zone/console-index.htm The whole FAQ entry should be reviewed for relevance. Is it true that curses is not built by default? Should third-party curses modules be recommended? How do people develop text user interfaces on windows these days? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:04:42 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2021 22:04:42 +0000 Subject: [issue45823] phyton stopped working In-Reply-To: <1637091661.28.0.129849432506.issue45823@roundup.psfhosted.org> Message-ID: <1637359482.95.0.490558968469.issue45823@roundup.psfhosted.org> ?ric Araujo added the comment: Please give a more detailed answer: what is your OS version, what?s the version of python and how did you install it, what is your IDE or how do you run your python script, copy full error messages from event viewer. It would also be useful if you attached your script! ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:07:56 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 19 Nov 2021 22:07:56 +0000 Subject: [issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect In-Reply-To: <1636878037.09.0.00718141853617.issue45805@roundup.psfhosted.org> Message-ID: <1637359676.7.0.705263197759.issue45805@roundup.psfhosted.org> ?ric Araujo added the comment: No worry about posting multiple messages. I think the flag is documented through the __future__ module. Future imports are both special-cased by the compiler to enable custom behaviour, but also real, regular imports! >>> from __future__ import annotations >>> annotations _Feature((3, 7, 0, 'beta', 1), (3, 10, 0, 'alpha', 0), 16777216) >>> hex(annotations.compiler_flag) '0x1000000' ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:15:08 2021 From: report at bugs.python.org (Saul Shanabrook) Date: Fri, 19 Nov 2021 22:15:08 +0000 Subject: [issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect In-Reply-To: <1636878037.09.0.00718141853617.issue45805@roundup.psfhosted.org> Message-ID: <1637360108.01.0.499433400387.issue45805@roundup.psfhosted.org> Saul Shanabrook added the comment: Thanks ?ric! Do you think it would make sense to add the future flags as well to the inspect flags documentation (https://docs.python.org/3/library/inspect.html#code-objects-bit-flags) and to the dis.pretty_flags? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:28:51 2021 From: report at bugs.python.org (JMcB) Date: Fri, 19 Nov 2021 22:28:51 +0000 Subject: [issue45844] Dead link 'consolelib' in faq/library In-Reply-To: <1637340115.5.0.328123119567.issue45844@roundup.psfhosted.org> Message-ID: <1637360931.85.0.0950829654774.issue45844@roundup.psfhosted.org> JMcB added the comment: The command line libraries I'm aware of that support windows are Blessed (curses-based), Rich, Asciimatics, and python-prompt-toolkit. >From here: https://www.pythondiscord.com/events/code-jams/8/frameworks/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 17:50:55 2021 From: report at bugs.python.org (thewh1teagle) Date: Fri, 19 Nov 2021 22:50:55 +0000 Subject: [issue45849] Embedded python doesn't recognize exit() Message-ID: <1637362255.56.0.439267672829.issue45849@roundup.psfhosted.org> New submission from thewh1teagle : C:\Users\user\Downloads\python-3.10.0-embed-win32>python Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 18:46:30) [MSC v.1929 32 bit (Intel)] on win32 >>> exit Traceback (most recent call last): File "", line 1, in NameError: name 'exit' is not defined >>> exit() Traceback (most recent call last): File "", line 1, in NameError: name 'exit' is not defined >>> import os;os._exit(0) C:\Users\user\Downloads\python-3.10.0-embed-win32> same error when running exit from file. ---------- components: Windows messages: 406624 nosy: paul.moore, steve.dower, thewh1teagle, tim.golden, zach.ware priority: normal severity: normal status: open title: Embedded python doesn't recognize exit() type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:06:52 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Nov 2021 23:06:52 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637363212.34.0.461168852166.issue45848@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27878 pull_request: https://github.com/python/cpython/pull/29646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:12:04 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Nov 2021 23:12:04 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637363524.6.0.124176799955.issue45727@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 546cefcda75d7150b55c8bc1724bea35a1e12890 by Pablo Galindo Salgado in branch 'main': bpo-45727: Make the syntax error for missing comma more consistent (GH-29427) https://github.com/python/cpython/commit/546cefcda75d7150b55c8bc1724bea35a1e12890 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:16:33 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Nov 2021 23:16:33 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637363793.36.0.428786324479.issue45727@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27879 pull_request: https://github.com/python/cpython/pull/29647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:17:03 2021 From: report at bugs.python.org (jakirkham) Date: Fri, 19 Nov 2021 23:17:03 +0000 Subject: [issue44556] ctypes unittest crashes with libffi 3.4.2 In-Reply-To: <1625275664.18.0.784580950779.issue44556@roundup.psfhosted.org> Message-ID: <1637363823.31.0.186487464211.issue44556@roundup.psfhosted.org> jakirkham added the comment: We ran into the same issue in conda-forge ( https://github.com/conda-forge/python-feedstock/issues/522 ). The problem is Apple also supplies their own `libffi`. However if the build scripts in CPython fail to find the user provided `libffi`, they end up pulling the headers from Apple's `libffi`, but the linker will link to the user provided `libffi`. IOW mashing these two incompatible `libffi`'s together. As result one gets crashes like the one illustrated in this bug. In conda-forge, we are resolving this by forcing our `pkg-config` to be used to ensure we pick up the headers from our `libffi` as well as the libraries. Other users may be able to workaround this issue by explicitly setting `LIBFFI_INCLUDE_DIR`. That said, it would be preferable to have a clear way to specify the `libffi` used and ensure that Apple's one doesn't get accidentally pulled in. If this exists and we are just missing these details, some pointers to this effect would be very helpful. ---------- nosy: +jakirkham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:23:06 2021 From: report at bugs.python.org (Eli Rykoff) Date: Fri, 19 Nov 2021 23:23:06 +0000 Subject: [issue44556] ctypes unittest crashes with libffi 3.4.2 In-Reply-To: <1625275664.18.0.784580950779.issue44556@roundup.psfhosted.org> Message-ID: <1637364186.59.0.445032614501.issue44556@roundup.psfhosted.org> Eli Rykoff added the comment: To add a bit more color, I don't think you can explicitly set LIBFFI_INCLUDE_DIR, it's set by the configure script explicitly. The problem is that some time between python 3.9 and 3.10 the configure script has (at least in our system) failed to figure out the $PKG_CONFIG variable correctly. It should be set to the executable with the full path name, as is done with 3.9, but now it is set to just the executable name. When that happens the library location check fails. ---------- nosy: +erykoff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:24:04 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Nov 2021 23:24:04 +0000 Subject: [issue45849] Embedded python doesn't recognize exit() In-Reply-To: <1637362255.56.0.439267672829.issue45849@roundup.psfhosted.org> Message-ID: <1637364244.2.0.496523241042.issue45849@roundup.psfhosted.org> Steve Dower added the comment: This is expected. The top-level exit() command only exists when the site module is imported, which is not the default for embedded Python (you should specify all the import paths explicitly, since they're going to be in your app rather than found by searching the disk). You probably want to use sys.exit() in your script. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:26:04 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Nov 2021 23:26:04 +0000 Subject: [issue45506] Out of source tree builds failing on main - test_importlib others unreliable In-Reply-To: <1634543628.08.0.540033030663.issue45506@roundup.psfhosted.org> Message-ID: <1637364364.02.0.109654438679.issue45506@roundup.psfhosted.org> Steve Dower added the comment: Hijacking this issue number for a related test failure I found: if you "make install" Python and then run the test_embed tests from the build directory, some will successfully find the stdlib under PREFIX and fail because they expect to never find it. PR incoming. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:27:50 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Nov 2021 23:27:50 +0000 Subject: [issue45506] Out of source tree builds failing on main - test_importlib others unreliable In-Reply-To: <1634543628.08.0.540033030663.issue45506@roundup.psfhosted.org> Message-ID: <1637364470.7.0.371217275999.issue45506@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +27880 pull_request: https://github.com/python/cpython/pull/29649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:37:01 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Nov 2021 23:37:01 +0000 Subject: [issue45811] Improve error message when source code contains invisible control characters In-Reply-To: <1637020357.3.0.163492557929.issue45811@roundup.psfhosted.org> Message-ID: <1637365021.39.0.505874797053.issue45811@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:42:14 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Nov 2021 23:42:14 +0000 Subject: [issue45811] Improve error message when source code contains invisible control characters In-Reply-To: <1637020357.3.0.163492557929.issue45811@roundup.psfhosted.org> Message-ID: <1637365334.78.0.251305588554.issue45811@roundup.psfhosted.org> Terry J. Reedy added the comment: I agree. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:44:27 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Nov 2021 23:44:27 +0000 Subject: [issue45850] Port deep-freeze to Windows Message-ID: <1637365467.09.0.176625289906.issue45850@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: gvanrossum priority: normal severity: normal status: open title: Port deep-freeze to Windows versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:44:56 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Nov 2021 23:44:56 +0000 Subject: [issue45850] Port deep-freeze to Windows Message-ID: <1637365496.24.0.78431007201.issue45850@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +27881 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:46:10 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Nov 2021 23:46:10 +0000 Subject: [issue45272] 'os.path' should not be a frozen module In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org> Message-ID: <1637365570.21.0.706543323727.issue45272@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27882 pull_request: https://github.com/python/cpython/pull/29648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 18:46:10 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Nov 2021 23:46:10 +0000 Subject: [issue45273] OS-specific frozen modules are built, even on other OSes. In-Reply-To: <1632418305.93.0.879771690458.issue45273@roundup.psfhosted.org> Message-ID: <1637365570.4.0.298859623376.issue45273@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch nosy: +gvanrossum nosy_count: 2.0 -> 3.0 pull_requests: +27883 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:04:20 2021 From: report at bugs.python.org (Isuru Fernando) Date: Sat, 20 Nov 2021 00:04:20 +0000 Subject: [issue44556] ctypes unittest crashes with libffi 3.4.2 In-Reply-To: <1625275664.18.0.784580950779.issue44556@roundup.psfhosted.org> Message-ID: <1637366660.96.0.604951499699.issue44556@roundup.psfhosted.org> Isuru Fernando added the comment: Duplicate of https://bugs.python.org/issue45350 ---------- nosy: +isuruf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:11:43 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 20 Nov 2021 00:11:43 +0000 Subject: [issue45506] Out of source tree builds failing on main - test_importlib others unreliable In-Reply-To: <1634543628.08.0.540033030663.issue45506@roundup.psfhosted.org> Message-ID: <1637367103.72.0.286284520346.issue45506@roundup.psfhosted.org> Steve Dower added the comment: New changeset 4c616911b69ce07fb35da1721506bfaba0998c30 by Steve Dower in branch 'main': bpo-45506: Fix test_embed expecting to not find stdlib in source tree build when stdlib has been installed. (GH-29649) https://github.com/python/cpython/commit/4c616911b69ce07fb35da1721506bfaba0998c30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:11:55 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:11:55 +0000 Subject: [issue45273] OS-specific frozen modules are built, even on other OSes. In-Reply-To: <1632418305.93.0.879771690458.issue45273@roundup.psfhosted.org> Message-ID: <1637367115.27.0.968931188344.issue45273@roundup.psfhosted.org> Guido van Rossum added the comment: (Note, that PR doesn't actually fix this, its description just references this.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:12:30 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:12:30 +0000 Subject: [issue45273] OS-specific frozen modules are built, even on other OSes. In-Reply-To: <1632418305.93.0.879771690458.issue45273@roundup.psfhosted.org> Message-ID: <1637367150.96.0.1788659784.issue45273@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: -27883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:12:50 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:12:50 +0000 Subject: [issue45273] OS-specific frozen modules are built, even on other OSes. In-Reply-To: <1632418305.93.0.879771690458.issue45273@roundup.psfhosted.org> Message-ID: <1637367170.08.0.798834270462.issue45273@roundup.psfhosted.org> Change by Guido van Rossum : ---------- Removed message: https://bugs.python.org/msg406633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:13:15 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:13:15 +0000 Subject: [issue45272] 'os.path' should not be a frozen module In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org> Message-ID: <1637367195.7.0.479827169092.issue45272@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: -27882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:28:14 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:28:14 +0000 Subject: [issue45272] 'os.path' should not be a frozen module In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org> Message-ID: <1637368094.66.0.266737759948.issue45272@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27884 pull_request: https://github.com/python/cpython/pull/29648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:28:14 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:28:14 +0000 Subject: [issue45273] OS-specific frozen modules are built, even on other OSes. In-Reply-To: <1632418305.93.0.879771690458.issue45273@roundup.psfhosted.org> Message-ID: <1637368094.85.0.527631720303.issue45273@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27887 pull_request: https://github.com/python/cpython/pull/29648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:28:14 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:28:14 +0000 Subject: [issue45272] 'os.path' should not be a frozen module In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org> Message-ID: <1637368094.91.0.170041056627.issue45272@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27884, 27885, 27886 pull_request: https://github.com/python/cpython/pull/29648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:28:14 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 00:28:14 +0000 Subject: [issue45272] 'os.path' should not be a frozen module In-Reply-To: <1632414295.46.0.740648553614.issue45272@roundup.psfhosted.org> Message-ID: <1637368094.82.0.979042413113.issue45272@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27884, 27885 pull_request: https://github.com/python/cpython/pull/29648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:40:38 2021 From: report at bugs.python.org (Brett Cannon) Date: Sat, 20 Nov 2021 00:40:38 +0000 Subject: [issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are In-Reply-To: <1632168182.73.0.0551762354894.issue45250@roundup.psfhosted.org> Message-ID: <1637368838.83.0.816222507445.issue45250@roundup.psfhosted.org> Brett Cannon added the comment: New changeset be36e0634060c7d5dee8e8876fb888bbb53d992a by Brett Cannon in branch 'main': bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170) https://github.com/python/cpython/commit/be36e0634060c7d5dee8e8876fb888bbb53d992a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:57:16 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 20 Nov 2021 00:57:16 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1637369836.82.0.303776549105.issue45816@roundup.psfhosted.org> Steve Dower added the comment: Looks like the fix for those errors is to specify the arguments to the linker in PCbuild/pyproject.props /OPT:REF,NOICF /CGTHREADS:1 /PDBTHREADS:1 %(AdditionalOptions) I don't particularly know what a good number of threads is for this. One seems safe, but maybe we can get faster builds with more? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 19:59:53 2021 From: report at bugs.python.org (Brett Cannon) Date: Sat, 20 Nov 2021 00:59:53 +0000 Subject: [issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are In-Reply-To: <1632168182.73.0.0551762354894.issue45250@roundup.psfhosted.org> Message-ID: <1637369993.71.0.0432962433073.issue45250@roundup.psfhosted.org> Change by Brett Cannon : ---------- pull_requests: +27888 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:03:57 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:03:57 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637370237.63.0.683284498781.issue45813@roundup.psfhosted.org> Terry J. Reedy added the comment: No crash on Windows running in CommandPrompt (using -i to ensure that python survives running the test code): C:\Users\Terry>py -3.10 -i f:/dev/tem/tem.py f:\dev\tem\tem.py:5: RuntimeWarning: coroutine 'f' was never awaited del f RuntimeWarning: Enable tracemalloc to get the object allocation traceback >>> quit() C:\Users\Terry>py -3.11 -i f:/dev/tem/tem.py f:\dev\tem\tem.py:5: RuntimeWarning: coroutine 'f' was never awaited del f RuntimeWarning: Enable tracemalloc to get the object allocation traceback >>> quit() Running in IDLE, I only see the first warning. (IDLE bug? python behavior difference? Don't know yet.) On 3.11, the remote process crashes and IDLE's Shell does an unrequested restart. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:05:10 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:05:10 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637370310.28.0.103078267776.issue45813@roundup.psfhosted.org> Terry J. Reedy added the comment: On 3.11, both of the last two lines are required for the crash and restart. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:13:42 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:13:42 +0000 Subject: [issue45823] python stopped working In-Reply-To: <1637091661.28.0.129849432506.issue45823@roundup.psfhosted.org> Message-ID: <1637370822.48.0.34968149149.issue45823@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: phyton stopped working -> python stopped working _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:25:56 2021 From: report at bugs.python.org (Harald Husum) Date: Sat, 20 Nov 2021 01:25:56 +0000 Subject: [issue45832] Misleading membersip expression documentation In-Reply-To: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> Message-ID: <1637371556.34.0.891678187832.issue45832@roundup.psfhosted.org> Change by Harald Husum : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:35:57 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:35:57 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637372157.47.0.39952518527.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch nosy: +terry.reedy nosy_count: 2.0 -> 3.0 pull_requests: +27889 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:36:38 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:36:38 +0000 Subject: [issue44845] Allow keyword arguments in code.__new__ In-Reply-To: <1628193355.65.0.685014983693.issue44845@roundup.psfhosted.org> Message-ID: <1637372198.96.0.266927561929.issue44845@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +terry.reedy nosy_count: 2.0 -> 3.0 pull_requests: +27890 pull_request: https://github.com/python/cpython/pull/29651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:37:25 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:37:25 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637372245.65.0.840539807263.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -27889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:38:07 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:38:07 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637372287.65.0.325545536074.issue45845@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch nosy: +terry.reedy nosy_count: 2.0 -> 3.0 pull_requests: +27891 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:38:07 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:38:07 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637372287.74.0.249041760849.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +27892 pull_request: https://github.com/python/cpython/pull/29651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:38:23 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:38:23 +0000 Subject: [issue44845] Allow keyword arguments in code.__new__ In-Reply-To: <1628193355.65.0.685014983693.issue44845@roundup.psfhosted.org> Message-ID: <1637372303.57.0.268140992014.issue44845@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -27890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:42:08 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Sat, 20 Nov 2021 01:42:08 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) Message-ID: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> New submission from Stefan Pochmann : The current implementation is: def multimode(data): counts = Counter(iter(data)).most_common() maxcount, mode_items = next(groupby(counts, key=itemgetter(1)), (0, [])) return list(map(itemgetter(0), mode_items)) The most_common() does a complete sort of Counter item tuples, taking O(n log n) time and quite big O(n) extra space (mostly for all those tuples). When Raymond Hettinger suggested it in https://bugs.python.org/issue35892#msg336338 he said it should have "running speed that is optimal for the desired result". But then he detailed that with "Slow O(n log n), loads all data in memory, full sort". Which seems like a mistake, as that's not optimal. It's easy to do in O(n) time and O(1) extra memory (in addition to the Counter and result, I mean): def multimode(data): counts = Counter(iter(data)) if not counts: return [] maxcount = max(counts.values()) return [value for value, count in counts.items() if count == maxcount] If there are only very few *different* values then the time/space after creating the Counter is insignificant compared to the Counter creation. But if there are many different values, it can be significant. statistics.mode takes O(n) time and O(1) space, which is optimal, but I found an apparently faster way anyway (code at end). For example for data = random.choices(range(n), k=n): | multimode | mode n | current proposal | current proposal -----------+-------------------+------------------ 1 | 131% 70% | 125% 58% 10 | 144% 73% | 119% 53% 100 | 126% 71% | 108% 29% 1,000 | 123% 65% | 62% 22% 10,000 | 172% 55% | 53% 18% 100,000 | 164% 44% | 55% 20% 1,000,000 | 85% 20% | 22% 4% 10,000,000 | 56% 12% | 11% 4% All four start with Counter(iter(data)), so I took that as baseline and the above results show relative additional times. For example 55% means if Counter construction alone took 10 seconds, the function took 15.5 seconds. An extreme case, data = list(range(n)): | multimode | mode n | current proposal | current proposal -----------+------------------+----------------- 1 | 128% 67% | 124% 56% 10 | 187% 93% | 141% 52% 100 | 316% 149% | 181% 45% 1,000 | 380% 174% | 213% 46% 10,000 | 349% 111% | 146% 30% 100,000 | 397% 128% | 159% 34% 1,000,000 | 336% 95% | 112% 24% 10,000,000 | 349% 97% | 109% 23% I also tried a bunch of other cases, didn't find one where my versions weren't quite a bit faster. My mode() version: from operator import indexOf from itertools import islice def mode(data): counts = Counter(iter(data)) if not counts: raise StatisticsError('no mode for empty data') from None maxcount = max(counts.values()) index = indexOf(counts.values(), maxcount) return next(islice(counts, index, None)) ---------- components: Library (Lib) messages: 406638 nosy: Stefan Pochmann priority: normal severity: normal status: open title: statistics.multimode is inefficient (time and space) (mode somewhat, too) type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:44:51 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Sat, 20 Nov 2021 01:44:51 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) In-Reply-To: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> Message-ID: <1637372691.48.0.586368962337.issue45851@roundup.psfhosted.org> Stefan Pochmann added the comment: (somehow the benchmark script didn't get attached, trying again) ---------- Added file: https://bugs.python.org/file50453/multimode_mode.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:45:13 2021 From: report at bugs.python.org (Julien Palard) Date: Sat, 20 Nov 2021 01:45:13 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637372713.78.0.407463973101.issue42238@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +27893 pull_request: https://github.com/python/cpython/pull/29652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:49:58 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:49:58 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637372998.26.0.313184826406.issue45846@roundup.psfhosted.org> Terry J. Reedy added the comment: >From Guido's page: 'But when my last name is used alone to refer to me, it is capitalized, for example: "As usual, Van Rossum ..."' and similar usage on wiki page. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:50:05 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:50:05 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637373005.12.0.720188836359.issue45846@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:52:48 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:52:48 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637373168.85.0.187858795762.issue45846@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +27894 pull_request: https://github.com/python/cpython/pull/29653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:52:52 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 01:52:52 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637373172.85.0.0849200636091.issue45846@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +27894, 27895 pull_request: https://github.com/python/cpython/pull/29653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 20:58:13 2021 From: report at bugs.python.org (Don Chamberlin) Date: Sat, 20 Nov 2021 01:58:13 +0000 Subject: [issue45841] IDLE fails to save files in macOS 12.0.1 Monterey In-Reply-To: <1637305465.21.0.876821716058.issue45841@roundup.psfhosted.org> Message-ID: <1637373493.58.0.893691785441.issue45841@roundup.psfhosted.org> Don Chamberlin added the comment: Thanks, Terry! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 21:26:21 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Sat, 20 Nov 2021 02:26:21 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to Message-ID: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> New submission from Stefan Pochmann : This test: def test_counter_data(self): # Test that a Counter is treated like any other iterable. data = collections.Counter([1, 1, 1, 2]) # Since the keys of the counter are treated as data points, not the # counts, this should return the first mode encountered, 1 self.assertEqual(self.func(data), 1) If the mode() code *were* wrong this way (used Counter(data) instead of Counter(iter(data))), then the test wouldn't detect it, as mode() would still return 1. The test data should be [1, 2, 2, 2] instead, in which case such wrong mode() would return 2. It used to be correct but wasn't adjusted correctly when mode() switched from raising an error for multiple modes to returning the first. The old code was: def test_counter_data(self): # Test that a Counter is treated like any other iterable. data = collections.Counter([1, 1, 1, 2]) # Since the keys of the counter are treated as data points, not the # counts, this should raise. self.assertRaises(statistics.StatisticsError, self.func, data) ---------- components: Tests messages: 406642 nosy: Stefan Pochmann priority: normal severity: normal status: open title: statistics.mode test doesn't test what it claims to versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 21:32:49 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 02:32:49 +0000 Subject: [issue45811] Improve error message when source code contains invisible control characters In-Reply-To: <1637020357.3.0.163492557929.issue45811@roundup.psfhosted.org> Message-ID: <1637375569.51.0.562201470224.issue45811@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +27896 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 22:49:48 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 20 Nov 2021 03:49:48 +0000 Subject: [issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane In-Reply-To: <1635189655.12.0.290768542952.issue45606@roundup.psfhosted.org> Message-ID: <1637380188.75.0.616193190855.issue45606@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- keywords: +patch nosy: +andrei.avk nosy_count: 1.0 -> 2.0 pull_requests: +27897 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29655 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 22:59:36 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 20 Nov 2021 03:59:36 +0000 Subject: [issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane In-Reply-To: <1635189655.12.0.290768542952.issue45606@roundup.psfhosted.org> Message-ID: <1637380776.16.0.830130779315.issue45606@roundup.psfhosted.org> Andrei Kulakov added the comment: The issue is that _PreciseSelector follows the symlink when it checks if a path exists before yielding it as a result. I've put up a PR with a fix; I've also added a *follow_symlinks* arg to `exists()` method because it seems more logical to be able to test if a path exists via the same method rather than having to also remember and to check for it being a symlink. I will add docs and news a bit later today or tomorrow. ---------- assignee: -> andrei.avk nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 23:02:48 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 20 Nov 2021 04:02:48 +0000 Subject: [issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane In-Reply-To: <1635189655.12.0.290768542952.issue45606@roundup.psfhosted.org> Message-ID: <1637380968.42.0.22890672966.issue45606@roundup.psfhosted.org> Andrei Kulakov added the comment: Rasmus: thanks for the report, it does seem like a bug to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 23:07:33 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 04:07:33 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637381253.8.0.0981919519117.issue45846@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -27895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 23:08:07 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 04:08:07 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637381287.92.0.858150953996.issue45845@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 19 23:39:55 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 20 Nov 2021 04:39:55 +0000 Subject: [issue45606] pathlib.Path.glob() does not list dangling symlink when pattern is the exact filenane In-Reply-To: <1635189655.12.0.290768542952.issue45606@roundup.psfhosted.org> Message-ID: <1637383195.82.0.580317036319.issue45606@roundup.psfhosted.org> Andrei Kulakov added the comment: By the way note that path.glob('**/my_symlink') also does return the dangling symlink match. And glob.glob('my_symlink') also returns a dangling symlink. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 01:45:23 2021 From: report at bugs.python.org (Patrick Reader) Date: Sat, 20 Nov 2021 06:45:23 +0000 Subject: [issue44845] Allow keyword arguments in code.__new__ In-Reply-To: <1628193355.65.0.685014983693.issue44845@roundup.psfhosted.org> Message-ID: <1637390723.58.0.103657892361.issue44845@roundup.psfhosted.org> Change by Patrick Reader : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 04:18:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Nov 2021 09:18:58 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637399938.88.0.767031796566.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 5596909eac4abdc9927c2e7751bea34fbcfdc624 by Christian Heimes in branch 'main': bpo-45847: Port _scproxy to PY_STDLIB_MOD (GH-29644) https://github.com/python/cpython/commit/5596909eac4abdc9927c2e7751bea34fbcfdc624 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 04:33:29 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Nov 2021 09:33:29 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637400809.79.0.654698949365.issue45846@roundup.psfhosted.org> Serhiy Storchaka added the comment: But in this case it starts a sentence. ---------- nosy: +gvanrossum, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 04:35:43 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Nov 2021 09:35:43 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637400943.04.0.171139695467.issue45846@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset bc2bc0dbdb52498d009f9f9771452e6aa4faff2b by JMcB in branch 'main': bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641) https://github.com/python/cpython/commit/bc2bc0dbdb52498d009f9f9771452e6aa4faff2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 04:35:47 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 09:35:47 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637400947.84.0.0235315302823.issue45846@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27898 pull_request: https://github.com/python/cpython/pull/29656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 04:35:51 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 09:35:51 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637400951.69.0.815173432364.issue45846@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27899 pull_request: https://github.com/python/cpython/pull/29657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 04:48:45 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Nov 2021 09:48:45 +0000 Subject: [issue45832] Misleading membersip expression documentation In-Reply-To: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> Message-ID: <1637401725.05.0.311112441788.issue45832@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think there is a bug in either numpy.timedelta64.__hash__ or panda.Timedelta.__hash__. Please report it to corresponding libraries. It is not related to the documentation of membership test. If you have different hashes for equal objects most dict and set operations will be broken. I suggest to close this issue as "third party issue". ---------- nosy: +serhiy.storchaka resolution: -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 05:06:35 2021 From: report at bugs.python.org (Soumendra Ganguly) Date: Sat, 20 Nov 2021 10:06:35 +0000 Subject: [issue41818] Lib/pty.py major revision In-Reply-To: <1600557574.22.0.272934906824.issue41818@roundup.psfhosted.org> Message-ID: <1637402795.46.0.164285930545.issue41818@roundup.psfhosted.org> Change by Soumendra Ganguly : ---------- pull_requests: +27900 pull_request: https://github.com/python/cpython/pull/29658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 05:22:56 2021 From: report at bugs.python.org (Xinmeng Xia) Date: Sat, 20 Nov 2021 10:22:56 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637403776.18.0.722851497983.issue45813@roundup.psfhosted.org> Xinmeng Xia added the comment: Thanks for testing it. Maybe it only crashes on Unix-like operating systems. I also try it on MacOS 11.6.1. with -i to ensure that python survives running the test code. On MacOS, it reports the following crashing information: ------------------- xxm$ Python-3.11.0a2/python.exe -i test.py test.py:5: RuntimeWarning: coroutine 'f' was never awaited del f RuntimeWarning: Enable tracemalloc to get the object allocation traceback Segmentation fault: 11 -------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 07:41:47 2021 From: report at bugs.python.org (Harald Husum) Date: Sat, 20 Nov 2021 12:41:47 +0000 Subject: [issue45832] Misleading membersip expression documentation In-Reply-To: <1637175634.4.0.451304822027.issue45832@roundup.psfhosted.org> Message-ID: <1637412107.59.0.526811961813.issue45832@roundup.psfhosted.org> Harald Husum added the comment: Serhiy, thanks for responding. I agree on this being "third-party" when looking at the original post I made, and I've reported the issue to the relevant party (https://github.com/pandas-dev/pandas/issues/44504). But really, the bigger issue here, in my opinion, is that the equality-hash invariance is poorly documented at best, and that this poor documentation is the likely "root cause" of the third-party issue I described. If you read further up the thread, you can see that I have some (pretty concrete) proposals for how to improve on the current situation. I'd like the documentation maintainers to consider them, in whole or in part. If you feel it is more appropriate, I can split it out into a new issue, but I wouldn't mind having a conversation about it here. The Python ecosystem will benefit as a whole if we keep an open mind as to how such (fundamental) issues can creep into commonly used, infrastructure-critical libraries, developed and maintained by excellent engineers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 08:02:12 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 20 Nov 2021 13:02:12 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) In-Reply-To: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> Message-ID: <1637413332.08.0.117600741671.issue45851@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +rhettinger, steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 08:08:52 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sat, 20 Nov 2021 13:08:52 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637413732.17.0.427041195601.issue45774@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27901 pull_request: https://github.com/python/cpython/pull/29659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 08:10:09 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sat, 20 Nov 2021 13:10:09 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637413809.05.0.218911205779.issue45774@roundup.psfhosted.org> Erlend E. Aasland added the comment: Needs amendment before closing. See GH-29659. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 08:11:19 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sat, 20 Nov 2021 13:11:19 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637413879.14.0.325223658941.issue45774@roundup.psfhosted.org> Erlend E. Aasland added the comment: > Awesome work! Thanks to your tireless effort we know have a blue print how to use pkg-config for other librariess. Thank you for reviewing, and thank you for paving the way with all these build system improvements :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:02:55 2021 From: report at bugs.python.org (Julien Palard) Date: Sat, 20 Nov 2021 14:02:55 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637416975.01.0.166873653712.issue42238@roundup.psfhosted.org> Julien Palard added the comment: /!\ rstlint did triggered some false positive: https://github.com/python/cpython/pull/29389/commits/f8ea20a0b51711b1c352c4aa4663cb953e7ebdc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:03:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Nov 2021 14:03:00 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637416980.23.0.213497592043.issue45774@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 6d430ef5ab62158a200b94dff31b89524a9576bb by Erlend Egeberg Aasland in branch 'main': bpo-45774: Fix SQLite load extension autodetection (GH-29659) https://github.com/python/cpython/commit/6d430ef5ab62158a200b94dff31b89524a9576bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:05:57 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Nov 2021 14:05:57 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637417157.49.0.50729929868.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27902 pull_request: https://github.com/python/cpython/pull/29660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:20:14 2021 From: report at bugs.python.org (Muhammad Irfan Asghar) Date: Sat, 20 Nov 2021 14:20:14 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637332268.88.0.62904608342.issue45839@roundup.psfhosted.org> Message-ID: Muhammad Irfan Asghar added the comment: Dear Christian I ran the "Install Certificate.command" from installation forum, but it gave the following error message =============================================================================== muhammadirfanasghar at Muhammads-MacBook-Pro ~ % /Applications/Python\ 3.10/Install\ Certificates.command ; exit; -- pip install --upgrade certifi WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/certifi/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/certifi/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/certifi/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/certifi/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))': /simple/certifi/ Could not fetch URL https://pypi.org/simple/certifi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/certifi/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)'))) - skipping ERROR: Could not find a version that satisfies the requirement certifi (from versions: none) ERROR: No matching distribution found for certifi WARNING: You are using pip version 21.2.3; however, version 21.3.1 is available. You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -m pip install --upgrade pip' command. Traceback (most recent call last): File "", line 44, in File "", line 24, in main File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10', '-E', '-s', '-m', 'pip', 'install', '--upgrade', 'certifi']' returned non-zero exit status 1. Saving session... ...copying shared history... ...saving history...truncating history files... ...completed. ====================================================================================================== On Fri, Nov 19, 2021 at 3:31 PM Christian Heimes wrote: > > Christian Heimes added the comment: > > The bug report is a duplicate of bpo-43404. Python cannot use the system > trust store on macOS. You need to follow the instructions at the end of the > installation process to install root CA certificates. tl;dr run the " > Install Certificates.command" from the installation folder. > > ---------- > components: +Installation, macOS -Extension Modules > nosy: +christian.heimes, ned.deily, ronaldoussoren > resolution: -> not a bug > stage: -> resolved > status: open -> closed > superseder: -> No SSL certificates when using the Mac installer > type: security -> behavior > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:21:59 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 14:21:59 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) In-Reply-To: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> Message-ID: <1637418119.62.0.526023578666.issue45851@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:36:16 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 14:36:16 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637418976.22.0.676481417817.issue45848@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset fdcc46d9554094994f78bedf6dc9220e5d5ee668 by Pablo Galindo Salgado in branch 'main': bpo-45848: Allow the parser to get error lines from encoded files (GH-29646) https://github.com/python/cpython/commit/fdcc46d9554094994f78bedf6dc9220e5d5ee668 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:38:47 2021 From: report at bugs.python.org (=?utf-8?b?54uC55S36aOO?=) Date: Sat, 20 Nov 2021 14:38:47 +0000 Subject: [issue42627] urllib.request.getproxies() misparses Windows registry proxy settings In-Reply-To: <1607804872.9.0.5170746987.issue42627@roundup.psfhosted.org> Message-ID: <1637419127.15.0.644015283458.issue42627@roundup.psfhosted.org> ??? added the comment: Sorry I didn't see this comment before. Can it be merged now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 09:52:35 2021 From: report at bugs.python.org (JMcB) Date: Sat, 20 Nov 2021 14:52:35 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637419955.68.0.104673264219.issue45845@roundup.psfhosted.org> JMcB added the comment: Also found: http://pyserial.sourceforge.net link has moved ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:04:59 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 15:04:59 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637420699.14.0.382356311704.issue45848@roundup.psfhosted.org> Change by ?ukasz Langa : ---------- pull_requests: +27903 pull_request: https://github.com/python/cpython/pull/29661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:14:11 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 20 Nov 2021 15:14:11 +0000 Subject: [issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py Message-ID: <1637421251.02.0.184439782821.issue45853@roundup.psfhosted.org> New submission from Andrei Kulakov : Should be _IGNORED_ERRORS This name was added 3 years ago: https://github.com/python/cpython/commit/216b745eafa7cd4a683a8405dcfbd7f5567f504c It's only used in a single place in the module. But I'm not sure if it's worth fixing. It is an internal, undocumented name, and not very likely to be used in user code but it's possible. ---------- messages: 406660 nosy: andrei.avk priority: normal severity: normal status: open title: Misspelled _IGNORED_ERROS in Lib/pathlib.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:15:11 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sat, 20 Nov 2021 15:15:11 +0000 Subject: [issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py In-Reply-To: <1637421251.02.0.184439782821.issue45853@roundup.psfhosted.org> Message-ID: <1637421311.23.0.212398702547.issue45853@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- components: +Library (Lib) priority: normal -> low stage: -> needs patch type: -> enhancement versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:23:34 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 20 Nov 2021 15:23:34 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637421814.72.0.586359556652.issue42238@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:28:41 2021 From: report at bugs.python.org (Alex Waygood) Date: Sat, 20 Nov 2021 15:28:41 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to In-Reply-To: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> Message-ID: <1637422121.5.0.459323185238.issue45852@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +rhettinger, steven.daprano type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:35:05 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 15:35:05 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637422505.49.0.311489655029.issue45848@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 904af3de2bef6d971463a564541cb6dadf22d7f8 by ?ukasz Langa in branch '3.10': [3.10] bpo-45848: Allow the parser to get error lines from encoded files (GH-29646) (GH-29661) https://github.com/python/cpython/commit/904af3de2bef6d971463a564541cb6dadf22d7f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:41:00 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 15:41:00 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) In-Reply-To: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> Message-ID: <1637422860.28.0.466109579821.issue45851@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +27904 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:43:16 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Nov 2021 15:43:16 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637422996.47.0.545919404695.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f36c69a26ee880acf62a5ae8c5da49312e84c66d by Christian Heimes in branch 'main': bpo-45847: Port test modules to PY_STDLIB_MOD (GH-29660) https://github.com/python/cpython/commit/f36c69a26ee880acf62a5ae8c5da49312e84c66d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:43:57 2021 From: report at bugs.python.org (=?utf-8?b?6LCt5Lmd6byO?=) Date: Sat, 20 Nov 2021 15:43:57 +0000 Subject: [issue45854] winreg: implement RegGetValue Message-ID: <1637423037.38.0.511813075404.issue45854@roundup.psfhosted.org> New submission from ??? <109224573 at qq.com>: The RegGetValue() API was introduced in Vista. It's similar to RegOpenKeyEx() but it's more convenient because you don't need OpenKey() and CloseKey() when using predefined HKEY_* constants. I think it would be good to implement it. If so, I have implemented its body based on RegOpenKeyEx(), but I'm new to CPython and need some help. https://github.com/imba-tjd/cpython/tree/winreg ---------- components: Library (Lib) messages: 406663 nosy: imba-tjd priority: normal severity: normal status: open title: winreg: implement RegGetValue type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:52:07 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 15:52:07 +0000 Subject: [issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types In-Reply-To: <1603735016.36.0.247111341461.issue42158@roundup.psfhosted.org> Message-ID: <1637423527.87.0.299533491723.issue42158@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset ef5305819ff9b283d92dbf004f977592f4e64165 by Dylan Van Assche in branch 'main': bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230) https://github.com/python/cpython/commit/ef5305819ff9b283d92dbf004f977592f4e64165 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:52:09 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 15:52:09 +0000 Subject: [issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types In-Reply-To: <1603735016.36.0.247111341461.issue42158@roundup.psfhosted.org> Message-ID: <1637423529.6.0.697393352246.issue42158@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27905 pull_request: https://github.com/python/cpython/pull/29663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:52:13 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 15:52:13 +0000 Subject: [issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types In-Reply-To: <1603735016.36.0.247111341461.issue42158@roundup.psfhosted.org> Message-ID: <1637423533.65.0.34830637853.issue42158@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27906 pull_request: https://github.com/python/cpython/pull/29664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:55:19 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 15:55:19 +0000 Subject: [issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types In-Reply-To: <1603735016.36.0.247111341461.issue42158@roundup.psfhosted.org> Message-ID: <1637423719.4.0.705448363423.issue42158@roundup.psfhosted.org> ?ukasz Langa added the comment: There was a little discussion on GH-23230 whether the change should also go to 3.10 and 3.9 given it's not a bugfix. Eric unearthed a similar discussion here: https://bugs.python.org/issue13952#msg152752 where R. David opted for skipping backports on the grounds that the change is a new feature. Given R. David's conservative approach (which I share), I merged this change to 3.11 alone. Unless a backwards incompatibility is demonstrated, we won't be backporting to 3.10 and 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:55:43 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 15:55:43 +0000 Subject: [issue42158] http.server doesn't guess n-quads, n-triples, notation3 and TriG MIME types In-Reply-To: <1603735016.36.0.247111341461.issue42158@roundup.psfhosted.org> Message-ID: <1637423743.65.0.603568822288.issue42158@roundup.psfhosted.org> ?ukasz Langa added the comment: Thanks for pursuing this, Eric! ? ? ? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:57:23 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 15:57:23 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637423843.24.0.252347692324.issue45846@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset 82f1a6edfb645abef934ae1b568dd887ff7a56b9 by Miss Islington (bot) in branch '3.10': bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641) (GH-29656) https://github.com/python/cpython/commit/82f1a6edfb645abef934ae1b568dd887ff7a56b9 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 10:57:41 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 20 Nov 2021 15:57:41 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637423861.27.0.699303180247.issue45846@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e88f9787aba2ab95df75baa6cb6ee5eacb450489 by Miss Islington (bot) in branch '3.9': bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641) (GH-29657) https://github.com/python/cpython/commit/e88f9787aba2ab95df75baa6cb6ee5eacb450489 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:04:44 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 16:04:44 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) In-Reply-To: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> Message-ID: <1637424284.99.0.694207447787.issue45851@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 04e03f496cf7da48ce4f545b41579d7d45f59ad2 by Raymond Hettinger in branch 'main': bpo-45851: Avoid full sort in statistics.multimode() (#29662) https://github.com/python/cpython/commit/04e03f496cf7da48ce4f545b41579d7d45f59ad2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:05:47 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 16:05:47 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) In-Reply-To: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> Message-ID: <1637424347.75.0.446857514189.issue45851@roundup.psfhosted.org> Raymond Hettinger added the comment: Accepting the suggestion for multimode() to use max() instead of a full sort. This is a nice improvement. Thank you. Leaving mode() as-is. The existing code is cleaner and does its work in a single pass over the counter. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:06:14 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Nov 2021 16:06:14 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637424374.42.0.511742117677.issue45846@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:27:18 2021 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2021 16:27:18 +0000 Subject: [issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock Message-ID: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> New submission from Georg Brandl : PyImport_ImportModuleNoBlock is the same as PyImport_ImportModule since 3.3, according to the docs. PyCapsule_Import has a no_block parameter to choose, is still documented as if it is relevant, and the implementation also still uses it. ---------- components: C API messages: 406671 nosy: georg.brandl priority: low severity: normal stage: needs patch status: open title: PyCapsule_Import still using PyImport_ImportModuleNoBlock type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:29:28 2021 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2021 16:29:28 +0000 Subject: [issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1637425768.96.0.710121273457.issue45855@roundup.psfhosted.org> Georg Brandl added the comment: PR is underway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:33:14 2021 From: report at bugs.python.org (Georg Brandl) Date: Sat, 20 Nov 2021 16:33:14 +0000 Subject: [issue45855] PyCapsule_Import still using PyImport_ImportModuleNoBlock In-Reply-To: <1637425638.46.0.745441938277.issue45855@roundup.psfhosted.org> Message-ID: <1637425994.28.0.66841721699.issue45855@roundup.psfhosted.org> Change by Georg Brandl : ---------- keywords: +patch pull_requests: +27907 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:36:38 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 16:36:38 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to In-Reply-To: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> Message-ID: <1637426198.02.0.076370905693.issue45852@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +27908 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:36:59 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sat, 20 Nov 2021 16:36:59 +0000 Subject: [issue45774] Detect SQLite in configure.ac In-Reply-To: <1636496806.29.0.76332999648.issue45774@roundup.psfhosted.org> Message-ID: <1637426219.67.0.379847456894.issue45774@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:37:27 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 16:37:27 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to In-Reply-To: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> Message-ID: <1637426247.93.0.0257961421585.issue45852@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for noticing this. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:38:56 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 16:38:56 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to In-Reply-To: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> Message-ID: <1637426336.23.0.823328645463.issue45852@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 11:45:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Nov 2021 16:45:49 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637426749.1.0.440463003244.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27909 pull_request: https://github.com/python/cpython/pull/29668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:01:18 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 17:01:18 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to In-Reply-To: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> Message-ID: <1637427678.02.0.952427618632.issue45852@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27910 pull_request: https://github.com/python/cpython/pull/29671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:01:14 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 20 Nov 2021 17:01:14 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to In-Reply-To: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> Message-ID: <1637427674.49.0.855446264734.issue45852@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 48744db70ed519c1566c22bf123a0e1f5c69253f by Raymond Hettinger in branch 'main': bpo-45852: Fix the Counter/iter test for statistics.mode() (GH-29667) https://github.com/python/cpython/commit/48744db70ed519c1566c22bf123a0e1f5c69253f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:27:37 2021 From: report at bugs.python.org (Stefan Pochmann) Date: Sat, 20 Nov 2021 17:27:37 +0000 Subject: [issue45851] statistics.multimode is inefficient (time and space) (mode somewhat, too) In-Reply-To: <1637372528.09.0.770941706263.issue45851@roundup.psfhosted.org> Message-ID: <1637429257.53.0.425531865116.issue45851@roundup.psfhosted.org> Stefan Pochmann added the comment: Ok, thanks, had somewhat expected that, as the multimode proposal was rather clearly better but the mode proposal not so much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:38:46 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 17:38:46 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637429926.18.0.877328550133.issue45848@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 Nov 20 12:39:20 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 17:39:20 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637429960.92.0.604431508924.issue45727@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 511ee1c0fa4dedf32cc2b9f9fa13aa61e07bd165 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-45727: Make the syntax error for missing comma more consistent (GH-29427) (GH-29647) https://github.com/python/cpython/commit/511ee1c0fa4dedf32cc2b9f9fa13aa61e07bd165 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:41:03 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 17:41:03 +0000 Subject: [issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error In-Reply-To: <1634394257.16.0.767966008926.issue45494@roundup.psfhosted.org> Message-ID: <1637430063.63.0.951252011281.issue45494@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 79ff0d1687e3f823fb121a19f0297ad052871b1b by Pablo Galindo Salgado in branch 'main': bpo-45494: Fix error location in EOF tokenizer errors (GH-29108) https://github.com/python/cpython/commit/79ff0d1687e3f823fb121a19f0297ad052871b1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:41:20 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 17:41:20 +0000 Subject: [issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error In-Reply-To: <1634394257.16.0.767966008926.issue45494@roundup.psfhosted.org> Message-ID: <1637430080.9.0.634491781679.issue45494@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27911 pull_request: https://github.com/python/cpython/pull/29672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 12:59:41 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 17:59:41 +0000 Subject: [issue45494] [fuzzer] Parser null deref with continuation characters and generator parenthesis error In-Reply-To: <1634394257.16.0.767966008926.issue45494@roundup.psfhosted.org> Message-ID: <1637431181.79.0.0668093682163.issue45494@roundup.psfhosted.org> miss-islington added the comment: New changeset a427eb862f11888fa69fee520eb8a20bd396fcdb by Miss Islington (bot) in branch '3.10': bpo-45494: Fix error location in EOF tokenizer errors (GH-29108) https://github.com/python/cpython/commit/a427eb862f11888fa69fee520eb8a20bd396fcdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:01:02 2021 From: report at bugs.python.org (MeneMeneTekel) Date: Sat, 20 Nov 2021 18:01:02 +0000 Subject: [issue43007] set_wakeup_fd() only works in main thread In-Reply-To: <1611398430.41.0.0624041377425.issue43007@roundup.psfhosted.org> Message-ID: <1637431262.26.0.433919191069.issue43007@roundup.psfhosted.org> MeneMeneTekel added the comment: Finally... it works for me - I migrated to - Windows Server 2019 Datacenter - WinPython 3.9.5 - Apache24 AH - Django 3.2.9 - mod_wsgi-4.9.0-cp39-cp39-win_amd64 Whoever made that it works again.... thanks a lot ;-) MeneMeneTekel ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:08:07 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 18:08:07 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637431687.6.0.816538884941.issue45727@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 Nov 20 13:21:25 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 18:21:25 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637432485.76.0.0119272892651.issue44844@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27912 pull_request: https://github.com/python/cpython/pull/29673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:21:28 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:21:28 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637432488.74.0.161577972594.issue44844@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 985233914504c73f14a23af1c68a3709079e6913 by Terry Jan Reedy in branch 'main': bpo-44844: Remove unresponsive web link (GH-29651) https://github.com/python/cpython/commit/985233914504c73f14a23af1c68a3709079e6913 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:24:51 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 18:24:51 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637432691.64.0.372385436032.issue44844@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27913 pull_request: https://github.com/python/cpython/pull/29674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:27:49 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 18:27:49 +0000 Subject: [issue45450] Improve syntax error for parenthesized arguments In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org> Message-ID: <1637432869.88.0.404225503349.issue45450@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 Nov 20 13:27:50 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 18:27:50 +0000 Subject: [issue45450] Improve syntax error for parenthesized arguments In-Reply-To: <1634059257.61.0.643840687035.issue45450@roundup.psfhosted.org> Message-ID: <1637432870.76.0.00579696003646.issue45450@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 7a1d9325287a39528b795b1e8037146777abfe3e by Pablo Galindo Salgado in branch 'main': bpo-45450: Improve syntax error for parenthesized arguments (GH-28906) https://github.com/python/cpython/commit/7a1d9325287a39528b795b1e8037146777abfe3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:28:38 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 18:28:38 +0000 Subject: [issue45811] Improve error message when source code contains invisible control characters In-Reply-To: <1637020357.3.0.163492557929.issue45811@roundup.psfhosted.org> Message-ID: <1637432918.45.0.505084589604.issue45811@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 81f4e116ef7d30ef6e2041c2d6cf29af511a3a02 by Pablo Galindo Salgado in branch 'main': bpo-45811: Improve error message when source code contains invisible control characters (GH-29654) https://github.com/python/cpython/commit/81f4e116ef7d30ef6e2041c2d6cf29af511a3a02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:28:37 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 18:28:37 +0000 Subject: [issue45811] Improve error message when source code contains invisible control characters In-Reply-To: <1637020357.3.0.163492557929.issue45811@roundup.psfhosted.org> Message-ID: <1637432917.09.0.654508122193.issue45811@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 Nov 20 13:30:01 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 18:30:01 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1637433001.33.0.206182742761.issue45709@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Mark, os something left to do here? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:31:08 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Nov 2021 18:31:08 +0000 Subject: [issue45609] Specialize STORE_SUBSCR In-Reply-To: <1635208946.04.0.990921573614.issue45609@roundup.psfhosted.org> Message-ID: <1637433068.51.0.354943222138.issue45609@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 Nov 20 13:44:13 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 18:44:13 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637433853.91.0.895449697528.issue44844@roundup.psfhosted.org> miss-islington added the comment: New changeset d1855ed752ea0484101fc13622626ed0fa2c17b9 by Miss Islington (bot) in branch '3.9': bpo-44844: Remove unresponsive web link (GH-29651) https://github.com/python/cpython/commit/d1855ed752ea0484101fc13622626ed0fa2c17b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:45:55 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 18:45:55 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637433955.3.0.0617138920592.issue45845@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +27914 pull_request: https://github.com/python/cpython/pull/29674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:46:31 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 18:46:31 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637433991.01.0.0285591278006.issue45845@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27915 pull_request: https://github.com/python/cpython/pull/29673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:47:24 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:47:24 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637434044.97.0.363962669421.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -27892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:47:32 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:47:32 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637434052.46.0.108054672626.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -27912 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:47:41 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:47:41 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637434061.0.0.70384647176.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: -27913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:50:26 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 18:50:26 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637434226.34.0.895925992252.issue44844@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27916 pull_request: https://github.com/python/cpython/pull/29674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:50:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:50:31 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637434231.72.0.698774403375.issue45845@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset edabf3904619e6be97d12e41d30402845b3ec8b8 by Miss Islington (bot) in branch '3.10': bpo-45845: Remove unresponsive web link (GH-29651) (GH-29674) https://github.com/python/cpython/commit/edabf3904619e6be97d12e41d30402845b3ec8b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:51:23 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:51:23 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637434283.17.0.871845300085.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg406680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:51:38 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:51:38 +0000 Subject: [issue44844] The command line of launching Edge on Linux hangs In-Reply-To: <1628189911.42.0.278044129333.issue44844@roundup.psfhosted.org> Message-ID: <1637434298.36.0.281545894747.issue44844@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg406684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 13:52:23 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:52:23 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637434343.57.0.865609000002.issue45845@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 Nov 20 13:55:09 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 18:55:09 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637434509.58.0.0822310780418.issue45813@roundup.psfhosted.org> Terry J. Reedy added the comment: The crash in IDLE could be in tcl or any of the extra modules imported by IDLE, such as tkinter and socket. It should be retested on Windows once this appears fixed otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:37:50 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 19:37:50 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637437070.6.0.346817863111.issue45845@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +27917 pull_request: https://github.com/python/cpython/pull/29675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:56:49 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 19:56:49 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637438209.9.0.95422675262.issue45845@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27918 pull_request: https://github.com/python/cpython/pull/29677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:56:52 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 19:56:52 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637438212.55.0.264724616478.issue45845@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 123a3527ddd7774e8db325c778927e49172e01d4 by Terry Jan Reedy in branch 'main': bpo-45845: Change link for pyserial (GH-29675) https://github.com/python/cpython/commit/123a3527ddd7774e8db325c778927e49172e01d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 14:56:53 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 19:56:53 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637438213.63.0.538157678457.issue45845@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27919 pull_request: https://github.com/python/cpython/pull/29678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:18:57 2021 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 20 Nov 2021 20:18:57 +0000 Subject: [issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637439537.06.0.00377614128595.issue45843@roundup.psfhosted.org> Batuhan Taskaya added the comment: > Result of `255581293 > 12938373 and 113314 < 2`: Is there a similar pattern that happens a lot on the client code? The AST optimizer currently only optimizes common cases. ---------- nosy: +BTaskaya, pablogsal, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:19:50 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Nov 2021 20:19:50 +0000 Subject: [issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor In-Reply-To: <1627128881.56.0.324294431588.issue44733@roundup.psfhosted.org> Message-ID: <1637439590.95.0.653744172395.issue44733@roundup.psfhosted.org> Antoine Pitrou added the comment: New changeset fdc0e09c3316098b038996c428e88931f0a4fcdb by Logan Jones in branch 'main': bpo-44733: Add max_tasks_per_child to ProcessPoolExecutor (GH-27373) https://github.com/python/cpython/commit/fdc0e09c3316098b038996c428e88931f0a4fcdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:20:03 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 20 Nov 2021 20:20:03 +0000 Subject: [issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor In-Reply-To: <1627128881.56.0.324294431588.issue44733@roundup.psfhosted.org> Message-ID: <1637439603.29.0.532320844851.issue44733@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:51:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 20:51:31 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637441491.83.0.964959361623.issue45845@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 3528df12581e8ccf3fae6d25bd9687ae55424398 by Miss Islington (bot) in branch '3.10': [3.10] bpo-45845: Change link for pyserial (GH-29675) https://github.com/python/cpython/commit/3528df12581e8ccf3fae6d25bd9687ae55424398 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:52:11 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 20:52:11 +0000 Subject: [issue45845] Dead link 'pythoncraft.com/OSCON2001' in faq/library In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637441531.96.0.902944595571.issue45845@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset e81e1d7f8116e9bf905ca378b0bec3ca5131bc29 by Miss Islington (bot) in branch '3.9': [3.9] bpo-45845: Change link for pyserial (GH-29675) https://github.com/python/cpython/commit/e81e1d7f8116e9bf905ca378b0bec3ca5131bc29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 15:53:21 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Nov 2021 20:53:21 +0000 Subject: [issue45845] Fix bad links in faqs In-Reply-To: <1637340201.11.0.111443507771.issue45845@roundup.psfhosted.org> Message-ID: <1637441601.62.0.775298633205.issue45845@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you for the reports. ---------- title: Dead link 'pythoncraft.com/OSCON2001' in faq/library -> Fix bad links in faqs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 17:18:18 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 20 Nov 2021 22:18:18 +0000 Subject: [issue45803] make_dataclass is missing the documented kw_only argument In-Reply-To: <1636833436.92.0.166448079237.issue45803@roundup.psfhosted.org> Message-ID: <1637446698.65.0.632638586933.issue45803@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +27920 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 17:19:11 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 20 Nov 2021 22:19:11 +0000 Subject: [issue45803] make_dataclass is missing the documented kw_only argument In-Reply-To: <1636833436.92.0.166448079237.issue45803@roundup.psfhosted.org> Message-ID: <1637446751.11.0.139505711047.issue45803@roundup.psfhosted.org> Change by Eric V. Smith : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 17:54:23 2021 From: report at bugs.python.org (Thibaut Horel) Date: Sat, 20 Nov 2021 22:54:23 +0000 Subject: [issue45856] [doc] map() documentation ambiguous about consumption order Message-ID: <1637448863.69.0.971649126325.issue45856@roundup.psfhosted.org> New submission from Thibaut Horel : In cases where multiple iterables are passed to the built-in function map(), the documentation is ambiguous about the order in which they are consumed [1]. Although the order of evaluation of function arguments is documented to be left-to-right in general [2], this does not necessarily imply that the __next__() functions of the underlying iterators are called from left to right *before* passing the returned elements to the function being mapped. This is particularly relevant when the same iterator is passed multiple times, or when there are side effects to consuming the iterables. I suggest adding the sentence ?The iterables are consumed in left-to-right order at each iteration.?, similar to how it is done for the function zip() [3]. Furthermore, I think providing the following (roughly) equivalent implementation in pure Python might be illuminating: def map(function, *iterables): iterators = tuple(iter(it) for it in iterables) while True: try: args = [next(it) for it in iterators] except StopIteration: break yield func(*args) Finally, the following example could be added. ?This makes it possible to apply a function to consecutive groups of elements from the same iterator by passing it multiple times to `map`: from itertools import count ctr = count() # map(func, ctr, ctr) -> func(0, 1), func(2, 3), ... ? I am happy to submit a pull request once we reach a consensus on the formulation. [1] https://docs.python.org/3/library/functions.html#map [2] https://docs.python.org/3/reference/expressions.html#evaluation-order [3] https://docs.python.org/3/library/functions.html#zip ---------- assignee: docs at python components: Documentation messages: 406693 nosy: docs at python, eric.araujo, ezio.melotti, mdk, thibaut.horel, willingc priority: normal severity: normal status: open title: [doc] map() documentation ambiguous about consumption order type: enhancement versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 18:28:28 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 20 Nov 2021 23:28:28 +0000 Subject: [issue45803] make_dataclass is missing the documented kw_only argument In-Reply-To: <1636833436.92.0.166448079237.issue45803@roundup.psfhosted.org> Message-ID: <1637450908.46.0.355899974654.issue45803@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the bug report! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 18:29:19 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Nov 2021 23:29:19 +0000 Subject: [issue45803] make_dataclass is missing the documented kw_only argument In-Reply-To: <1636833436.92.0.166448079237.issue45803@roundup.psfhosted.org> Message-ID: <1637450959.36.0.615938072419.issue45803@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27921 pull_request: https://github.com/python/cpython/pull/29680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:16:41 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Nov 2021 00:16:41 +0000 Subject: [issue44556] ctypes unittest crashes with libffi 3.4.2 In-Reply-To: <1625275664.18.0.784580950779.issue44556@roundup.psfhosted.org> Message-ID: <1637453801.35.0.551990300469.issue44556@roundup.psfhosted.org> Ned Deily added the comment: Yes, this does appear to be a result of the problem described in Issue45350. As noted there, the problem was caused by running autoreconf to regerenerate the ./configure script in an environment where pkg-config wasn't installed which caused some pkg-config code to be removed from ./configure. And, unfortunately, the ./configure script included with the v3.10.0 release still had that problem. You can copy an updated version from the current 3.10.0 branch or wait for 3.10.1 or you can try running autoreconf yourself in the source directory. ---------- nosy: +ned.deily resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> configure incorrectly ignores pkg-config information for libffi and Tcl/Tk in 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:27:53 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2021 00:27:53 +0000 Subject: [issue45852] statistics.mode test doesn't test what it claims to In-Reply-To: <1637375179.63.0.568396800727.issue45852@roundup.psfhosted.org> Message-ID: <1637454473.65.0.744117401266.issue45852@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 9841ac2da5689ff765250c1abdbf5af9d3750519 by Miss Islington (bot) in branch '3.10': bpo-45852: Fix the Counter/iter test for statistics.mode() (GH-29667) (GH-29671) https://github.com/python/cpython/commit/9841ac2da5689ff765250c1abdbf5af9d3750519 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:40:08 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2021 00:40:08 +0000 Subject: [issue45856] [doc] map() documentation ambiguous about consumption order In-Reply-To: <1637448863.69.0.971649126325.issue45856@roundup.psfhosted.org> Message-ID: <1637455208.82.0.607686757942.issue45856@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't think this suggestion is helpful or necessary. The map() docs have been around for a long time and this hasn't proven to be a point of confusion. The itertools docs already have a recipe demonstrating the technique of passing the same iterator multiple times with izip_longest(). That is a case where the technique is useful. In the context of map() however this technique is rarely, if ever, used. A last thought is that we do put in rough pure python equivalents when they help understand the function. In this case though, the pure python code provided is likely only intelligible to someone who already understands map(). Thank you for the suggestion, but we should pass on this one. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:40:32 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2021 00:40:32 +0000 Subject: [issue45856] [doc] map() documentation ambiguous about consumption order In-Reply-To: <1637448863.69.0.971649126325.issue45856@roundup.psfhosted.org> Message-ID: <1637455232.7.0.157726145586.issue45856@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 19:45:24 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 21 Nov 2021 00:45:24 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637272329.47.0.00758927636582.issue45839@roundup.psfhosted.org> Message-ID: <1637455524.15.0.250835131593.issue45839@roundup.psfhosted.org> Ned Deily added the comment: That is very unusual behavior. Pip has its own private certificate store that it uses to make secure connections to pypi.org and the version of pip supplied with the python.org 3.10.0 macOS installer should work just fine as is. I just verified that it works for me. I'm just guessing here but I think the most likely cause of this behavior is that your internet connection is behind a misconfigured or malevolent proxy server. You may want to check your DNS settings as well to try to use a neutral DNS provider. There are discussions of similar problems on the web: try searching for: pypi self signed certificate in certificate chain. Good luck! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 20:31:58 2021 From: report at bugs.python.org (Thibaut Horel) Date: Sun, 21 Nov 2021 01:31:58 +0000 Subject: [issue45856] [doc] map() documentation ambiguous about consumption order In-Reply-To: <1637448863.69.0.971649126325.issue45856@roundup.psfhosted.org> Message-ID: <1637458318.59.0.784851238418.issue45856@roundup.psfhosted.org> Thibaut Horel added the comment: > this hasn't proven to be a point of confusion Absence of evidence is not evidence of absence? The word "confusion" is probably a bit strong, but I recently had to write code relying on this behavior and found myself checking the documentation to make sure the code would behave as I expected. Not being able to find it explained in the documentation, I felt uncomfortable relying on an implicit behavior. After all, doesn't the PEP 20 state that "Explicit is better than implicit"? > In the context of map() however this technique is rarely, if ever, used. I think use cases are more common than what might appear at first glance. For example, a file could contain information about a list of entities, each entity being described over two consecutive lines of the file (this is admittedly a bad format for a file, but such is the reality of real-world data?). Then, given a function `parse` constructing an internal representation of the entity from two lines, the list of entities can elegantly be constructed using `map(parse, file, file)`. The equivalent construction with `zip` would be something like `starmap(parse, zip(file, file))` which is unnecessary convoluted. > the pure python code provided is likely only intelligible to someone who already understands map() The pure Python code expresses `map` in terms of other language constructs, so it is not clear to me why one would need to already understand `map()` to understand the provided code. This is similar to a dictionary definition, where a concept is explained in terms of other concepts. This is also similar to how related functions (like `starmap`) are explained in the `itertools` module. Overall, I am curious about the rationale behind not making the documentation more explicit when possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 21:34:22 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 21 Nov 2021 02:34:22 +0000 Subject: [issue22276] pathlib glob ignores trailing slash in pattern In-Reply-To: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> Message-ID: <1637462062.02.0.0855023170658.issue22276@roundup.psfhosted.org> Andrei Kulakov added the comment: I have also run into this when looking into path.glob('dangling_symlink') issue. I can add a few things (in the examples, *myfile* is a file, not a directory): This is probably more common / less obscure than '*/': path.glob('myfile/') => True This is inconsistent with how shell `ls` command works and with glob.glob() and looks wrong. Path('myfile/').exists() => True Path('myfile/') == Path('myfile') => True str(Path('myfile/')) => 'myfile' You can compare this to behavior of `ls` (tested on MacOS): ls myfile myfile ls myfile/ ls: myfile/: Not a directory I think many users will expect behavior consistent with `ls` and `glob.glob`. I've used `ls` in this manner before. ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 21:35:48 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 21 Nov 2021 02:35:48 +0000 Subject: [issue22276] pathlib glob ignores trailing slash in pattern In-Reply-To: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> Message-ID: <1637462148.23.0.878058139104.issue22276@roundup.psfhosted.org> Andrei Kulakov added the comment: I meant to say: path.glob('myfile/') => [PosixPath('myfile')] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 21:47:05 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 21 Nov 2021 02:47:05 +0000 Subject: [issue22276] pathlib glob ignores trailing slash in pattern In-Reply-To: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> Message-ID: <1637462825.97.0.0865218566574.issue22276@roundup.psfhosted.org> Andrei Kulakov added the comment: Generally if Path is created with a trailing separator, I think it should error out for all methods that apply to files, for example `.touch()`, `read*()`, `write*()`, others. This is consistent with shell commands: touch xyz/ touch: xyz/: Not a directory echo 'blah' > xyz/ zsh: not a directory: xyz/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 20 23:21:04 2021 From: report at bugs.python.org (Jiuding Tan) Date: Sun, 21 Nov 2021 04:21:04 +0000 Subject: [issue45854] winreg: implement RegGetValue In-Reply-To: <1637423037.38.0.511813075404.issue45854@roundup.psfhosted.org> Message-ID: <1637468464.55.0.00762931230595.issue45854@roundup.psfhosted.org> Change by Jiuding Tan <109224573 at qq.com>: ---------- keywords: +patch pull_requests: +27922 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 04:45:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Nov 2021 09:45:35 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637487935.79.0.126144181058.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f201d261cf53365b5769a434ca2bb21a892bd23f by Christian Heimes in branch 'main': bpo-45847: Port grp, spwd, termios, resource, syslog to PY_STDLIB_MOD (GH-29668) https://github.com/python/cpython/commit/f201d261cf53365b5769a434ca2bb21a892bd23f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:02:53 2021 From: report at bugs.python.org (Muhammad Irfan Asghar) Date: Sun, 21 Nov 2021 10:02:53 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637455524.15.0.250835131593.issue45839@roundup.psfhosted.org> Message-ID: Muhammad Irfan Asghar added the comment: Hi I am really astonished and I have tried all tricks, help available on internet. Is there any manual way to do this. i.e open any file and enter information separately so that ssL certificate issue can be solved. or can you tell me, how you configured your mac. Irfan On Sun, Nov 21, 2021 at 1:45 AM Ned Deily wrote: > > Ned Deily added the comment: > > That is very unusual behavior. Pip has its own private certificate store > that it uses to make secure connections to pypi.org and the version of > pip supplied with the python.org 3.10.0 macOS installer should work just > fine as is. I just verified that it works for me. I'm just guessing here > but I think the most likely cause of this behavior is that your internet > connection is behind a misconfigured or malevolent proxy server. You may > want to check your DNS settings as well to try to use a neutral DNS > provider. There are discussions of similar problems on the web: try > searching for: pypi self signed certificate in certificate chain. Good luck! > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:09:41 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Nov 2021 10:09:41 +0000 Subject: [issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637489381.0.0.225640239319.issue45843@roundup.psfhosted.org> Serhiy Storchaka added the comment: Why anybody needs to write 255581293 > 12938373? We try to keep the compiler code maintenable and only implement optimizations which have the largest effect. PR 29639 adds around 200 lines of complex code and I do not see the benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:10:40 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Nov 2021 10:10:40 +0000 Subject: [issue45846] Incorrect name capitalisation in faq/programming In-Reply-To: <1637340315.0.0.653516465145.issue45846@roundup.psfhosted.org> Message-ID: <1637489440.58.0.0920497173002.issue45846@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your report and PR JMcB. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:28:02 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Nov 2021 10:28:02 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637490482.46.0.659273258406.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27924 pull_request: https://github.com/python/cpython/pull/29685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:29:56 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 21 Nov 2021 10:29:56 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() In-Reply-To: <1636655145.54.0.81558353914.issue45766@roundup.psfhosted.org> Message-ID: <20211121102835.GA16165@ando.pearwood.info> Steven D'Aprano added the comment: Hi Raymond, I'm satisfied that this should be approved. The code looks good to me and in my tests it matches the results from other software. I don't think there is any need to verify that plain OLS regression produces an intercept close to zero. (What counts as close to zero?) If users want to check that, they can do so themselves. Regarding my concern with the coefficient of determination, I don't think that's enough of a problem that it should delay adding this functionality. I don't know what, if anything, should be done, but in the meantime we should approve this new feature. For the record, an example of the problem can be seen on the last slide here: https://www.azdhs.gov/documents/preparedness/state-laboratory/lab-licensure-certification/technical-resources/calibration-training/09-linear-forced-through-zero-calib.pdf The computed r**2 of 1.0 is clearly too high for the RTO line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:48:04 2021 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 21 Nov 2021 10:48:04 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1637491684.89.0.647319377426.issue45709@roundup.psfhosted.org> Ned Batchelder added the comment: I can confirm that this fixes the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:53:44 2021 From: report at bugs.python.org (=?utf-8?q?D=C3=A1vid_Nemeskey?=) Date: Sun, 21 Nov 2021 10:53:44 +0000 Subject: [issue42233] GenericAlias does not support union type expressions In-Reply-To: <1604244730.48.0.778653484179.issue42233@roundup.psfhosted.org> Message-ID: <1637492024.6.0.685911051784.issue42233@roundup.psfhosted.org> D?vid Nemeskey added the comment: @kj Sorry, for some reason, I thought the that issue affected Union as well, but I have just re-tested it and found that it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:56:41 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Nov 2021 10:56:41 +0000 Subject: [issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py In-Reply-To: <1637421251.02.0.184439782821.issue45853@roundup.psfhosted.org> Message-ID: <1637492201.37.0.813069792403.issue45853@roundup.psfhosted.org> Serhiy Storchaka added the comment: If it is only used in a single place in the module would not be better to inline it? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 05:58:16 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Nov 2021 10:58:16 +0000 Subject: [issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py In-Reply-To: <1637421251.02.0.184439782821.issue45853@roundup.psfhosted.org> Message-ID: <1637492296.35.0.987873364306.issue45853@roundup.psfhosted.org> Serhiy Storchaka added the comment: BTW, is not the correct name _IGNORED_ERRNOS? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 07:04:25 2021 From: report at bugs.python.org (Badal Sahani) Date: Sun, 21 Nov 2021 12:04:25 +0000 Subject: [issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py In-Reply-To: <1637421251.02.0.184439782821.issue45853@roundup.psfhosted.org> Message-ID: <1637496265.01.0.852790099691.issue45853@roundup.psfhosted.org> Badal Sahani added the comment: Corrected Misspelled _IGNORED_ERROS in Lib/pathlib.py to _IGNORED_ERRORS ---------- hgrepos: +411 keywords: +patch message_count: 3.0 -> 4.0 nosy: +badalsahani nosy_count: 2.0 -> 3.0 pull_requests: +27925 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29686 Added file: https://bugs.python.org/file50454/pathlib.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 07:10:32 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Sun, 21 Nov 2021 12:10:32 +0000 Subject: [issue43827] abc conflicts with __init_subclass__ In-Reply-To: <1618300635.23.0.984081288048.issue43827@roundup.psfhosted.org> Message-ID: <1637496632.11.0.627029260406.issue43827@roundup.psfhosted.org> Oleg Iarygin added the comment: Paul, PR OP made all changes requested; could you re-review please? ---------- nosy: +arhadthedev, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 08:08:55 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Nov 2021 13:08:55 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637500135.14.0.653765628394.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 2afa1a12669e1812a9fe8130c8f60052c4ad8bf8 by Christian Heimes in branch 'main': bpo-45847: Port codecs and unicodedata to PY_STDLIB_MOD (GH-29685) https://github.com/python/cpython/commit/2afa1a12669e1812a9fe8130c8f60052c4ad8bf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 08:45:40 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 21 Nov 2021 13:45:40 +0000 Subject: [issue45821] Many method parameters in the datetime module are positional-only in the C implementation but positional-or-keyword in the Python implementation In-Reply-To: <1637090468.13.0.603790423029.issue45821@roundup.psfhosted.org> Message-ID: <1637502340.16.0.497122017947.issue45821@roundup.psfhosted.org> Alex Waygood added the comment: Ref to discussion on typeshed: https://github.com/python/typeshed/pull/6343 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:09:32 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 21 Nov 2021 14:09:32 +0000 Subject: [issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py In-Reply-To: <1637421251.02.0.184439782821.issue45853@roundup.psfhosted.org> Message-ID: <1637503772.79.0.331663980069.issue45853@roundup.psfhosted.org> Andrei Kulakov added the comment: Serhiy: I think you're right, it was likely meant to be _IGNORED_ERRNOS; for inlining it, it looks like it wasn't inlined to be more readable, but if we inline it, we should also inline _IGNORED_WINERRORS. I don't mind inlining both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:29:09 2021 From: report at bugs.python.org (wyz23x2) Date: Sun, 21 Nov 2021 14:29:09 +0000 Subject: [issue45804] IDLE - faster shell writing In-Reply-To: <1636858081.72.0.88336234035.issue45804@roundup.psfhosted.org> Message-ID: <1637504949.36.0.59012789738.issue45804@roundup.psfhosted.org> Change by wyz23x2 : ---------- assignee: -> terry.reedy components: +IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:34:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 14:34:54 +0000 Subject: [issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple In-Reply-To: <1505496099.07.0.410774221671.issue31486@psf.upfronthosting.co.za> Message-ID: <1637505294.72.0.780774459635.issue31486@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:36:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 14:36:00 +0000 Subject: [issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple In-Reply-To: <1505496099.07.0.410774221671.issue31486@psf.upfronthosting.co.za> Message-ID: <1637505360.09.0.634422690348.issue31486@roundup.psfhosted.org> Irit Katriel added the comment: Closing as fixed since it's too late to change 3.6 (if that did not happen yet). ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:39:29 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2021 14:39:29 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() In-Reply-To: <1636470983.21.0.286113384782.issue45766@roundup.psfhosted.org> Message-ID: <1637505569.9.0.395584387432.issue45766@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d2b55b07d2b503dcd3b5c0e2753efa835cff8e8f by Raymond Hettinger in branch 'main': bpo-45766: Add direct proportion option to linear_regression(). (#29490) https://github.com/python/cpython/commit/d2b55b07d2b503dcd3b5c0e2753efa835cff8e8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:40:28 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2021 14:40:28 +0000 Subject: [issue45766] Add direct proportion option to statistics.linear_regression() In-Reply-To: <1636470983.21.0.286113384782.issue45766@roundup.psfhosted.org> Message-ID: <1637505628.2.0.914592454329.issue45766@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for looking at this and giving it some good thought. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:48:31 2021 From: report at bugs.python.org (=?utf-8?b?5rSq5piO6IGW?=) Date: Sun, 21 Nov 2021 14:48:31 +0000 Subject: [issue45857] Type hint for methods Message-ID: <1637506111.5.0.826205176723.issue45857@roundup.psfhosted.org> New submission from ??? : The class methods have a problem compiling when the type refers to the union of itself and others. # tmp.py class Foo: def __init__(self, tmp: "Foo"|int): pass # Error Traceback (most recent call last): File "/Project/Mslc/Grammar/tmp.py", line 1, in class Foo: File "/Project/Mslc/Grammar/tmp.py", line 2, in Foo def __init__(self, tmp: "Foo"|int): TypeError: unsupported operand type(s) for |: 'str' and 'type' ---------- messages: 406720 nosy: TNThung priority: normal severity: normal status: open title: Type hint for methods type: compile error versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:48:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 14:48:46 +0000 Subject: [issue32658] Metacharacter (\) documentation suggestion In-Reply-To: <1516838461.29.0.467229070634.issue32658@psf.upfronthosting.co.za> Message-ID: <1637506126.52.0.924027812666.issue32658@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy, newcomer friendly versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 09:53:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 14:53:23 +0000 Subject: [issue32582] chr raises OverflowError In-Reply-To: <1516199526.4.0.467229070634.issue32582@psf.upfronthosting.co.za> Message-ID: <1637506403.17.0.338850507138.issue32582@roundup.psfhosted.org> Irit Katriel added the comment: Still raising OVerflowError on 3.11: >>> print(chr(0x80000000)) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C int ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:14:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 15:14:16 +0000 Subject: [issue32936] RobotFileParser.parse() should raise an exception when the robots.txt file is invalid In-Reply-To: <1519469593.78.0.467229070634.issue32936@psf.upfronthosting.co.za> Message-ID: <1637507656.81.0.131361818968.issue32936@roundup.psfhosted.org> Irit Katriel added the comment: The link to the robots.txt file no longer works, so it's not clear how to reproduce the problem you are seeing. Can you post the complete information on this issue? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:24:51 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Nov 2021 15:24:51 +0000 Subject: [issue45709] 3.11 regression: tracing with-statement on exit from block In-Reply-To: <1636020531.52.0.942589294345.issue45709@roundup.psfhosted.org> Message-ID: <1637508291.93.0.631407985729.issue45709@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:25:40 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 21 Nov 2021 15:25:40 +0000 Subject: [issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637508340.98.0.848846878244.issue45843@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I agree with Serhiy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:26:57 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 21 Nov 2021 15:26:57 +0000 Subject: [issue45857] PEP 604 Union syntax does not support forward references In-Reply-To: <1637506111.5.0.826205176723.issue45857@roundup.psfhosted.org> Message-ID: <1637508417.13.0.97356992294.issue45857@roundup.psfhosted.org> Alex Waygood added the comment: Reproduced on 3.11. The error occurs if a type is on the left-hand-side of the operand, as well as if a type is on the right-hand-side: ``` >>> int | "str" Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for |: 'type' and 'str' >>> "str" | int Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for |: 'str' and 'type' ``` ---------- nosy: +AlexWaygood, gvanrossum, kj title: Type hint for methods -> PEP 604 Union syntax does not support forward references type: compile error -> behavior versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:29:18 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 21 Nov 2021 15:29:18 +0000 Subject: [issue32582] chr raises OverflowError In-Reply-To: <1516199526.4.0.467229070634.issue32582@psf.upfronthosting.co.za> Message-ID: <1637508558.34.0.306650202569.issue32582@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:29:44 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 21 Nov 2021 15:29:44 +0000 Subject: [issue45843] Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637508584.25.0.376708369498.issue45843@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:30:23 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 21 Nov 2021 15:30:23 +0000 Subject: [issue32658] Metacharacter (\) documentation suggestion In-Reply-To: <1516838461.29.0.467229070634.issue32658@psf.upfronthosting.co.za> Message-ID: <1637508623.17.0.0450536978997.issue32658@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:30:34 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 21 Nov 2021 15:30:34 +0000 Subject: [issue33125] Windows 10 ARM64 platform support In-Reply-To: <1521767011.97.0.467229070634.issue33125@psf.upfronthosting.co.za> Message-ID: <1637508634.12.0.44062139276.issue33125@roundup.psfhosted.org> Guido van Rossum added the comment: I could really use 3.10 here as well. ---------- nosy: +Guido.van.Rossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 10:33:39 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 21 Nov 2021 15:33:39 +0000 Subject: [issue45857] PEP 604 Union syntax does not support forward references In-Reply-To: <1637506111.5.0.826205176723.issue45857@roundup.psfhosted.org> Message-ID: <1637508819.45.0.762540077794.issue45857@roundup.psfhosted.org> Eric V. Smith added the comment: Presumably the correct way to do this is: def __init__(self, tmp: "Foo|int"): That is, the entire type hint is a string. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 11:24:48 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sun, 21 Nov 2021 16:24:48 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637511888.76.0.493869674716.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27926 pull_request: https://github.com/python/cpython/pull/29688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 11:46:00 2021 From: report at bugs.python.org (Ian Fisher) Date: Sun, 21 Nov 2021 16:46:00 +0000 Subject: [issue45858] Deprecate default converters in sqlite3 Message-ID: <1637513160.43.0.0570339537667.issue45858@roundup.psfhosted.org> New submission from Ian Fisher : Per discussion at https://discuss.python.org/t/fixing-sqlite-timestamp-converter-to-handle-utc-offsets/, the default converters in SQLite3 have several bugs and are probably not worth continuing to maintain, so I propose deprecating them and removing them in a later version of Python. Since the converters are opt-in, this should not affect most users of SQLite3. ---------- components: Library (Lib) messages: 406727 nosy: erlendaasland, iafisher priority: normal severity: normal status: open title: Deprecate default converters in sqlite3 type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 11:47:21 2021 From: report at bugs.python.org (Ian Fisher) Date: Sun, 21 Nov 2021 16:47:21 +0000 Subject: [issue45858] Deprecate default converters in sqlite3 In-Reply-To: <1637513160.43.0.0570339537667.issue45858@roundup.psfhosted.org> Message-ID: <1637513241.69.0.510033517491.issue45858@roundup.psfhosted.org> Ian Fisher added the comment: See also bpo-26651 for a related proposal to deprecate the converter/adapter infrastructure entirely. The proposal in this bug is more limited: remove the default converters (though I think the default adapters should stay), but continue to allow users to define their own converters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 11:47:47 2021 From: report at bugs.python.org (Ian Fisher) Date: Sun, 21 Nov 2021 16:47:47 +0000 Subject: [issue26651] Deprecate register_adapter() and register_converter() in sqlite3 In-Reply-To: <1459097866.18.0.37527564025.issue26651@psf.upfronthosting.co.za> Message-ID: <1637513267.53.0.426260686588.issue26651@roundup.psfhosted.org> Ian Fisher added the comment: See bpo-45858 for a more limited proposal to only deprecate the default converters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 11:53:06 2021 From: report at bugs.python.org (Ian Fisher) Date: Sun, 21 Nov 2021 16:53:06 +0000 Subject: [issue45677] [doc] improve sqlite3 docs In-Reply-To: <1635544504.5.0.82834028892.issue45677@roundup.psfhosted.org> Message-ID: <1637513586.42.0.790044283177.issue45677@roundup.psfhosted.org> Ian Fisher added the comment: I think it would also be helpful to make the examples at the top simpler/more idiomatic, e.g. using a context manager for the connection and calling conn.execute directly instead of spawning a cursor. I think the information about the isolation_level parameter should also be displayed more prominently as many people are surprised to find sqlite3 automatically opening transactions. ---------- nosy: +iafisher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:08:02 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 21 Nov 2021 17:08:02 +0000 Subject: [issue45857] PEP 604 Union syntax does not support forward references In-Reply-To: <1637506111.5.0.826205176723.issue45857@roundup.psfhosted.org> Message-ID: <1637514482.45.0.134209278204.issue45857@roundup.psfhosted.org> Alex Waygood added the comment: Arguably, either the implementation should be altered to support forward references, or the documentation at https://docs.python.org/3/library/stdtypes.html#union-type should be altered to make clear that, when type-hinting a union that includes a forward reference, the entire expression should be given as a string, as Eric suggests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:17:40 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 21 Nov 2021 17:17:40 +0000 Subject: [issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect In-Reply-To: <1636878037.09.0.00718141853617.issue45805@roundup.psfhosted.org> Message-ID: <1637515060.78.0.655695524182.issue45805@roundup.psfhosted.org> ?ric Araujo added the comment: I am not sure. Adding compiler people to the nosy list! ---------- nosy: +BTaskaya, Mark.Shannon, benjamin.peterson, brett.cannon, pablogsal, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:18:11 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 21 Nov 2021 17:18:11 +0000 Subject: [issue45805] CO_FUTURE_ANNOTATIONS flag is not documented or in inspect In-Reply-To: <1636878037.09.0.00718141853617.issue45805@roundup.psfhosted.org> Message-ID: <1637515091.14.0.738134568448.issue45805@roundup.psfhosted.org> Change by ?ric Araujo : ---------- stage: resolved -> versions: +Python 3.11 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:33:25 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sun, 21 Nov 2021 17:33:25 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637516005.78.0.608431951718.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27927 pull_request: https://github.com/python/cpython/pull/29689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:33:42 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sun, 21 Nov 2021 17:33:42 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637516022.88.0.907758405724.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27928 pull_request: https://github.com/python/cpython/pull/29690 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:48:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 17:48:54 +0000 Subject: [issue23952] cgi: Document the 'maxlen' member of the cgi module In-Reply-To: <1429034285.17.0.254053228622.issue23952@psf.upfronthosting.co.za> Message-ID: <1637516934.64.0.842448239536.issue23952@roundup.psfhosted.org> Irit Katriel added the comment: I ---------- components: +Library (Lib) keywords: +easy, newcomer friendly nosy: +iritkatriel type: -> enhancement versions: +Python 3.11 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:50:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 17:50:24 +0000 Subject: [issue23952] cgi: Document the 'maxlen' member of the cgi module In-Reply-To: <1429034285.17.0.254053228622.issue23952@psf.upfronthosting.co.za> Message-ID: <1637517024.32.0.325537979129.issue23952@roundup.psfhosted.org> Change by Irit Katriel : ---------- Removed message: https://bugs.python.org/msg406733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 12:57:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 17:57:37 +0000 Subject: [issue33158] Add fileobj property to csv reader and writer objects In-Reply-To: <1522167429.73.0.467229070634.issue33158@psf.upfronthosting.co.za> Message-ID: <1637517457.68.0.0459014911735.issue33158@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:16:39 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Nov 2021 18:16:39 +0000 Subject: [issue33558] Python has no icon in taskbar and in start screen In-Reply-To: <1526572416.53.0.682650639539.issue33558@psf.upfronthosting.co.za> Message-ID: <1637518599.95.0.0350006005732.issue33558@roundup.psfhosted.org> Irit Katriel added the comment: 3.6 is no longer maintained. Please create a new issue if you are having this problem with a current version of python (3.9+). ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:46:22 2021 From: report at bugs.python.org (Ethan Furman) Date: Sun, 21 Nov 2021 18:46:22 +0000 Subject: [issue26651] Deprecate register_adapter() and register_converter() in sqlite3 In-Reply-To: <1459097866.18.0.37527564025.issue26651@psf.upfronthosting.co.za> Message-ID: <1637520382.09.0.215143280928.issue26651@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 13:53:54 2021 From: report at bugs.python.org (Ethan Furman) Date: Sun, 21 Nov 2021 18:53:54 +0000 Subject: [issue45858] Deprecate default converters in sqlite3 In-Reply-To: <1637513160.43.0.0570339537667.issue45858@roundup.psfhosted.org> Message-ID: <1637520834.25.0.876168463928.issue45858@roundup.psfhosted.org> Change by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 14:38:02 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 21 Nov 2021 19:38:02 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637523482.79.0.489852294079.issue45813@roundup.psfhosted.org> Dennis Sweeney added the comment: I got a crash on Windows in Objects/genobject.c: void _PyGen_Finalize(PyObject *self) { PyGenObject *gen = (PyGenObject *)self; PyObject *res = NULL; PyObject *error_type, *error_value, *error_traceback; if (gen->gi_xframe == NULL || _PyFrameHasCompleted(gen->gi_xframe)) { <------- Crash is here /* Generator isn't paused, so no need to close */ return; } ... It looks like gen->gi_xframe is a junk-but-not-NULL pointer that is getting dereferenced by _PyFrameHasCompleted. Maybe related to bpo-44590. ---------- nosy: +Dennis Sweeney, Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 14:43:37 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 21 Nov 2021 19:43:37 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637523817.33.0.593905528115.issue45813@roundup.psfhosted.org> Dennis Sweeney added the comment: I think the import is irrelevant (luckily). This still crashes: async def f(): pass frame = f().cr_frame frame.clear() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 14:56:23 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 21 Nov 2021 19:56:23 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637524583.03.0.818665979174.issue45813@roundup.psfhosted.org> Dennis Sweeney added the comment: Even without garbage-collecting the coroutine, we get a failed assertion in debug mode (but no crash with the assertion removed): Python 3.11.0a2+ (heads/main:c8c21bdd19, Nov 21 2021, 13:58:01) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> async def f(): ... pass ... >>> coro = f() >>> frame = coro.cr_frame >>> frame.clear() :1: RuntimeWarning: coroutine 'f' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback Assertion failed: f->f_frame->generator == NULL, file C:\Users\sween\Source\Repos\cpython2\cpython\Objects\frameobject.c, line 705 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 15:46:31 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sun, 21 Nov 2021 20:46:31 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available Message-ID: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : test_field_descriptor in test_collections tries to pickle the descriptors of a namedtuple's fields, which is _collections._itemgetter on CPython. However, on PyPy that class doesn't exist. The code in collections deals fine with that fact, but the above-mentioned test does not make sense in that situation, since you can't pickle properties. To test this behaviour, you can replace "from _collections import _tuplegetter" in collections/__init__.py with raise ImportError and see the test fail on CPython too. ---------- messages: 406738 nosy: Carl.Friedrich.Bolz priority: normal severity: normal status: open title: test_collections has a wrong test in case _itemgetter is not available versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 15:49:13 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sun, 21 Nov 2021 20:49:13 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637527753.39.0.259565658259.issue45859@roundup.psfhosted.org> Change by Carl Friedrich Bolz-Tereick : ---------- keywords: +patch pull_requests: +27929 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 16:34:04 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sun, 21 Nov 2021 21:34:04 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1637530444.97.0.385361882528.issue42268@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 16:33:58 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sun, 21 Nov 2021 21:33:58 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1637530438.43.0.0682533712152.issue42268@roundup.psfhosted.org> Erlend E. Aasland added the comment: Reproducible on 3.9, 3.10, and on main. The --with-memory-sanitizer option adds "-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer" to CFLAGS, and "-fsanitize=memory -fsanitize-memory-track-origins=2" to LDFLAGS. The MemorySanitizer is a clang specific feature, AFAIK. You're using GCC, so what happens is that these (GCC incompatible) flags are added and the following compile check (getaddrinfo) fails. IMO, adding a compiler check and printing a warning if --with-memory-sanitizer is used with GCC should be an ok solution. Alternatively, we inform the user that we're switching to using the leak sanitiser, if we're on GCC. +pablo See also: - https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html - https://clang.llvm.org/docs/MemorySanitizer.html ---------- nosy: +erlendaasland versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 18:32:36 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Nov 2021 23:32:36 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637537556.78.0.752002059185.issue45859@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 20:53:15 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 22 Nov 2021 01:53:15 +0000 Subject: [issue44649] dataclasses slots with init=False field raises AttributeException In-Reply-To: <1626375963.06.0.364448585924.issue44649@roundup.psfhosted.org> Message-ID: <1637545995.76.0.738906134565.issue44649@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +27930 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 20:56:06 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 22 Nov 2021 01:56:06 +0000 Subject: [issue44649] dataclasses slots with init=False field raises AttributeException In-Reply-To: <1626375963.06.0.364448585924.issue44649@roundup.psfhosted.org> Message-ID: <1637546166.96.0.260916830281.issue44649@roundup.psfhosted.org> Change by Eric V. Smith : ---------- versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 21:24:42 2021 From: report at bugs.python.org (Xinmeng Xia) Date: Mon, 22 Nov 2021 02:24:42 +0000 Subject: [issue45860] UnboundLocalError leads to Illegal instruction crashing CPython Message-ID: <1637547882.55.0.126109992436.issue45860@roundup.psfhosted.org> New submission from Xinmeng Xia : The following code can lead to a crash and report Illegal instruction (core dumped)(few times) or Trace/breakpoint trap (core dumped) (very few times) or Segmentation fault (core dumped) (most times) on Python 3.11. test_free_different_thread.py ======================================================== import inspect import sys import threading import unittest import weakref import ctypes from test.support import run_doctest, run_unittest, cpython_only, check_impl_detail import _testcapi from types import FunctionType from test import test_code import test_code def test_free_different_thread(): f = CoExtra.get_func() class ThreadTest(threading.Thread): def __init__(CoExtra, f, test): super().__init__() CoExtra.f = CoExtra CoExtra.test = test def run(CoExtra): del CoExtra.f CoExtra.test.assertEqual(test_code.LAST_FREED, 500) test_code.SetExtra(f.__code__, test_code.FREE_INDEX, ctypes.c_voidp(500)) f = ThreadTest(CoExtra, f) del tt tt.start() tt.join() CoExtra.assertEqual(test_code.LAST_FREED, 500) CoExtra = test_code.CoExtra() test_free_different_thread() ========================================================= ------------------------------------- Traceback (most recent call last): File "/home/xxm/Desktop/test_free_different_thread.py", line 33, in test_free_different_thread() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/xxm/Desktop/test_free_different_thread.py", line 28, in test_free_different_thread del tt ^^ UnboundLocalError: cannot access local variable 'tt' where it is not associated with a value Illegal instruction (core dumped)/Trace/breakpoint trap (core dumped)/Segmentation fault (core dumped) ---------------------------------------------------------------- Version: python 3.9, python 3.10, python 3.11 on ubuntu 16.04 Reproduce step: 1.download test_code.py and place test_free_different_thread.py and test_code in a same directory. 2. run with "python test_free_different_thread.py" The test_code.py is from cpython' test. We can also annotate "import test_code" and run test_free_different_thread.py directly. But it seems that Illegal instruction and Trace/breakpoint trap cannot be reproduced. ---------- components: Interpreter Core files: test_code.py messages: 406740 nosy: xxm priority: normal severity: normal status: open title: UnboundLocalError leads to Illegal instruction crashing CPython type: crash versions: Python 3.11 Added file: https://bugs.python.org/file50455/test_code.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 23:47:34 2021 From: report at bugs.python.org (heheoa) Date: Mon, 22 Nov 2021 04:47:34 +0000 Subject: [issue45861] Can't find a usable init.tcl Message-ID: <1637556454.49.0.701253039916.issue45861@roundup.psfhosted.org> New submission from heheoa : _tkinter.TclError: Can't find a usable init.tcl in the following directories: /usr/lib/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library /tcl8.6.12/library /tcl8.6.12/library ---------- components: Tkinter messages: 406741 nosy: nobodyatall priority: normal severity: normal status: open title: Can't find a usable init.tcl versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 21 23:53:44 2021 From: report at bugs.python.org (heheoa) Date: Mon, 22 Nov 2021 04:53:44 +0000 Subject: [issue45861] Can't find a usable init.tcl In-Reply-To: <1637556454.49.0.701253039916.issue45861@roundup.psfhosted.org> Message-ID: <1637556824.19.0.815509834621.issue45861@roundup.psfhosted.org> heheoa added the comment: i just needed to install tcl ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 01:16:52 2021 From: report at bugs.python.org (Kevin) Date: Mon, 22 Nov 2021 06:16:52 +0000 Subject: [issue45858] Deprecate default converters in sqlite3 In-Reply-To: <1637513160.43.0.0570339537667.issue45858@roundup.psfhosted.org> Message-ID: <1637561812.01.0.61132053375.issue45858@roundup.psfhosted.org> Change by Kevin : ---------- nosy: +Strongbeard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 02:29:08 2021 From: report at bugs.python.org (David Pratten) Date: Mon, 22 Nov 2021 07:29:08 +0000 Subject: [issue45862] Anomaly of eval() of list comprehension Message-ID: <1637566148.02.0.0346956477094.issue45862@roundup.psfhosted.org> New submission from David Pratten : Hi Example "eg def2" works but "eg def4" gives an error? David ``` emp = [ { "empno": 7839, "mgr": 0, "ename": "KING" }, { "empno": 7566, "mgr": 7839, "ename": "JONES" }, { "empno": 7698, "mgr": 7839, "ename": "BLAKE" } ] a = [e for e in emp if e["mgr"] == 0] print('eg 1', [b for b in a]) print('eg 2', eval('[b for b in a]')) print('eg 3', [e for e in emp for b in a if e["mgr"] == b["empno"]]) print('eg 4', eval('[e for e in emp for b in a if e["mgr"] == b["empno"]]')) def eval_anomaly(): a_anomaly = [e for e in emp if e["mgr"] == 0] print('eg def1', [b for b in a_anomaly]) print('eg def2', eval('[b for b in a_anomaly]')) print('eg def3', [e for e in emp for b in a_anomaly if e["mgr"] == b["empno"]]) print('eg def4', eval('[e for e in emp for b in a_anomaly if e["mgr"] == b["empno"]]')) eval_anomaly() ``` ---------- messages: 406743 nosy: david2 priority: normal severity: normal status: open title: Anomaly of eval() of list comprehension type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:01:20 2021 From: report at bugs.python.org (Joshua Root) Date: Mon, 22 Nov 2021 08:01:20 +0000 Subject: [issue45863] tarfile zeroes ustar header fields unnecessarily Message-ID: <1637568080.9.0.260845551853.issue45863@roundup.psfhosted.org> New submission from Joshua Root : When using the pax format, tarfile will zero out the field in the ustar header for any values that are represented with a float, setting the correct value only in the pax header. This mainly seems to apply to the mtime. This behaviour doesn't cause problems when using an unarchiver that understands the pax header, but unarchivers that don't will extract incorrect metadata (most obviously all mtimes set to the epoch). Compatibility with such unarchivers can easily be achieved by rounding the float value to int for the ustar header only, thus at least giving mtimes that are accurate to the nearest second instead of nothing. ---------- components: Library (Lib) messages: 406744 nosy: jmr priority: normal severity: normal status: open title: tarfile zeroes ustar header fields unnecessarily type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:05:15 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 08:05:15 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1637568315.5.0.30198612769.issue45723@roundup.psfhosted.org> Christian Heimes added the comment: New changeset db2277a114463d30a58d9066f2b47f7a53a1488c by Erlend Egeberg Aasland in branch 'main': bpo-45723: Add helpers for save/restore env (GH-29637) https://github.com/python/cpython/commit/db2277a114463d30a58d9066f2b47f7a53a1488c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:05:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 08:05:40 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637568340.36.0.662077307921.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 133c65a870e8bdcce7cd6a2bc6bd0cefbb2fa9f3 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port array, _contextvars, math, and cmath to PY_STDLIB_MOD_SIMPLE (GH-29688) https://github.com/python/cpython/commit/133c65a870e8bdcce7cd6a2bc6bd0cefbb2fa9f3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:23:22 2021 From: report at bugs.python.org (Joshua Root) Date: Mon, 22 Nov 2021 08:23:22 +0000 Subject: [issue45863] tarfile zeroes ustar header fields unnecessarily In-Reply-To: <1637568080.9.0.260845551853.issue45863@roundup.psfhosted.org> Message-ID: <1637569402.82.0.115310739205.issue45863@roundup.psfhosted.org> Change by Joshua Root : ---------- keywords: +patch pull_requests: +27931 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:35:24 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Mon, 22 Nov 2021 08:35:24 +0000 Subject: [issue45509] Gzip header corruption not properly checked. In-Reply-To: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org> Message-ID: <1637570124.85.0.813120836937.issue45509@roundup.psfhosted.org> Ruben Vorderman added the comment: Ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:35:59 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 22 Nov 2021 08:35:59 +0000 Subject: [issue45862] Anomaly of eval() of list comprehension In-Reply-To: <1637566148.02.0.0346956477094.issue45862@roundup.psfhosted.org> Message-ID: <1637570159.1.0.461629650241.issue45862@roundup.psfhosted.org> Mark Dickinson added the comment: Thanks for the report. The behaviour is by design: see #5242 (especially msg81898) for an explanation. Closing this issue as a duplicate of #5242. ---------- nosy: +mark.dickinson resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> eval() function in List Comprehension doesn't work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:37:45 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 22 Nov 2021 08:37:45 +0000 Subject: [issue45862] Anomaly of eval() of list comprehension In-Reply-To: <1637566148.02.0.0346956477094.issue45862@roundup.psfhosted.org> Message-ID: <1637570265.63.0.643527304762.issue45862@roundup.psfhosted.org> Mark Dickinson added the comment: See also #41216 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:43:33 2021 From: report at bugs.python.org (David Pratten) Date: Mon, 22 Nov 2021 08:43:33 +0000 Subject: [issue45862] Anomaly of eval() of list comprehension In-Reply-To: <1637570159.1.0.461629650241.issue45862@roundup.psfhosted.org> Message-ID: David Pratten added the comment: Hi Mark, Thanks.?? The anomaly is that the print("eg def2", ...)? works.? Should it not fail in the same way that print("eg def4", ...) does. David On 22/11/2021 7:36:31 PM, Mark Dickinson wrote: Mark Dickinson added the comment: Thanks for the report. The behaviour is by design: see #5242 (especially msg81898) for an explanation. Closing this issue as a duplicate of #5242. ---------- nosy: +mark.dickinson resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> eval() function in List Comprehension doesn't work _______________________________________ Python tracker _______________________________________ [755e9508-5fde-465a-ac8e-d82585c103f3] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:45:49 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 08:45:49 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637570749.58.0.0672571217192.issue45847@roundup.psfhosted.org> miss-islington added the comment: New changeset 718cee08cc082ece590f5a012253a405422da03d by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port _bisect, _heapq, _json, _pickle, _random, and _zoneinfo to PY_STDLIB_MOD_SIMPLE (GH-29689) https://github.com/python/cpython/commit/718cee08cc082ece590f5a012253a405422da03d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 03:48:17 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 22 Nov 2021 08:48:17 +0000 Subject: [issue45862] Anomaly of eval() of list comprehension In-Reply-To: <1637566148.02.0.0346956477094.issue45862@roundup.psfhosted.org> Message-ID: <1637570897.65.0.790878295063.issue45862@roundup.psfhosted.org> Mark Dickinson added the comment: True: there's another detail here that's needed to explain the behaviour. The first "for" clause in a list comprehension is special: it's evaluated in the enclosing scope, rather than in the local function scope that the list comprehension creates. See the docs here: https://docs.python.org/3.9/reference/expressions.html?highlight=list%20comprehension#displays-for-lists-sets-and-dictionaries ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 04:25:43 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Nov 2021 09:25:43 +0000 Subject: [issue45509] Gzip header corruption not properly checked. In-Reply-To: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org> Message-ID: <1637573143.35.0.597318337103.issue45509@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it is good idea, although we may get reports about regressions in 3.11 when Python will start to reject GZIP files which was successfully read before. But before merging this I want to know: 1. How much overhead does it add for reading files with the FHCRC flag clear? 2. How much overhead does it add for reading files with the FHCRC flag set? 3. Are GZIP files created by other tools has the FHCRC flag by default? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 04:56:41 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 09:56:41 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637575001.72.0.170307891123.issue45847@roundup.psfhosted.org> Erlend E. Aasland added the comment: 45 down, 35 to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 04:57:57 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 09:57:57 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637575077.55.0.717530537474.issue45847@roundup.psfhosted.org> miss-islington added the comment: New changeset 39f7d2ff01eb03f1dd87a019472a32cde6250e84 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE (GH-29690) https://github.com/python/cpython/commit/39f7d2ff01eb03f1dd87a019472a32cde6250e84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:01:46 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 10:01:46 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637575306.14.0.887807760466.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27932 pull_request: https://github.com/python/cpython/pull/29696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:06:51 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 10:06:51 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637575611.58.0.658401841441.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27933 pull_request: https://github.com/python/cpython/pull/29697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:28:02 2021 From: report at bugs.python.org (Adam Johnson) Date: Mon, 22 Nov 2021 10:28:02 +0000 Subject: [issue45864] unittest does not discover tests in PEP420 packages Message-ID: <1637576882.84.0.616248029554.issue45864@roundup.psfhosted.org> New submission from Adam Johnson : unittest's test discovery does not descend into directories without `__init__.py`. This avoids discovering test modules that are otherwise valid and importable, after PEP 420. I've seen this more than once where there were valid looking test files not being discovered, and they bit rot. The tests had been run individually when created but never again. (I created [flake8-no-pep420](https://pypi.org/project/flake8-no-pep420/) to avoid this problem on my projects.) For example, take this directory structure: ``` $ tree . ??? tests ??? test_thing.py 1 directory, 1 file $ cat tests/test_thing.py 1/0 ``` It's valid to import the naughty file, which crashes: ``` $ python -c 'import tests.test_thing' Traceback (most recent call last): File "", line 1, in File "/.../tests/test_thing.py", line 1, in 1/0 ZeroDivisionError: division by zero ``` But unittest does not discover it: ``` $ python -m unittest ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK ``` But, after creating an empty `__init__.py`, the tests doth fail: ``` $ touch tests/__init__.py $ python -m unittest E ====================================================================== ERROR: tests.test_thing (unittest.loader._FailedTest) ---------------------------------------------------------------------- ImportError: Failed to import test module: tests.test_thing Traceback (most recent call last): File "/.../unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/.../unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/.../tests/test_thing.py", line 1, in 1/0 ZeroDivisionError: division by zero ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (errors=1) ``` ---------- components: Tests messages: 406756 nosy: adamchainz priority: normal severity: normal status: open title: unittest does not discover tests in PEP420 packages type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:29:50 2021 From: report at bugs.python.org (Adam Johnson) Date: Mon, 22 Nov 2021 10:29:50 +0000 Subject: [issue45865] Old syntax in unittest Message-ID: <1637576990.34.0.316155860666.issue45865@roundup.psfhosted.org> New submission from Adam Johnson : I often browse the unittest code in order to write extensions. It still uses some Python 2-isms like classes inheriting from object, it would be nice to clean that up. ---------- components: Tests messages: 406757 nosy: adamchainz priority: normal severity: normal status: open title: Old syntax in unittest type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:33:16 2021 From: report at bugs.python.org (Adam Johnson) Date: Mon, 22 Nov 2021 10:33:16 +0000 Subject: [issue45865] Old syntax in unittest In-Reply-To: <1637576990.34.0.316155860666.issue45865@roundup.psfhosted.org> Message-ID: <1637577196.09.0.0182928620153.issue45865@roundup.psfhosted.org> Change by Adam Johnson : ---------- keywords: +patch pull_requests: +27934 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29698 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:40:14 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 10:40:14 +0000 Subject: [issue34943] sched cancel (wrong item removed from queue) In-Reply-To: <1539088133.47.0.545547206417.issue34943@psf.upfronthosting.co.za> Message-ID: <1637577614.61.0.332235076558.issue34943@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Document that sched.cancel() doesn't distinguish equal events and can break order _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:43:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 10:43:52 +0000 Subject: [issue19270] 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: <1637577832.85.0.997881798106.issue19270@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: Document that sched.cancel() doesn't distinguish equal events and can break order -> sched.cancel() doesn't distinguish equal events and can break order type: enhancement -> behavior versions: +Python 3.10 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:44:01 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Mon, 22 Nov 2021 10:44:01 +0000 Subject: [issue45509] Gzip header corruption not properly checked. In-Reply-To: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org> Message-ID: <1637577841.58.0.423673007131.issue45509@roundup.psfhosted.org> Ruben Vorderman added the comment: 1. Quite a lot I tested it for the two most common use case. import timeit import statistics WITH_FNAME = """ from gzip import GzipFile, decompress import io fileobj = io.BytesIO() g = GzipFile(fileobj=fileobj, mode='wb', filename='compressable_file') g.write(b'') g.close() data=fileobj.getvalue() """ WITH_NO_FLAGS = """ from gzip import decompress import zlib data = zlib.compress(b'', wbits=31) """ def benchmark(name, setup, loops=10000, runs=10): print(f"{name}") results = [timeit.timeit("decompress(data)", setup, number=loops) for _ in range(runs)] # Calculate microseconds results = [(result / loops) * 1_000_000 for result in results] print(f"average: {round(statistics.mean(results), 2)}, " f"range: {round(min(results), 2)}-{round(max(results),2)} " f"stdev: {round(statistics.stdev(results),2)}") if __name__ == "__main__": benchmark("with_fname", WITH_FNAME) benchmark("with_noflags", WITH_FNAME) BEFORE: with_fname average: 3.27, range: 3.21-3.36 stdev: 0.05 with_noflags average: 3.24, range: 3.14-3.37 stdev: 0.07 AFTER: with_fname average: 4.98, range: 4.85-5.14 stdev: 0.1 with_noflags average: 4.87, range: 4.69-5.05 stdev: 0.1 That is a dramatic increase in overhead. (Okay the decompressed data is empty, but still) 2. Haven't tested this yet. But the regression is quite unacceptable already. 3. Not that I know of. But if it is set, it is safe to assume they care. Nevertheless this is a bit of an edge-case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:46:19 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Nov 2021 10:46:19 +0000 Subject: [issue45864] unittest does not discover tests in PEP420 packages In-Reply-To: <1637576882.84.0.616248029554.issue45864@roundup.psfhosted.org> Message-ID: <1637577979.28.0.389841461614.issue45864@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to be similar to https://bugs.python.org/issue23882 ---------- nosy: +methane, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:51:21 2021 From: report at bugs.python.org (Adam Johnson) Date: Mon, 22 Nov 2021 10:51:21 +0000 Subject: [issue45864] unittest does not discover tests in PEP420 packages In-Reply-To: <1637576882.84.0.616248029554.issue45864@roundup.psfhosted.org> Message-ID: <1637578281.56.0.380089712317.issue45864@roundup.psfhosted.org> Adam Johnson added the comment: It's exactly that ticket. I missed that when searching for duplicates - I only searched for "pep420" and not "namespace packages". Mea culpa. ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:51:25 2021 From: report at bugs.python.org (Adam Johnson) Date: Mon, 22 Nov 2021 10:51:25 +0000 Subject: [issue45864] unittest does not discover tests in PEP420 packages In-Reply-To: <1637576882.84.0.616248029554.issue45864@roundup.psfhosted.org> Message-ID: <1637578285.82.0.682619746176.issue45864@roundup.psfhosted.org> Change by Adam Johnson : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:52:54 2021 From: report at bugs.python.org (Adam Johnson) Date: Mon, 22 Nov 2021 10:52:54 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1637578374.84.0.756502711087.issue23882@roundup.psfhosted.org> Adam Johnson added the comment: I just reported https://bugs.python.org/issue45864 , and closed as duplicate of this. ---------- nosy: +adamchainz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:53:59 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 22 Nov 2021 10:53:59 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637578439.16.0.785944561311.issue45813@roundup.psfhosted.org> Mark Shannon added the comment: I'm seeing a similar failure on a debug build of 3.10 as well. ./python Python 3.10.0+ (heads/3.10:9e7a2e4920, Nov 22 2021, 10:51:32) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> async def f(): ... pass ... >>> coro = f() >>> frame = coro.cr_frame >>> frame.clear() :1: RuntimeWarning: coroutine 'f' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback python: Objects/frameobject.c:695: frame_clear: Assertion `f->f_gen == NULL' failed. Aborted (core dumped) I don't know why that assertion is there, it doesn't seem to be valid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 05:54:10 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 10:54:10 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637578450.8.0.874118521161.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27935 pull_request: https://github.com/python/cpython/pull/29699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 06:09:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 11:09:21 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637579361.75.0.979189256309.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 29699a2a2aa2f0d6e790beeae55967fc2f35fe50 by Christian Heimes in branch 'main': bpo-45847: Various PY_STDLIB_MOD cleanups (GH-29697) https://github.com/python/cpython/commit/29699a2a2aa2f0d6e790beeae55967fc2f35fe50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 06:22:28 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 22 Nov 2021 11:22:28 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637580148.39.0.43637868966.issue45813@roundup.psfhosted.org> Change by Mark Shannon : ---------- assignee: -> Mark.Shannon keywords: +3.11regression priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 06:31:05 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 22 Nov 2021 11:31:05 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637580665.26.0.0785409936761.issue45813@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +27936 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 06:32:02 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 22 Nov 2021 11:32:02 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen Message-ID: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> New submission from Miro Hron?ok : In Fedora, when building Python 3.11.0a2 with Python 3.11.0a2 for regen, we found that regen-frozen fails. It can be reproduced either on the v3.11.0a2 tag or on the main branch. On tag v3.11.0a2 with 3.11.0a2 installed in $PATH: # in root of cpython local clone: $ git clean -fdx $ mkdir -p build/optimized $ cd build/optimized $ ../../configure $ make regen-all PYTHON_FOR_REGEN=python3.11 ... ERROR: missing _freeze_module On the main branch: # in root of cpython local clone: $ git clean -fdx $ mkdir -p build/optimized $ cd build/optimized $ ../../configure $ make $ make regen-all PYTHON_FOR_REGEN=./python (success) However, the working tree is dirty: $ git diff diff --git a/Parser/parser.c b/Parser/parser.c index b3aa35989ed..c26cd6eeb05 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -1,4 +1,4 @@ -// @generated by pegen from ./Grammar/python.gram +// @generated by pegen from ../../Grammar/python.gram #include "pegen.h" #if defined(Py_DEBUG) && defined(Py_BUILD_CORE) diff --git a/Tools/peg_generator/pegen/grammar_parser.py b/Tools/peg_generator/pegen/grammar_parser.py index 6e9f7d3d11d..fbbbfad76b0 100644 --- a/Tools/peg_generator/pegen/grammar_parser.py +++ b/Tools/peg_generator/pegen/grammar_parser.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3.8 -# @generated by pegen from ./Tools/peg_generator/pegen/metagrammar.gram +# @generated by pegen from ../../Tools/peg_generator/pegen/metagrammar.gram import ast import sys And if we install Python somewhere: $ make $ make install DESTDIR=/tmp/python And use that one again for regen: $ cd ../.. $ git clean -fdx $ mkdir -p build/optimized $ cd build/optimized $ ../../configure $ make regen-all PYTHON_FOR_REGEN=/tmp/python/usr/local/bin/python3.11 ... # Regenerate Lib/keyword.py from Grammar/python.gram and Grammar/Tokens # using Tools/peg_generator/pegen PYTHONPATH=../../Tools/peg_generator /tmp/python/usr/local/bin/python3.11 -m pegen.keywordgen \ ../../Grammar/python.gram \ ../../Grammar/Tokens \ ../../Lib/keyword.py.new /tmp/python/usr/local/bin/python3.11 ../../Tools/scripts/update_file.py ../../Lib/keyword.py ../../Lib/keyword.py.new /tmp/python/usr/local/bin/python3.11 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 It fails. I've isolated the failure to: $ make regen-frozen PYTHON_FOR_REGEN=/tmp/python/usr/local/bin/python3.11 /tmp/python/usr/local/bin/python3.11 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 ---------- components: Build messages: 406764 nosy: eric.snow, hroncok, petr.viktorin, vstinner priority: normal severity: normal status: open title: Out of tree build of Python 3.11.0a2+ breaks regen-frozen type: compile error versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:13:20 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 12:13:20 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1637583200.82.0.716003699173.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27937 pull_request: https://github.com/python/cpython/pull/29701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:32:27 2021 From: report at bugs.python.org (Muhamed Itani) Date: Mon, 22 Nov 2021 12:32:27 +0000 Subject: [issue45867] kwarg default value expression incorrectly evaluated Message-ID: <1637584347.64.0.225027731456.issue45867@roundup.psfhosted.org> New submission from Muhamed Itani : I have an MPYFrame class that inherits from tkinter.Frame. It's init looks like this: from os.path import normcase,normpath def __init__(self,master=None,port=None,baudrate=115200,timeout=1,localFolder=normcase(normpath(os.getcwd()))): The problem is, when I check/access the value of localFolder later in the code (even directly as a first statement within __init__), it is obvious that os.getcwd() is executing, but normcase and/or normpath are not. The resulting path contains capital letters (tested on Windows 11), even though it should not. If I run: localFolder=normcase(normpath(localFolder)) as a first statement after init, then check the value of localFolder (for example at a debugging breakpoint), it correctly then contains a normalized path in which all letters have been converted to lowercase (but only after the statement itself has executed). ---------- components: Parser files: mpyFrame.pyw messages: 406765 nosy: lys.nikolaou, moefear85, pablogsal priority: normal severity: normal status: open title: kwarg default value expression incorrectly evaluated type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file50456/mpyFrame.pyw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:36:12 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 22 Nov 2021 12:36:12 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637584572.87.0.582404439394.issue45866@roundup.psfhosted.org> Miro Hron?ok added the comment: git bisect says: ff8859d965815e8b5af346bd90299cfa5568c855 is the first new commit commit ff8859d965815e8b5af346bd90299cfa5568c855 Author: Victor Stinner Date: Thu Oct 7 21:19:13 2021 +0200 bpo-45402: Fix test_tools.test_sundry() (GH-28786) Fix test_tools.test_sundry() when Python is built out of tree: fix how the freeze_modules.py tool locates the _freeze_module program. Misc/NEWS.d/next/Tests/2021-10-07-13-43-01.bpo-45402.jlQvep.rst | 3 +++ Tools/scripts/freeze_modules.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2021-10-07-13-43-01.bpo-45402.jlQvep.rst It seems the fix for an out-of-tree build bug introduced another one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:36:40 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 22 Nov 2021 12:36:40 +0000 Subject: [issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module In-Reply-To: <1633601128.84.0.599818105628.issue45402@roundup.psfhosted.org> Message-ID: <1637584600.93.0.0846401687438.issue45402@roundup.psfhosted.org> Miro Hron?ok added the comment: There seem to be a regression in this fix, see https://bugs.python.org/issue45866 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:37:32 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 12:37:32 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637584652.81.0.478695024936.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27938 pull_request: https://github.com/python/cpython/pull/29702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:39:12 2021 From: report at bugs.python.org (Oskar Enoksson) Date: Mon, 22 Nov 2021 12:39:12 +0000 Subject: [issue45868] xattr support missing in os module under cygwin Message-ID: <1637584752.6.0.681447686617.issue45868@roundup.psfhosted.org> New submission from Oskar Enoksson : With the latest Python 3.8.10 under cygwin the following fails: >>> import os >>> os.listxattr('.') Traceback (most recent call last): File "", line 1, in < module> AttributeError: module 'os' has no attribute 'listxattr' /usr/include/attr/xattr.h declares the corresponding library functions, so something must be wrong in the configuration/compilation of python itself. ---------- components: Build messages: 406768 nosy: enok2 priority: normal severity: normal status: open title: xattr support missing in os module under cygwin type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:44:57 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 22 Nov 2021 12:44:57 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637585097.15.0.883412008716.issue45866@roundup.psfhosted.org> Miro Hron?ok added the comment: It also seems that it is *not* necessary to use Python 3.11 for regen-frozen to get the failure: $ make regen-frozen PYTHON_FOR_REGEN=python3.10 python3.10 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 $ make regen-frozen PYTHON_FOR_REGEN=python3.9 python3.9 ../../Tools/scripts/freeze_modules.py ERROR: missing _freeze_module make: *** [Makefile:1259: regen-frozen] Error 1 My guess is that the fix for test_tools.test_sundry() actually broke the real usage. It has: # When building out of the source tree, get the tool from directory # of the Python executable TOOL = os.path.dirname(sys.executable) TOOL = os.path.join(TOOL, 'Programs', '_freeze_module') But sys.executable is *not* the Python we have built, but the Python we use for regen. E.g. when Python for regen is /usr/bin/python3.X, it tries to use /usr/bin/Programs/_freeze_module which obviously is not there. The assumption that sys.executable is the freshly built Python is only correct in the tests, but not in reality. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:45:29 2021 From: report at bugs.python.org (Muhamed Itani) Date: Mon, 22 Nov 2021 12:45:29 +0000 Subject: [issue45867] kwarg default value expression incorrectly evaluated In-Reply-To: <1637584347.64.0.225027731456.issue45867@roundup.psfhosted.org> Message-ID: <1637585129.61.0.791616268364.issue45867@roundup.psfhosted.org> Change by Muhamed Itani : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:46:03 2021 From: report at bugs.python.org (Muhamed Itani) Date: Mon, 22 Nov 2021 12:46:03 +0000 Subject: [issue45867] kwarg default value expression incorrectly evaluated In-Reply-To: <1637584347.64.0.225027731456.issue45867@roundup.psfhosted.org> Message-ID: <1637585163.55.0.302596659481.issue45867@roundup.psfhosted.org> Change by Muhamed Itani : Removed file: https://bugs.python.org/file50456/mpyFrame.pyw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 07:51:09 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 22 Nov 2021 12:51:09 +0000 Subject: [issue45865] Old syntax in unittest In-Reply-To: <1637576990.34.0.316155860666.issue45865@roundup.psfhosted.org> Message-ID: <1637585469.58.0.271893249771.issue45865@roundup.psfhosted.org> Eric V. Smith added the comment: As a general rule, we don't accept large patches with changes like this. The chance for breakage somewhere in the 27 files is too high. I could see maybe dropping inheriting from object, since that's relatively safe. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:02:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 13:02:40 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637586160.27.0.538152762284.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 5b946cadaa1175a5caae98bd2d309840bea52a58 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port fcntl to Py_STDLIB_MOD (GH-29696) https://github.com/python/cpython/commit/5b946cadaa1175a5caae98bd2d309840bea52a58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:23:57 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 13:23:57 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637587437.21.0.601459087382.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27939 pull_request: https://github.com/python/cpython/pull/29703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:26:23 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 13:26:23 +0000 Subject: [issue44649] dataclasses slots with init=False field raises AttributeException In-Reply-To: <1626375963.06.0.364448585924.issue44649@roundup.psfhosted.org> Message-ID: <1637587583.85.0.041198947565.issue44649@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27940 pull_request: https://github.com/python/cpython/pull/29704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:26:21 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 22 Nov 2021 13:26:21 +0000 Subject: [issue44649] dataclasses slots with init=False field raises AttributeException In-Reply-To: <1626375963.06.0.364448585924.issue44649@roundup.psfhosted.org> Message-ID: <1637587581.05.0.921802633853.issue44649@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset d3062f672c92855b7e9e962ad4bf1a67abd4589b by Eric V. Smith in branch 'main': bpo-44649: Fix dataclasses(slots=True) with a field with a default, but init=False (GH-29692) https://github.com/python/cpython/commit/d3062f672c92855b7e9e962ad4bf1a67abd4589b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:27:59 2021 From: report at bugs.python.org (Joran van Apeldoorn) Date: Mon, 22 Nov 2021 13:27:59 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters Message-ID: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> New submission from Joran van Apeldoorn : The expectation would be that the re.A (or re.ASCII) flag should not impact the matching behavior of a regular expression on strings consisting only of ASCII characters. However, for the characters 0x1c till 0x1f, the classes \s and \S differ. For ASCII theses characters are not considered space characters while for unicode they are. Note that python strings do consider these characters spaces as '\xc1'.isspace() gives True. All other classes and characters stay the same for unicode and ASCII matching. ---------- components: Regular Expressions files: unicode-ascii-space.py messages: 406773 nosy: control-k, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Unicode and acii regular expressions do not agree on ascii space characters versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file50457/unicode-ascii-space.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:29:26 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 22 Nov 2021 13:29:26 +0000 Subject: [issue44649] dataclasses slots with init=False field raises AttributeException In-Reply-To: <1626375963.06.0.364448585924.issue44649@roundup.psfhosted.org> Message-ID: <1637587766.4.0.484155587093.issue44649@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the bug report! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:30:38 2021 From: report at bugs.python.org (Joran van Apeldoorn) Date: Mon, 22 Nov 2021 13:30:38 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters In-Reply-To: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> Message-ID: <1637587838.26.0.114381751133.issue45869@roundup.psfhosted.org> Change by Joran van Apeldoorn : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:33:37 2021 From: report at bugs.python.org (Ken Jin) Date: Mon, 22 Nov 2021 13:33:37 +0000 Subject: [issue45857] PEP 604 Union syntax does not support forward references In-Reply-To: <1637506111.5.0.826205176723.issue45857@roundup.psfhosted.org> Message-ID: <1637588017.65.0.588450807953.issue45857@roundup.psfhosted.org> Ken Jin added the comment: I think I saw a similar bug report elsewhere (or maybe I'm misremembering). Anyways, Eric is right, the correct way is to wrap the entire thing, so "Foo|int" instead of "Foo"|int. @Alex you brought up some good suggestions, I'll try to address them: > Arguably, either the implementation should be altered to support forward references Unfortunately that's more complex than it seems. The original draft PEP 604 proposed implementation actually imported Union from typing.py, and I recall Guido disliking the idea that a builtin type should depend on typing.py. I have to agree with that philosophy here. I also don't think the alternative -- implementing a builtin ForwardRef type isn't worth the complexity unless our situation changes. > the documentation at https://docs.python.org/3/library/stdtypes.html#union-type should be altered to make clear that ... The first line says: "A union object holds the value of the | (bitwise or) operation on multiple type objects." It says *type objects*, which strings don't belong to. @TNThung does Eric's suggestion work for you? Or do you need something else? ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:47:49 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 13:47:49 +0000 Subject: [issue44649] dataclasses slots with init=False field raises AttributeException In-Reply-To: <1626375963.06.0.364448585924.issue44649@roundup.psfhosted.org> Message-ID: <1637588869.74.0.110933421391.issue44649@roundup.psfhosted.org> miss-islington added the comment: New changeset 10343bd98390ef15909e3a19f26a6178162996fd by Miss Islington (bot) in branch '3.10': bpo-44649: Fix dataclasses(slots=True) with a field with a default, but init=False (GH-29692) https://github.com/python/cpython/commit/10343bd98390ef15909e3a19f26a6178162996fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:50:08 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 13:50:08 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637589008.78.0.591376917868.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b451673f93465a27ee61e408190ee61cb9dbd5b6 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port mmap, select, and _xxsubinterpreters to Py_STDLIB_MOD (GH-29703) https://github.com/python/cpython/commit/b451673f93465a27ee61e408190ee61cb9dbd5b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:51:22 2021 From: report at bugs.python.org (keeely) Date: Mon, 22 Nov 2021 13:51:22 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) Message-ID: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> New submission from keeely : In the past this was worked around by installing a third-party module: https://github.com/pyreadline/pyreadline For Python 3.10, however this module doesn't work. And pyreadline doesn't seem to be maintained anymore, so it's possible it won't get fixed. https://github.com/pyreadline/pyreadline/issues/73 Consider the following code: import cmd import readline open("history.txt", "w").write("first line\nsecond line\n") readline.clear_history() readline.read_history_file("history.txt") class MyShell(cmd.Cmd): def __init__(self): super().__init__() shell = MyShell() shell.cmdloop() This works fine on MacOs Python, also on Linux and on Windows prior to 3.10 with the readline module added. It won't work going forward. The Windows cmd implementation clearly uses readline or some compatible lib under the hood, so Python should make it available to developers. ---------- components: Library (Lib) messages: 406778 nosy: keeely priority: normal severity: normal status: open title: There's no readline module on Windows Python (cmd.Cmd) type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 08:52:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 13:52:37 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637589157.98.0.703647508365.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset d9cedabeba0d87799f99c0717e81743a1c2d34ce by Christian Heimes in branch 'main': bpo-45847: Port compression libs to PY_STDLIB_MOD (GH-29702) https://github.com/python/cpython/commit/d9cedabeba0d87799f99c0717e81743a1c2d34ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:01:31 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 22 Nov 2021 14:01:31 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1637589691.55.0.432580039305.issue45813@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 7fd92a8b7ee5bed28c2681fa38e0a1e76200dd8e by Mark Shannon in branch 'main': bpo-45813: Make sure that frame->generator is NULLed when generator is deallocated. (GH-29700) https://github.com/python/cpython/commit/7fd92a8b7ee5bed28c2681fa38e0a1e76200dd8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:06:21 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 14:06:21 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637589981.6.0.0609020617694.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27941 pull_request: https://github.com/python/cpython/pull/29705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:18:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 14:18:22 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637590702.77.0.0963345928974.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27942 pull_request: https://github.com/python/cpython/pull/29706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:18:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 14:18:48 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637590728.63.0.0876734159725.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset c6dec7e27a82cba33539d07ef8d7346e0a232421 by Christian Heimes in branch 'main': bpo-45847: Port nis module to PY_STDLIB_MOD (GH-29699) https://github.com/python/cpython/commit/c6dec7e27a82cba33539d07ef8d7346e0a232421 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:25:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 14:25:45 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637591145.36.0.191531271187.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: Not converted yet: readline _curses _curses_panel _crypt _socket _ssl _hashlib _dbm _gdbm _ctypes _multiprocessing _posixshmem _tkinter _uuid xxlimited xxlimited_35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:28:16 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 14:28:16 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637591296.91.0.652071716309.issue45847@roundup.psfhosted.org> Erlend E. Aasland added the comment: _socket coming up... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:37:34 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 14:37:34 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637591854.19.0.636940116084.issue45847@roundup.psfhosted.org> miss-islington added the comment: New changeset eee683cbde499e62fc90ad366f7c45625fe92150 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port audioop, _csv, and _posixsubprocess to PY_STDLIB_MOD_SIMPLE (GH-29705) https://github.com/python/cpython/commit/eee683cbde499e62fc90ad366f7c45625fe92150 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:42:42 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 14:42:42 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637592162.11.0.338797057895.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: _crypt is powered by pkgconf libcrypt or libxcrypt on Linux. On my system and on Debian, libcrypt.pc is a symlink to libxcrypt.pc. Linux has crypt() and/or crypt_r() in . On FreeBSD crypt_r() is in and libc. _uuid needs similar special handling. It's , -luuid, and uuid.pc on Linux. On BSD it's and symbols are in libc. _readline uses either libreadline (readline.pc) or libeditline (libeditline.pc). It also needs special handling of tinfo and termcap on some platforms. ndbm, gdbm, and libdb have no pkgconf providers. My PR GH-29534 has some code to detect them in configure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:44:59 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 14:44:59 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637592299.43.0.352722983005.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27943 pull_request: https://github.com/python/cpython/pull/29707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:45:01 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Nov 2021 14:45:01 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637592301.78.0.566703686211.issue45859@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 4fad314246399b69ef0c57ba8527d9efade99069 by Carl Friedrich Bolz-Tereick in branch 'main': bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) https://github.com/python/cpython/commit/4fad314246399b69ef0c57ba8527d9efade99069 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:45:11 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 14:45:11 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637592311.33.0.872318309483.issue45859@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27944 pull_request: https://github.com/python/cpython/pull/29708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:45:19 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 14:45:19 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637592319.58.0.0769078313217.issue45859@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27945 pull_request: https://github.com/python/cpython/pull/29709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:47:34 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Nov 2021 14:47:34 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637592454.35.0.0138188421406.issue45859@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27946 pull_request: https://github.com/python/cpython/pull/29710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:53:20 2021 From: report at bugs.python.org (Joran van Apeldoorn) Date: Mon, 22 Nov 2021 14:53:20 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters In-Reply-To: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> Message-ID: <1637592800.89.0.152578568002.issue45869@roundup.psfhosted.org> Joran van Apeldoorn added the comment: Small addition, the sre categories CATEGORY_LINEBREAK and CATEGORY_UNI_LINEBREAK also do not agree on ASCII characters. The first is only '\n' while the second also includes for example '\r' and some others. These do not seem to correspond to anything however and are never used in sre_parse.py or sre_compile.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 09:58:53 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 14:58:53 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637593133.28.0.0654300212592.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 0e1c2f3ef84572b79fa7d8498a69bc5a56ff0d8d by Christian Heimes in branch 'main': bpo-45847: port _struct to PY_STDLIB_MOD (GH-29706) https://github.com/python/cpython/commit/0e1c2f3ef84572b79fa7d8498a69bc5a56ff0d8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 10:04:20 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Mon, 22 Nov 2021 15:04:20 +0000 Subject: [issue45843] Optimizing constant comparisons/contains In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637593460.56.0.843486185605.issue45843@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- title: Optimizing LOAD_CONST followed by COMPARE_OP (or IS_OP) -> Optimizing constant comparisons/contains _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 10:06:02 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Nov 2021 15:06:02 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637593562.92.0.415455000792.issue45859@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 56b5cd52ab58d8f2f11f253ec1bb3e6000d2dbd2 by Miss Islington (bot) in branch '3.10': bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29708) https://github.com/python/cpython/commit/56b5cd52ab58d8f2f11f253ec1bb3e6000d2dbd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 10:20:54 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 22 Nov 2021 15:20:54 +0000 Subject: [issue32582] chr raises OverflowError In-Reply-To: <1516199526.4.0.467229070634.issue32582@psf.upfronthosting.co.za> Message-ID: <1637594454.23.0.241809450344.issue32582@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 10:52:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 15:52:54 +0000 Subject: [issue45871] Refactor exception matcher validation out of JUMP_IF_NOT_EXC_MATCH Message-ID: <1637596374.92.0.314923053971.issue45871@roundup.psfhosted.org> New submission from Irit Katriel : The validation will be shared with except* so this refactor is prep for implementing PEP-654. Also need to add the missing unit test for the validation. ---------- messages: 406790 nosy: iritkatriel priority: normal severity: normal status: open title: Refactor exception matcher validation out of JUMP_IF_NOT_EXC_MATCH versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 10:53:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 15:53:00 +0000 Subject: [issue45871] Refactor exception matcher validation out of JUMP_IF_NOT_EXC_MATCH In-Reply-To: <1637596374.92.0.314923053971.issue45871@roundup.psfhosted.org> Message-ID: <1637596380.56.0.422109360891.issue45871@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 11:11:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 16:11:49 +0000 Subject: [issue45871] Refactor exception matcher validation out of JUMP_IF_NOT_EXC_MATCH In-Reply-To: <1637596374.92.0.314923053971.issue45871@roundup.psfhosted.org> Message-ID: <1637597509.67.0.634178708787.issue45871@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +27947 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 11:36:42 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Nov 2021 16:36:42 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637599002.97.0.412676072743.issue45859@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 455ed45d7c30c5f2a31c524b015c48ac85f3d27c by Miss Islington (bot) in branch '3.9': bpo-45859: Mark test_field_descriptor in test_collections as CPython-only (GH-29691) (GH-29709) https://github.com/python/cpython/commit/455ed45d7c30c5f2a31c524b015c48ac85f3d27c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 11:39:53 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Nov 2021 16:39:53 +0000 Subject: [issue45859] test_collections has a wrong test in case _itemgetter is not available In-Reply-To: <1637527591.49.0.376717916242.issue45859@roundup.psfhosted.org> Message-ID: <1637599193.42.0.751074742803.issue45859@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 11:46:08 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 22 Nov 2021 16:46:08 +0000 Subject: [issue45857] PEP 604 Union syntax does not support forward references In-Reply-To: <1637506111.5.0.826205176723.issue45857@roundup.psfhosted.org> Message-ID: <1637599568.12.0.570525995161.issue45857@roundup.psfhosted.org> Alex Waygood added the comment: Thanks, Ken! To clarify: I agree that changing the implementation here would probably be a bad way to go: it would be foolish to try to replicate all the functionality of the typing module as builtins. I also think the existing documentation at https://docs.python.org/3/library/stdtypes.html#union-type is actually very good, so I don't think it needs a fundamental rewrite by any means. I do still think a sentence or two could be added to the documentation, however, clarifying how to deal with forward references, since the behaviour here is different to the older, more established syntax using typing.Union. Something like this? """ Note: The object on both sides of the | operand must be an object that defines the __or__ special method. As the str type does not support __or__, the expression `int | "Foo"`, where "Foo" is a reference to a class not yet defined, will fail at runtime. To annotate forward references using union-type expressions, present the whole expression as a string, e.g. `"int | Foo"`. """ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 11:56:31 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 22 Nov 2021 16:56:31 +0000 Subject: [issue45871] Refactor exception matcher validation out of JUMP_IF_NOT_EXC_MATCH In-Reply-To: <1637596374.92.0.314923053971.issue45871@roundup.psfhosted.org> Message-ID: <1637600191.13.0.998960750972.issue45871@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 4d6c0c0cce05befa06e0cad7351b1303ac048277 by Irit Katriel in branch 'main': bpo-45871: Refactor except matcher validation into a separate function so that it can be reused. Add missing unit test. (GH-29711) https://github.com/python/cpython/commit/4d6c0c0cce05befa06e0cad7351b1303ac048277 ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 12:09:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 17:09:22 +0000 Subject: [issue45871] Refactor exception matcher validation out of JUMP_IF_NOT_EXC_MATCH In-Reply-To: <1637596374.92.0.314923053971.issue45871@roundup.psfhosted.org> Message-ID: <1637600962.73.0.586215719617.issue45871@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 12:20:51 2021 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 22 Nov 2021 17:20:51 +0000 Subject: [issue45459] Limited API support for Py_buffer In-Reply-To: <1634118913.79.0.141868262007.issue45459@roundup.psfhosted.org> Message-ID: <1637601651.05.0.210677026286.issue45459@roundup.psfhosted.org> Alex Gaynor added the comment: I am someone who is interested in having this, but FWIW my motivation is slightly more narrow, I only really need abi3-friendly buffer support with contiguous 1d buffers. Not sure if there'd be interest in doing a smaller version before figuring out the entire Py_buffer API. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 12:35:36 2021 From: report at bugs.python.org (Pavel V) Date: Mon, 22 Nov 2021 17:35:36 +0000 Subject: [issue45872] Turtle documentation, write() Message-ID: <1637602535.98.0.579349868944.issue45872@roundup.psfhosted.org> New submission from Pavel V : There are no parentheses for 'font' argument in turtle.write() documentation https://docs.python.org/3.10/library/turtle.html#turtle.write ---------- assignee: docs at python components: Documentation messages: 406795 nosy: docs at python, willyns priority: normal severity: normal status: open title: Turtle documentation, write() versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 12:40:39 2021 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 22 Nov 2021 17:40:39 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters In-Reply-To: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> Message-ID: <1637602839.34.0.620591834726.issue45869@roundup.psfhosted.org> Matthew Barnett added the comment: For comparison, the regex module says that 0x1C..0x1F aren't whitespace, and the Unicode property White_Space ("\p{White_Space}" in a pattern, where supported) also says that they aren't whitespace. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 13:00:17 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 18:00:17 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637604017.92.0.746057685007.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27948 pull_request: https://github.com/python/cpython/pull/29713 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 13:09:56 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Nov 2021 18:09:56 +0000 Subject: [issue45850] Port deep-freeze to Windows Message-ID: <1637604596.84.0.478261244979.issue45850@roundup.psfhosted.org> New submission from Guido van Rossum : New changeset 1037ca5a8ea001bfa2a198e08655620234e9befd by Guido van Rossum in branch 'main': bpo-45850: Implement deep-freeze on Windows (#29648) https://github.com/python/cpython/commit/1037ca5a8ea001bfa2a198e08655620234e9befd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 13:50:23 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Nov 2021 18:50:23 +0000 Subject: [issue45850] Port deep-freeze to Windows In-Reply-To: <1637604596.84.0.478261244979.issue45850@roundup.psfhosted.org> Message-ID: <1637607023.14.0.976911369185.issue45850@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 13:51:49 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Nov 2021 18:51:49 +0000 Subject: [issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds Message-ID: <1637607109.55.0.706004441577.issue45873@roundup.psfhosted.org> New submission from Guido van Rossum : Now that we've got a way (for Windows) to deep-freeze without building a bootstrap Python binary, we should do the same for UNIX. ---------- components: Build messages: 406798 nosy: gvanrossum priority: normal severity: normal stage: needs patch status: open title: Stop using bootstrap_python for deep-freeze in UNIX builds versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 15:00:45 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Nov 2021 20:00:45 +0000 Subject: [issue45865] Old syntax in unittest In-Reply-To: <1637576990.34.0.316155860666.issue45865@roundup.psfhosted.org> Message-ID: <1637611245.31.0.935889387447.issue45865@roundup.psfhosted.org> Serhiy Storchaka added the comment: Concur with Eric. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 15:02:54 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 22 Nov 2021 20:02:54 +0000 Subject: [issue45843] Optimizing constant comparisons/contains In-Reply-To: <1637330790.91.0.849281651207.issue45843@roundup.psfhosted.org> Message-ID: <1637611374.3.0.355810440067.issue45843@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 15:18:36 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Nov 2021 20:18:36 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1637612316.8.0.751861091491.issue45870@roundup.psfhosted.org> Eryk Sun added the comment: > The Windows cmd implementation clearly uses readline or > some compatible lib under the hood The REPL shell and input() call PyOS_Readline(). If this call isn't hooked (e.g. by the readline module), and stdin is a console file, then it reads a line from the console via ReadConsoleW(). If the console's input stream is configured in line-input mode, which we assume it is, this function provides basic readline-ish support, including a line editor that supports input history and aliases. The history is stored in an in-memory buffer in the console, which doesn't get save and reused across console sessions. There is no public API to get the history contents, and there is no support at all to set it. The console/terminal team at Microsoft apparently don't want to do anything with the builtin readline support, which is seen as a legacy feature. To the contrary, I've even seen them suggest that they're evaluating the addition of a new client-side readline library in the native API, which I assume would be similar to PowerShell's PSReadLine (e.g. based on ReadConsoleInputW(), and supporting a classic console mode in addition to emacs and vi modes). For now, I suggest patching pyreadline for your own use. In the reported issue, I see it's trying to use collections.Callable. Instead it should import collections.abc and use collections.abc.Callable. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 15:27:32 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Nov 2021 20:27:32 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637612852.2.0.967007396356.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 2dc7d3dda61e7ce07721f46b14c706fbc879dfd6 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port xxlimited and xxlimited_35 to PY_STDLIB_MOD (GH-29707) https://github.com/python/cpython/commit/2dc7d3dda61e7ce07721f46b14c706fbc879dfd6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 15:36:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Nov 2021 20:36:38 +0000 Subject: [issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds In-Reply-To: <1637607109.55.0.706004441577.issue45873@roundup.psfhosted.org> Message-ID: <1637613398.26.0.685505474887.issue45873@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +patch pull_requests: +27949 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 15:36:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Nov 2021 20:36:38 +0000 Subject: [issue45850] Port deep-freeze to Windows In-Reply-To: <1637604596.84.0.478261244979.issue45850@roundup.psfhosted.org> Message-ID: <1637613398.34.0.141634994413.issue45850@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27950 pull_request: https://github.com/python/cpython/pull/29714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 16:16:30 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 22 Nov 2021 21:16:30 +0000 Subject: [issue42367] Restore os.makedirs ability to apply mode to all directories created In-Reply-To: <1605520451.51.0.153670810596.issue42367@roundup.psfhosted.org> Message-ID: <1637615790.19.0.423556601644.issue42367@roundup.psfhosted.org> Gregory P. Smith added the comment: A new `intermediate_mode=` kwarg can't _default_ to `mode=` as that would flip flop the API's default behavior again and no doubt disrupt someone elses 3.7-3.10 authored code depending on it. :( Regardless I do somewhat like `intermediate_mode=` more than the PR's existing `recursive_mode=` as it opens up more possible behaviors... Allowing `None` to mean "use `mode=`" is desirable as that'll likely be the most common case. As I expect this to be very common, an easier to type name than intermediate_mode is desirable. Brainstorming: * mid_mode? * submode? * imode? My preference leans towards the latter names. Probably `submode=`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 16:34:35 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 22 Nov 2021 21:34:35 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637616875.73.0.163974519797.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27951 pull_request: https://github.com/python/cpython/pull/29715 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 16:43:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 21:43:56 +0000 Subject: [issue36706] Python script on startup stucks at import In-Reply-To: <1556024687.06.0.0109255005812.issue36706@roundup.psfhosted.org> Message-ID: <1637617436.93.0.963930365268.issue36706@roundup.psfhosted.org> Irit Katriel added the comment: Serge, are you still having this problem and if so can you provide the traces? If this issue is abandoned I will close it within a couple of weeks. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 16:47:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 21:47:47 +0000 Subject: [issue40324] python 3.8.2 idle not opening In-Reply-To: <1587239062.2.0.770603015348.issue40324@roundup.psfhosted.org> Message-ID: <1637617667.54.0.776983291789.issue40324@roundup.psfhosted.org> Irit Katriel added the comment: Closing as there isn't enough information here to understand the issue and there was no reply to followup questions. Please create a new issue if you still have a problem and are able to explain it more fully. ---------- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 16:52:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 21:52:57 +0000 Subject: [issue38541] Performance degradation of attribute accesses in Python 3.7.4 In-Reply-To: <1571645744.43.0.285485842632.issue38541@roundup.psfhosted.org> Message-ID: <1637617977.79.0.321855262663.issue38541@roundup.psfhosted.org> Irit Katriel added the comment: Closing as this is resolved in 3.8 and we won't do anything about 3.7. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 17:11:49 2021 From: report at bugs.python.org (Zachary Ware) Date: Mon, 22 Nov 2021 22:11:49 +0000 Subject: [issue45833] NamedTemporaryFile deleted before enclosing context manager exit In-Reply-To: <1637184131.4.0.431691431028.issue45833@roundup.psfhosted.org> Message-ID: <1637619109.54.0.767132870829.issue45833@roundup.psfhosted.org> Change by Zachary Ware : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 17:20:36 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 22:20:36 +0000 Subject: [issue22067] time_test fails after strptime() In-Reply-To: <1406300706.97.0.297116152609.issue22067@psf.upfronthosting.co.za> Message-ID: <1637619636.21.0.702836439851.issue22067@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce this on 3.11. ---------- nosy: +iritkatriel resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 17:35:40 2021 From: report at bugs.python.org (Christian Sattler) Date: Mon, 22 Nov 2021 22:35:40 +0000 Subject: [issue45874] urllib.parse.parse_qsl does not parse empty query string with strict parsing Message-ID: <1637620540.89.0.438888661904.issue45874@roundup.psfhosted.org> New submission from Christian Sattler : Calling urllib.parse.parse_qsl('', strict_parsing=True) yields an error: ValueError: bad query field: '' The empty string '' is produced by urllib.parse.urlencode({}) and also as query string by urllib.parse.urlsplit('http://example.org/') so it should be accepted by urllib.parse.parse_qsl with strict parsing. The problem is that parse_qsl(qs, ...) cannot distinguish between zero and one query arguments. The call to qs.split(separator) returns the non-empty list [''] for qs empty, which means one query argument. However, in this case, we want the other semantics. ---------- components: Library (Lib) messages: 406807 nosy: sattler priority: normal severity: normal status: open title: urllib.parse.parse_qsl does not parse empty query string with strict parsing type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 17:39:32 2021 From: report at bugs.python.org (Roundup Robot) Date: Mon, 22 Nov 2021 22:39:32 +0000 Subject: [issue45874] urllib.parse.parse_qsl does not parse empty query string with strict parsing In-Reply-To: <1637620540.89.0.438888661904.issue45874@roundup.psfhosted.org> Message-ID: <1637620772.71.0.16240927261.issue45874@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +27952 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 17:47:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 22:47:31 +0000 Subject: [issue33489] Newer externals for windows do not always trigger rebuild In-Reply-To: <1526261129.26.0.682650639539.issue33489@psf.upfronthosting.co.za> Message-ID: <1637621251.31.0.461852059168.issue33489@roundup.psfhosted.org> Irit Katriel added the comment: > When tcl/tk has been upgraded during 3.x alpha/beta periods, tcl/tk seems to have been recompiled when it should be. Terry, are you saying this was only a problem on 2.7? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 18:09:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Nov 2021 23:09:21 +0000 Subject: [issue28989] .dll files missing In-Reply-To: <1481902695.92.0.0511959734428.issue28989@psf.upfronthosting.co.za> Message-ID: <1637622561.26.0.985366745239.issue28989@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 18:09:23 2021 From: report at bugs.python.org (Brett Cannon) Date: Mon, 22 Nov 2021 23:09:23 +0000 Subject: [issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are In-Reply-To: <1632168182.73.0.0551762354894.issue45250@roundup.psfhosted.org> Message-ID: <1637622563.2.0.388092467731.issue45250@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 99aad31b7ad493d4feea04064bcd6b04061477f9 by Brett Cannon in branch '3.10': [3.10] bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170) (GH-29650) https://github.com/python/cpython/commit/99aad31b7ad493d4feea04064bcd6b04061477f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 18:09:30 2021 From: report at bugs.python.org (Brett Cannon) Date: Mon, 22 Nov 2021 23:09:30 +0000 Subject: [issue45250] Make sure documentation is accurate for what an (async) iterable and (async) iterator are In-Reply-To: <1632168182.73.0.0551762354894.issue45250@roundup.psfhosted.org> Message-ID: <1637622570.15.0.0648276225272.issue45250@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 18:18:02 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 22 Nov 2021 23:18:02 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637623082.0.0.319342288271.issue42238@roundup.psfhosted.org> Carol Willing added the comment: New changeset 024209401ebc8a011f242af00efdd8ecece6953d by Julien Palard in branch 'main': bpo-42238: [doc] Announce the future removal of make suspicous. (GH-29652) https://github.com/python/cpython/commit/024209401ebc8a011f242af00efdd8ecece6953d ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 18:38:54 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 22 Nov 2021 23:38:54 +0000 Subject: [issue45555] Object stays alive for weak reference if an exception happens in constructor In-Reply-To: <1634828082.31.0.276861942935.issue45555@roundup.psfhosted.org> Message-ID: <1637624334.89.0.0210501157463.issue45555@roundup.psfhosted.org> Andrei Kulakov added the comment: Note also that in addition to not being related to weakref as Pablo said, it's also not related to the __init__() -- the exception can be moved to any method of the object with the same result. It may be good to update the title so that it's not misleading? ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 18:43:40 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Nov 2021 23:43:40 +0000 Subject: [issue45850] Port deep-freeze to Windows In-Reply-To: <1637604596.84.0.478261244979.issue45850@roundup.psfhosted.org> Message-ID: <1637624620.06.0.260142825665.issue45850@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27954 pull_request: https://github.com/python/cpython/pull/29717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 18:43:40 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Nov 2021 23:43:40 +0000 Subject: [issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds In-Reply-To: <1637607109.55.0.706004441577.issue45873@roundup.psfhosted.org> Message-ID: <1637624620.0.0.0954657806454.issue45873@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +27953 pull_request: https://github.com/python/cpython/pull/29717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 19:49:18 2021 From: report at bugs.python.org (Brett Cannon) Date: Tue, 23 Nov 2021 00:49:18 +0000 Subject: [issue45548] Update Modules/Setup In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org> Message-ID: <1637628558.54.0.214073884864.issue45548@roundup.psfhosted.org> Brett Cannon added the comment: @christian are you using this issue for your pkg-config work, or should I close this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 21:45:29 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 23 Nov 2021 02:45:29 +0000 Subject: [issue45572] urllib.request:AttributeError: 'dict' object has no attribute 'get_all' in http_error_auth_reqed function In-Reply-To: <1634909734.24.0.124969342817.issue45572@roundup.psfhosted.org> Message-ID: <1637635529.72.0.419026693735.issue45572@roundup.psfhosted.org> Andrei Kulakov added the comment: I'm not sure about the hang in 3.7 and CVE, but as far as `get_all()` error is concerned, it's due to passing the wrong kind of argument as `headers`. For this (undocumented) method, `headers` should be a Message object created in this way, e.g.: headers = email.message_from_string( 'Content-type: %s\nContent-length: %d\nLast-modified: %s\n' % (mtype or 'text/plain', size, modified)) (see https://github.com/python/cpython/blob/024209401ebc8a011f242af00efdd8ecece6953d/Lib/urllib/request.py#L1509) Header obj created in this way does have the `get_all()` method, and I tested that the method runs without further errors. ---------- nosy: +andrei.avk, kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 22 22:10:25 2021 From: report at bugs.python.org (Frost Ming) Date: Tue, 23 Nov 2021 03:10:25 +0000 Subject: [issue45235] argparse does not preserve namespace with subparser defaults In-Reply-To: <1631890734.12.0.701463144819.issue45235@roundup.psfhosted.org> Message-ID: <1637637025.27.0.205132700175.issue45235@roundup.psfhosted.org> Frost Ming added the comment: Hi, I noticed this bug because of the regression of Python 3.9.8. And I proposed a better approach in PR 29574. Maybe the folks here can have a look. Thanks - Frost ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 01:12:51 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Tue, 23 Nov 2021 06:12:51 +0000 Subject: [issue45509] Gzip header corruption not properly checked. In-Reply-To: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org> Message-ID: <1637647971.4.0.782807409586.issue45509@roundup.psfhosted.org> Ruben Vorderman added the comment: I increased the performance of the patch. I added the file used for benchmarking. I also test the FHCRC changes now. The benchmark tests headers with different flags concatenated to a DEFLATE block with no data and a gzip trailer. The data is fed to gzip.decompress. Please note that this is the *worst-case* performance overhead. When there is actual data to decompress the overhead will get less. When GzipFile is used the overhead will get less as well. BEFORE (Current main branch): $ ./python benchmark_gzip_read_header.py with_fname average: 3.01, range: 2.9-4.79 stdev: 0.19 with_noflags average: 2.99, range: 2.93-3.04 stdev: 0.02 All flags (incl FHCRC) average: 3.13, range: 3.05-3.16 stdev: 0.02 After (bpo-45509 PR): with_fname average: 3.09, range: 3.01-4.63 stdev: 0.16 with_noflags average: 3.1, range: 3.03-3.38 stdev: 0.04 All flags (incl FHCRC) average: 4.09, range: 4.05-4.49 stdev: 0.04 An increase of .1 microsecond in the most common use cases. Roughly 3%. But now the FNAME field is correctly checked for truncation. With the FHCRC the overhead is increased by 33%. But this is worth it, because the header is now actually checked. As it should. ---------- Added file: https://bugs.python.org/file50458/benchmark_gzip_read_header.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:04:35 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Tue, 23 Nov 2021 07:04:35 +0000 Subject: [issue45875] gzip.decompress performance can be improved with memoryviews Message-ID: <1637651074.98.0.153102708478.issue45875@roundup.psfhosted.org> New submission from Ruben Vorderman : The current implementation uses a lot of bytestring slicing. While it is much better than the 3.10 and earlier implementations, it can still be further improved by using memoryviews instead. Possibly. I will check this out. ---------- components: Library (Lib) messages: 406816 nosy: rhpvorderman priority: normal severity: normal status: open title: gzip.decompress performance can be improved with memoryviews type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:07:29 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 23 Nov 2021 07:07:29 +0000 Subject: [issue33489] Newer externals for windows do not always trigger rebuild In-Reply-To: <1526261129.26.0.682650639539.issue33489@psf.upfronthosting.co.za> Message-ID: <1637651249.81.0.994525379075.issue33489@roundup.psfhosted.org> Terry J. Reedy added the comment: Apparently so, which makes this irrelevant. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:22:45 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 23 Nov 2021 07:22:45 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters In-Reply-To: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> Message-ID: <1637652165.28.0.91922558004.issue45869@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi Joran, I'm not sure why you think that /s should agree between ASCII and Unicode. That seems like an unjustified assumption to me. You say: "The expectation would be that the re.A (or re.ASCII) flag should not impact the matching behavior of a regular expression on strings consisting only of ASCII characters." But I'm not sure why you have that expectation. Is it documented somewhere? The docs clearly say that for character classes, "the characters they match depends on whether ASCII or LOCALE mode is in force." I am unable to find anything that says that the differences are limited only to non-ASCII code points. I don't think there is any standard definition of "whitespace" in either the ASCII standard, or the very many different regex engines (Perl, dot-Net, Java, ECMA, etc). Unicode does have an official whitespace character property, and as far as I can see '\x1c' through '\x1f' (File Separator, Group Separator, Record Separator and Unit Separator) are not considered whitespace: https://en.wikipedia.org/wiki/Unicode_character_property#Whitespace But the str.isspace() method does consider them as whitespace, while bytes.isspace() does not. >>> '\x1c'.isspace() True >>> b'\x1c'.isspace() False ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:26:40 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 23 Nov 2021 07:26:40 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters In-Reply-To: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> Message-ID: <1637652400.75.0.00338042797905.issue45869@roundup.psfhosted.org> Steven D'Aprano added the comment: In any case, any change to this would have to be limited to Python 3.11. It is not clearly a bug, so this would be an enhancement. ---------- type: behavior -> enhancement versions: -Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:35:58 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Tue, 23 Nov 2021 07:35:58 +0000 Subject: [issue45875] gzip.decompress performance can be improved with memoryviews In-Reply-To: <1637651074.98.0.153102708478.issue45875@roundup.psfhosted.org> Message-ID: <1637652958.06.0.676361526585.issue45875@roundup.psfhosted.org> Ruben Vorderman added the comment: Tried and failed. It seems that the overhead of creating a new memoryview object beats the performance gained by it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:51:09 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 07:51:09 +0000 Subject: [issue45561] Run smelly.py and multissltests.py from $(srcdir) In-Reply-To: <1634852280.03.0.00103137600776.issue45561@roundup.psfhosted.org> Message-ID: <1637653869.82.0.893154765338.issue45561@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 457e6a6e96b5afad403a0bc892508a77beef4d33 by Neil Schemenauer in branch 'main': bpo-45561: Run smelly.py tool from $(srcdir) (GH-29138) https://github.com/python/cpython/commit/457e6a6e96b5afad403a0bc892508a77beef4d33 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:51:19 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Nov 2021 07:51:19 +0000 Subject: [issue45561] Run smelly.py and multissltests.py from $(srcdir) In-Reply-To: <1634852280.03.0.00103137600776.issue45561@roundup.psfhosted.org> Message-ID: <1637653879.02.0.592090850076.issue45561@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +27955 pull_request: https://github.com/python/cpython/pull/29719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:51:35 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 07:51:35 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637653895.54.0.866517964812.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 758a23d1c4db97b578bc16e0ea110074d65c4c52 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Fix xxlimited and xxlimited_35 build conditions (GH-29715) https://github.com/python/cpython/commit/758a23d1c4db97b578bc16e0ea110074d65c4c52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 02:52:09 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 07:52:09 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637653929.8.0.51422634508.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset d82f2caf942fa8b94e797a2f116ee54ec303c2df by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port _socket to PY_STDLIB_MOD (GH-29713) https://github.com/python/cpython/commit/d82f2caf942fa8b94e797a2f116ee54ec303c2df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 03:19:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 08:19:25 +0000 Subject: [issue33590] [doc] sched.enter priority has no impact on execution In-Reply-To: <1526881413.19.0.682650639539.issue33590@psf.upfronthosting.co.za> Message-ID: <1637655565.87.0.427513151809.issue33590@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation keywords: +easy nosy: +docs at python resolution: not a bug -> title: sched.enter priority has no impact on execution -> [doc] sched.enter priority has no impact on execution versions: +Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 03:21:50 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 08:21:50 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics Message-ID: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> New submission from Raymond Hettinger : The standard deviation computation in the statistics module is still subject to error even though the mean and sum of square differences are computed exactly using fractions. The problem is that the exact fraction gets rounded to a float before going into math.sqrt() which also rounds. It would be better to compute a high precision square root directly from the exact fraction rather than from a fraction rounded to a float. Here are two ways to do it. With Cpython, the second way is twice as fast. With PyPy3, the speed is about the same. def frac_sqrt(x: Fraction) -> float: 'Return sqrt to greater precision than math.sqrt()' # Needed because a correctly rounded square root of # a correctly rounded input can still be off by 1 ulp. # Here we avoid the initial rounding and work directly # will the exact fractional input. The square root # is first approximated with math.sqrt() and then # refined with a divide-and-average step. Since the # Newton-Raphson algorithm has quadratic convergence, # one refinement step gives excellent accuracy. a = Fraction(math.sqrt(x)) return float((x / a + a) / 2) def deci_sqrt(x: Fraction) -> float: ratio = Decimal(x.numerator) / Decimal(x.denominator) return float(ratio.sqrt()) ---------- assignee: rhettinger components: Library (Lib) messages: 406824 nosy: rhettinger, steven.daprano priority: normal severity: normal status: open title: Improve accuracy of stdev functions in statistics type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 03:28:45 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Nov 2021 08:28:45 +0000 Subject: [issue22067] time_test fails after strptime() In-Reply-To: <1406300706.97.0.297116152609.issue22067@psf.upfronthosting.co.za> Message-ID: <1637656125.42.0.646430850976.issue22067@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, it was 2.7-only issue. Thank you Irit for checking and closing outdated issues. ---------- resolution: works for me -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 03:35:54 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 08:35:54 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637656554.23.0.545831771885.issue45876@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:01:11 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Tue, 23 Nov 2021 09:01:11 +0000 Subject: [issue45877] Inconsistency in minimal supported version of Microsoft Visual Studio Message-ID: <1637658070.78.0.512777632516.issue45877@roundup.psfhosted.org> New submission from Oleg Iarygin : According to PCbuild/readme.txt: > Using this directory requires an installation of > Microsoft Visual Studio 2017 (MSVC 14.1) of any edition. However, Doc/using/windows.rst states that Visual Studio 2017 is not required and 2015 may be used instead: > The source tree contains a build solution and project files for Microsoft > Visual Studio 2015, which is the compiler used to build the official Python > releases. VS 2017 mention was introduced in GH-3418. So either PCbuild readme needs to relax its requirements back or windows.rst needs to be updated. ---------- assignee: docs at python components: Build, Documentation messages: 406826 nosy: arhadthedev, docs at python, steve.dower priority: normal severity: normal status: open title: Inconsistency in minimal supported version of Microsoft Visual Studio type: behavior versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:02:13 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 09:02:13 +0000 Subject: [issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library In-Reply-To: <1572444360.24.0.26930433052.issue38642@roundup.psfhosted.org> Message-ID: <1637658133.47.0.680576950319.issue38642@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:03:07 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 23 Nov 2021 09:03:07 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637272329.47.0.00758927636582.issue45839@roundup.psfhosted.org> Message-ID: <1637658187.68.0.0278695845153.issue45839@roundup.psfhosted.org> Ronald Oussoren added the comment: Could you check with "curl -k https://pypi.org/ >/dev/null" what certificate is used by PyPI? On my system I get (amongst other output): ... * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 * ALPN, server accepted to use h2 * Server certificate: * subject: CN=pypi.org * start date: Oct 22 18:55:44 2021 GMT * expire date: Nov 23 18:55:43 2022 GMT * subjectAltName: host "pypi.org" matched cert's "pypi.org" * issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA H2 2021 * SSL certificate verify ok. ... Note how the issuer is GlobalSign. If you see some other certificate authority, or get an error from curl due to the same certificate verification problem, you have something on the path between you and PyPI that intercepts the connection, such as a corporate proxy. Pip appears to have a way to override certificate verification, you'll have to (a) read pip's manual for that and (b) be *very* sure you know what's going on before you start trusting some other CA that's not in the global trust root used by pip and certify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:10:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 09:10:27 +0000 Subject: [issue29154] 5 failures in test_doctest: ModuleNotFoundError: No module named 'IPython' In-Reply-To: <1483544927.48.0.740005145144.issue29154@psf.upfronthosting.co.za> Message-ID: <1637658627.9.0.592540139028.issue29154@roundup.psfhosted.org> Irit Katriel added the comment: 3.6 is no longer maintained. I am closing this because there was no response to questions from the core devs. If you are having this problem in a current version (>=3.9) please open a new issue. ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:11:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 09:11:37 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637658697.1.0.235451007794.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27956 pull_request: https://github.com/python/cpython/pull/29720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:32:54 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Tue, 23 Nov 2021 09:32:54 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` Message-ID: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> New submission from Nikita Sobolev : Right now this test uses `try: ... except TypeError: ...` to ensure that mro is consistent. This has a flaw: code in `try` might not ever raise and this test would still pass. I will refactor it to use `self.assertRaises` to be 100% sure. ---------- components: Tests messages: 406829 nosy: sobolevn priority: normal severity: normal status: open title: Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:37:20 2021 From: report at bugs.python.org (Nikita Sobolev) Date: Tue, 23 Nov 2021 09:37:20 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` In-Reply-To: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> Message-ID: <1637660240.65.0.650022377253.issue45878@roundup.psfhosted.org> Change by Nikita Sobolev : ---------- keywords: +patch pull_requests: +27957 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29721 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:47:17 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 09:47:17 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637660837.66.0.611458091722.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: I'm not sure this is worth worrying about. We already have a very tight error bound on the result: if `x` is a (positive) fraction and `y` is the closest float to x, (and assuming IEEE 754 binary64, round-ties-to-even, no overflow or underflow, etc.) then `math.sqrt(y)` will be in error by strictly less than 1 ulp from the true value ?x, so we're already faithfully rounded. (And in particular, if the std. dev. is exactly representable as a float, this guarantees that we'll get that standard deviation exactly.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 04:53:40 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 23 Nov 2021 09:53:40 +0000 Subject: [issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations In-Reply-To: <1624890138.2.0.824780513801.issue44525@roundup.psfhosted.org> Message-ID: <1637661220.7.0.0288297775496.issue44525@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 135cabd328504e1648d17242b42b675cdbd0193b by Mark Shannon in branch 'main': bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be specialized (GH-29595) https://github.com/python/cpython/commit/135cabd328504e1648d17242b42b675cdbd0193b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 05:13:40 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 10:13:40 +0000 Subject: [issue45848] Pegen's nice error reporting crashes with non-UTF-8 files In-Reply-To: <1637343985.54.0.0156635573413.issue45848@roundup.psfhosted.org> Message-ID: <1637662420.04.0.934620377119.issue45848@roundup.psfhosted.org> Petr Viktorin added the comment: Wow! Thank you for the quick fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 05:28:03 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 10:28:03 +0000 Subject: [issue44445] Add `site-include` install scheme path in sysconfig In-Reply-To: <1623942208.43.0.621445516609.issue44445@roundup.psfhosted.org> Message-ID: <1637663283.31.0.235097608776.issue44445@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch nosy: +petr.viktorin nosy_count: 7.0 -> 8.0 pull_requests: +27958 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 05:32:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 10:32:06 +0000 Subject: [issue45191] Error.__traceback__.tb_lineno is wrong In-Reply-To: <1631595400.46.0.316069984941.issue45191@roundup.psfhosted.org> Message-ID: <1637663526.67.0.518308107104.issue45191@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 05:32:43 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Nov 2021 10:32:43 +0000 Subject: [issue45561] Run smelly.py and multissltests.py from $(srcdir) In-Reply-To: <1634852280.03.0.00103137600776.issue45561@roundup.psfhosted.org> Message-ID: <1637663563.78.0.0813350808953.issue45561@roundup.psfhosted.org> miss-islington added the comment: New changeset 327c764fa2a032e34dc268164c3c9c2f95b978c4 by Miss Islington (bot) in branch '3.10': bpo-45561: Run smelly.py tool from $(srcdir) (GH-29138) https://github.com/python/cpython/commit/327c764fa2a032e34dc268164c3c9c2f95b978c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 05:58:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 10:58:45 +0000 Subject: [issue45548] Update Modules/Setup In-Reply-To: <1634774328.21.0.335714426284.issue45548@roundup.psfhosted.org> Message-ID: <1637665125.79.0.449617410547.issue45548@roundup.psfhosted.org> Christian Heimes added the comment: Erlend and I have split off the pkg-config and autoconf work into bpo-45847, bpo-45573, and others. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 06:04:59 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 11:04:59 +0000 Subject: [issue38642] python3.7.3 seems to cause add-apt-repository to rejct or not find gi library In-Reply-To: <1572444360.24.0.26930433052.issue38642@roundup.psfhosted.org> Message-ID: <1637665499.13.0.60421858081.issue38642@roundup.psfhosted.org> Christian Heimes added the comment: "/usr/lib/python3/dist-packages" is not part of Python upstream source. It comes from Debian/Ubuntu-specific downstream patch. Please report Ubuntu bugs on the Ubuntu bug tracker https://bugs.launchpad.net/ ---------- resolution: -> third party stage: -> resolved status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 06:09:15 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 23 Nov 2021 11:09:15 +0000 Subject: [issue45191] Error.__traceback__.tb_lineno is wrong In-Reply-To: <1631595400.46.0.316069984941.issue45191@roundup.psfhosted.org> Message-ID: <1637665755.43.0.578080493393.issue45191@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 06:12:22 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Nov 2021 11:12:22 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` In-Reply-To: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> Message-ID: <1637665942.45.0.263616993198.issue45878@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +27959 pull_request: https://github.com/python/cpython/pull/29722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 06:12:27 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Nov 2021 11:12:27 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` In-Reply-To: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> Message-ID: <1637665947.29.0.21802153543.issue45878@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27960 pull_request: https://github.com/python/cpython/pull/29723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 06:12:26 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Nov 2021 11:12:26 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` In-Reply-To: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> Message-ID: <1637665946.31.0.570137364491.issue45878@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset b48ac6fe38b2fca9963b097c04cdecfc6083104e by Nikita Sobolev in branch 'main': bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721) https://github.com/python/cpython/commit/b48ac6fe38b2fca9963b097c04cdecfc6083104e ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 06:19:47 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Tue, 23 Nov 2021 11:19:47 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1637666387.14.0.238266585253.issue37705@roundup.psfhosted.org> Change by Oleg Iarygin : ---------- nosy: +arhadthedev nosy_count: 7.0 -> 8.0 pull_requests: +27961 pull_request: https://github.com/python/cpython/pull/29724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 06:59:57 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 11:59:57 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637668797.41.0.128270268669.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27962 pull_request: https://github.com/python/cpython/pull/29725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 07:05:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 12:05:11 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1637669111.86.0.388903959757.issue45614@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +27963 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29726 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 07:15:21 2021 From: report at bugs.python.org (Daniele Varrazzo) Date: Tue, 23 Nov 2021 12:15:21 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1637669721.38.0.795076918936.issue43112@roundup.psfhosted.org> Change by Daniele Varrazzo : ---------- nosy: +piro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 07:20:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 12:20:55 +0000 Subject: [issue32731] getpass.getuser() raises an unspecified exceptions (ImportError, OSError, etc) In-Reply-To: <1517421752.06.0.467229070634.issue32731@psf.upfronthosting.co.za> Message-ID: <1637670055.25.0.04284920469.issue32731@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 07:28:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 12:28:22 +0000 Subject: [issue40673] remove deprecated urllib.request.URLopener/FancyURLopener In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1637670502.74.0.339554578056.issue40673@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: urllib.request.URLopener raises different exceptions based on implementation detail -> remove deprecated urllib.request.URLopener/FancyURLopener versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 07:43:14 2021 From: report at bugs.python.org (Joran van Apeldoorn) Date: Tue, 23 Nov 2021 12:43:14 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters In-Reply-To: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> Message-ID: <1637671394.71.0.512987992717.issue45869@roundup.psfhosted.org> Joran van Apeldoorn added the comment: Hi, I was not suggesting that the documentation literally says they should be the same but it might be unexpected for users if ASCCI characters change properties depending on whether they are considered in a unicode or pure ASCII setting. The documentation says about re.A: "Make \w, \W, \b, \B, \d, \D, \s and \S perform ASCII-only matching instead of full Unicode matching. ". The problem might be that there is no clear notion of "ASCII-only matching". I assumed this mean matching ASCII characters only, i.e., the character classes are simply limited to codes below 128. About \s the documentation says: "Matches Unicode whitespace characters (which includes [ \t\n\r\f\v], and also many other characters, for example the non-breaking spaces mandated by typography rules in many languages). If the ASCII flag is used, only [ \t\n\r\f\v] is matched.". This heavily implies that there are non-ASCII characters in Unicode that might be considered spaces, but that the ASCII characters are [ \t\n\r\f\v], although again, not stated literally. There might be valid reasons to change the definition (even for ASCII characters) depending on re.A, but should it then not follow the unicode standard for white space in the unicode case? (which would coincide with the current ASCII case). There seem to be many different places where python is opinionated about what a space is, but not much consistency behind it. I am a bit worried about the undocumented nature of the precise definitions of the regex classes in general. How is a user supposed to know that the default behavior of \s, when no flag is passed, is to also match other ASCII characters then those mentioned for the ASCII case? In contrast to this, the \d class is directly defined as the unicode category [Nd]. It is likely to hard to change and to many things depend on it but the following definitions would make more sense to me, and hopefully others: - Character classes are defined as a set of unicode properties/categories, following the same definitions as elsewhere in python. - If re.A is passed, they are this same set but limited to codes below 128. After some digging in the code I traced the current definitions as follows: - For unicode Py_UNICODE_ISSPACE is called, which either does a lookup in the constant table _Py_ascii_whitespace or calls _PyUnicode_IsWhitespace for non ASCII characters. Both of these define a space as "Unicode characters having the bidirectional type 'WS', 'B' or 'S' or the category 'Zs'", i.e., this is simply the unicode string isspace() definition. - For ASCII Py_ISSPACE is called which does a lookup in _Py_ctype_table. It is unclear to me how this table was made. So sre just follows the other python definitions. In searching around i found issue #18236 , which also considers how the python definition differs from the unicode one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 08:11:11 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 13:11:11 +0000 Subject: [issue45126] [sqlite3] cleanup and harden Connection and Cursor __init__ In-Reply-To: <1631015162.08.0.638095834379.issue45126@roundup.psfhosted.org> Message-ID: <1637673071.38.0.0484925371905.issue45126@roundup.psfhosted.org> Petr Viktorin added the comment: I think it's a good idea, but without the "will be disallowed in Python 3.13" part -- we should tell people that it's discouraged, but there's not much point in removing it. But there's no consensus whether that's a good way to handle things, in general. So I'll leave it up to you. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 08:31:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Nov 2021 13:31:04 +0000 Subject: [issue40673] remove deprecated urllib.request.URLopener/FancyURLopener In-Reply-To: <1589837413.34.0.736050920356.issue40673@roundup.psfhosted.org> Message-ID: <1637674264.74.0.817994106967.issue40673@roundup.psfhosted.org> STINNER Victor added the comment: I tried but failed to remove urllib deprecated functions: see bpo-45084. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 08:43:51 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 13:43:51 +0000 Subject: [issue45783] test_freeze fails if a file is removed In-Reply-To: <1636626894.31.0.876516857977.issue45783@roundup.psfhosted.org> Message-ID: <1637675031.03.0.504341259526.issue45783@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 8ed1495ad900dd815ff8fb97926da5312aaa23f9 by Eric Snow in branch 'main': bpo-45783: Preserve file moves and deletions in the tests for the freeze tool. (GH-29527) https://github.com/python/cpython/commit/8ed1495ad900dd815ff8fb97926da5312aaa23f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 08:44:16 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 13:44:16 +0000 Subject: [issue45783] test_freeze fails if a file is removed In-Reply-To: <1636626894.31.0.876516857977.issue45783@roundup.psfhosted.org> Message-ID: <1637675056.06.0.901402953704.issue45783@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 08:49:04 2021 From: report at bugs.python.org (vladexl) Date: Tue, 23 Nov 2021 13:49:04 +0000 Subject: [issue45879] Access violation Message-ID: <1637675344.51.0.888057929265.issue45879@roundup.psfhosted.org> New submission from vladexl : It seems object.c hasn't taken into account possible nullptr: object.c: ...else if (Py_TYPE(v)->tp_as_number != NULL &&... It seems Py_TYPE(v) returns null StackTrace: > python310.dll!PyObject_IsTrue(_object * v=0x1d91e2d4) Line 1444 C python310.dll!_PyEval_EvalFrameDefault(_ts * tstate=0x1db76f50, _frame * f=0x1c064028, int throwflag=0) Line 3793 C [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46 C python310.dll!_PyEval_Vector(_ts * tstate=0x1db76f50, PyFrameConstructor * con=0x1bd91858, _object * locals=0x00000000, _object * const * args=0x1bdf86a8, unsigned int argcount=1, _object * kwnames=0x00000000) Line 5080 C python310.dll!_PyFunction_Vectorcall(_object * func=0x1bd91850, _object * const * stack=0x1bdf86a8, unsigned int nargsf=2147483649, _object * kwnames=0x00000000) Line 347 C [Inline Frame] python310.dll!_PyObject_VectorcallTstate(_ts *) Line 114 C python310.dll!PyObject_Vectorcall(_object * callable=0x1bd91850, _object * const * args, unsigned int nargsf=2147483649, _object * kwnames=0x00000000) Line 123 C python310.dll!call_function(_ts * tstate=0x1db76f50, PyTraceInfo * trace_info=0x1bf3f7a0, _object * * * pp_stack=0x1bf3f774, int oparg=1, _object * kwnames=0x00000000) Line 5888 C python310.dll!_PyEval_EvalFrameDefault(_ts * tstate=0x1db76f50, _frame * f=0x1bdf8568, int throwflag=0) Line 4222 C [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46 C python310.dll!_PyEval_Vector(_ts * tstate=0x1db76f50, PyFrameConstructor * con=0x1bd918a0, _object * locals=0x00000000, _object * const * args=0x1bde5334, unsigned int argcount=2, _object * kwnames=0x00000000) Line 5080 C python310.dll!_PyFunction_Vectorcall(_object * func=0x1bd91898, _object * const * stack=0x1bde5334, unsigned int nargsf=2, _object * kwnames=0x00000000) Line 347 C python310.dll!PyVectorcall_Call(_object * callable=0x1bd91898, _object * tuple=0x1bde5328, _object * kwargs=0x1ef3d618) Line 272 C python310.dll!_PyObject_Call(_ts * tstate=0x1db76f50, _object * callable=0x1bd91898, _object * args=0x1bde5328, _object * kwargs=0x1ef3d618) Line 290 C [Inline Frame] python310.dll!PyObject_Call(_object *) Line 317 C python310.dll!do_call_core(_ts * tstate=0x1db76f50, PyTraceInfo * trace_info=0x1bf3f93c, _object * func=0x1bd91898, _object * callargs=0x1bde5328, _object * kwdict=0x1ef3d618) Line 5940 C python310.dll!_PyEval_EvalFrameDefault(_ts * tstate=0x1db76f50, _frame * f=0x1bd7ab28, int throwflag=0) Line 4286 C [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46 C python310.dll!_PyEval_Vector(_ts * tstate=0x1db76f50, PyFrameConstructor * con=0x1bdef930, _object * locals=0x00000000, _object * const * args=0x1bdfa164, unsigned int argcount=1, _object * kwnames=0x00000000) Line 5080 C python310.dll!_PyFunction_Vectorcall(_object * func=0x1bdef928, _object * const * stack=0x1bdfa164, unsigned int nargsf=2147483649, _object * kwnames=0x00000000) Line 347 C [Inline Frame] python310.dll!_PyObject_VectorcallTstate(_ts *) Line 114 C python310.dll!PyObject_Vectorcall(_object * callable=0x1bdef928, _object * const * args, unsigned int nargsf=2147483649, _object * kwnames=0x00000000) Line 123 C python310.dll!call_function(_ts * tstate=0x1db76f50, PyTraceInfo * trace_info=0x1bf3fa94, _object * * * pp_stack=0x1bf3fa70, int oparg=1, _object * kwnames=0x00000000) Line 5888 C python310.dll!_PyEval_EvalFrameDefault(_ts * tstate=0x1db76f50, _frame * f=0x1bdfa028, int throwflag=0) Line 4207 C [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46 C python310.dll!_PyEval_Vector(_ts * tstate=0x1db76f50, PyFrameConstructor * con=0x1bdefa98, _object * locals=0x00000000, _object * const * args=0x1bc9db04, unsigned int argcount=1, _object * kwnames=0x00000000) Line 5080 C python310.dll!_PyFunction_Vectorcall(_object * func=0x1bdefa90, _object * const * stack=0x1bc9db04, unsigned int nargsf=2147483649, _object * kwnames=0x00000000) Line 347 C [Inline Frame] python310.dll!_PyObject_VectorcallTstate(_ts *) Line 114 C python310.dll!PyObject_Vectorcall(_object * callable=0x1bdefa90, _object * const * args, unsigned int nargsf=2147483649, _object * kwnames=0x00000000) Line 123 C python310.dll!call_function(_ts * tstate=0x1db76f50, PyTraceInfo * trace_info=0x1bf3fbec, _object * * * pp_stack=0x1bf3fbc8, int oparg=1, _object * kwnames=0x00000000) Line 5888 C python310.dll!_PyEval_EvalFrameDefault(_ts * tstate=0x1db76f50, _frame * f=0x1bc9d9c8, int throwflag=0) Line 4207 C [Inline Frame] python310.dll!_PyEval_EvalFrame(_ts *) Line 46 C python310.dll!_PyEval_Vector(_ts * tstate=0x1db76f50, PyFrameConstructor * con=0x1bdef978, _object * locals=0x00000000, _object * const * args=0x1bf3fce8, unsigned int argcount=1, _object * kwnames=0x00000000) Line 5080 C python310.dll!_PyFunction_Vectorcall(_object * func=0x1bdef970, _object * const * stack=0x1bf3fce8, unsigned int nargsf=1, _object * kwnames=0x00000000) Line 347 C python310.dll!_PyObject_VectorcallTstate(_ts * tstate=0x1db76f50, _object * callable=0x1bdef970, _object * const * args=0x1bf3fce8, unsigned int nargsf=1, _object * kwnames=0x00000000) Line 115 C python310.dll!method_vectorcall(_object * method=0x1e8f56e8, _object * const * args=0x087b41e4, unsigned int nargsf=0, _object * kwnames=0x00000000) Line 61 C python310.dll!PyVectorcall_Call(_object * callable=0x1e8f56e8, _object * tuple=0x087b41d8, _object * kwargs=0x00000000) Line 272 C python310.dll!_PyObject_Call(_ts * tstate=0x1db76f50, _object * callable=0x1e8f56e8, _object * args=0x087b41d8, _object * kwargs=0x00000000) Line 290 C [Inline Frame] python310.dll!PyObject_Call(_object * callable, _object * args=0x087b41d8, _object * kwargs) Line 317 C python310.dll!thread_run(void * boot_raw=0x1bdf12d8) Line 1090 C python310.dll!bootstrap(void * call=0x1775b860) Line 183 C ucrtbase.dll!thread_start() Unknown kernel32.dll!@BaseThreadInitThunk at 12() Unknown ntdll.dll!__RtlUserThreadStart() Unknown ntdll.dll!__RtlUserThreadStart at 8() Unknown ---------- messages: 406841 nosy: vladexl priority: normal severity: normal status: open title: Access violation type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 08:56:56 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Tue, 23 Nov 2021 13:56:56 +0000 Subject: [issue45869] Unicode and acii regular expressions do not agree on ascii space characters In-Reply-To: <1637587679.33.0.798190519421.issue45869@roundup.psfhosted.org> Message-ID: <1637675816.37.0.707616186575.issue45869@roundup.psfhosted.org> Change by Oleg Iarygin : ---------- nosy: +arhadthedev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 09:21:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 14:21:11 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637677271.56.0.994498737524.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27964 pull_request: https://github.com/python/cpython/pull/29727 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 09:28:43 2021 From: report at bugs.python.org (Alex Waygood) Date: Tue, 23 Nov 2021 14:28:43 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` In-Reply-To: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> Message-ID: <1637677723.78.0.499204483109.issue45878@roundup.psfhosted.org> Change by Alex Waygood : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 09:41:06 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 14:41:06 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637678466.49.0.623417590712.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: We are down to 9 missing modules: readline _curses _curses_panel _dbm _ctypes _multiprocessing _posixshmem _tkinter _uuid ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 09:43:48 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 14:43:48 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637678628.86.0.377478224444.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: One thought: would the deci_sqrt approach help with value ranges where the values are well within float limits, but the squares of the values are not? E.g., on my machine, I currently get errors for both of the following: >>> xs = [random.normalvariate(0.0, 1e200) for _ in range(10**6)] >>> statistics.stdev(xs) >>> xs = [random.normalvariate(0.0, 1e-200) for _ in range(10**6)] >>> statistics.stdev(xs) It's hard to imagine that there are too many use-cases for values of this size, but it still feels a bit odd to be constrained to only half of the dynamic range of float. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 09:54:35 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 23 Nov 2021 14:54:35 +0000 Subject: [issue45879] Access violation In-Reply-To: <1637675344.51.0.888057929265.issue45879@roundup.psfhosted.org> Message-ID: <1637679275.69.0.877945832461.issue45879@roundup.psfhosted.org> Eric V. Smith added the comment: Please provide the code you used to trigger this error, so that we can reproduce it. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:04:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Nov 2021 15:04:48 +0000 Subject: [issue45490] [meta][C API] Avoid C macro pitfalls and usage of static inline functions In-Reply-To: <1634319805.82.0.902360778503.issue45490@roundup.psfhosted.org> Message-ID: <1637679888.12.0.664847887546.issue45490@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +27965 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:20:00 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 23 Nov 2021 15:20:00 +0000 Subject: [issue45786] Avoid allocating when exiting frame; it may be unsafe. In-Reply-To: <1636643049.78.0.0321804916993.issue45786@roundup.psfhosted.org> Message-ID: <1637680800.48.0.45827486511.issue45786@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +27966 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:25:20 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 15:25:20 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637681120.82.0.0860629216346.issue45775@roundup.psfhosted.org> Petr Viktorin added the comment: > YUV is a common color encoding system. It's used by the JPEG image format and MPEG video format for example. As far as I understand it, the YUV/RGB conversion used by JPEG is not the same as the one used by MPEG, and neither of those is the Rec 709 YUV proposed here. YUV is used in video production and photography. If you need to work with it, you most likely need some kind of precise color matching. If colorsys implements the wrong one *for you* (even if it's the most commonly used one, and what HDTV uses), then the stdlib has failed you. Meanwhile, RGB/HLS is used by Web designers writing CSS, GUI authors giving you a big green button to click, or color pickers for your avatar's hair. They're designing for uncalibrated monitors. *That* is the target audience for colorsys. The image libraries these people use to read JPGs invariably convert to RGB and throw away any precise color information, which is meaningless on uncalibrated monitors. I cannot see a use case for YUV in colorsys that doesn't also require a more complex image processing library. It's that library that should provide the necessary colorspace conversions, depending on if it's dealing with JPEG or MPEG or HDTV. But please point out my mistakes and clear my doubts! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:38:11 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 23 Nov 2021 15:38:11 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1637681891.35.0.533716956176.issue45703@roundup.psfhosted.org> miss-islington added the comment: New changeset ae1965ccb4b1fad63fab40fe8805d1b8247668d3 by Miro Hron?ok in branch 'main': bpo-45703: Invalidate _NamespacePath cache on importlib.invalidate_ca? (GH-29384) https://github.com/python/cpython/commit/ae1965ccb4b1fad63fab40fe8805d1b8247668d3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:44:04 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 15:44:04 +0000 Subject: [issue34451] docs: tutorial/introduction doesn't mention toggle of prompts In-Reply-To: <1534877418.64.0.56676864532.issue34451@psf.upfronthosting.co.za> Message-ID: <1637682244.76.0.469115310799.issue34451@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed status: -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:46:54 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 15:46:54 +0000 Subject: [issue45035] sysconfig's posix_home scheme has different platlib value to distutils's unix_home In-Reply-To: <1630133002.18.0.922476282003.issue45035@roundup.psfhosted.org> Message-ID: <1637682414.34.0.185724153693.issue45035@roundup.psfhosted.org> Petr Viktorin added the comment: Yes. This is a minor bug in the deprecated distutils module. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:50:13 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Nov 2021 15:50:13 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1637682613.39.0.390138251905.issue45703@roundup.psfhosted.org> Petr Viktorin added the comment: Now, is this a bugfix, or a new feature? I lean toward calling it a bugfix and backporting to earlier versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:52:58 2021 From: report at bugs.python.org (Xinhang Xu) Date: Tue, 23 Nov 2021 15:52:58 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) Message-ID: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> New submission from Xinhang Xu : Hello. I'm working on a compute-bound project recently, so I tested several Python versions on my PC (Windows 10 64-bit), about Python's performance on operating Int object. All Python binaries are official distributions. Testcase #1 (simple xor op) Source: import cProfile as profile profile.run('for _ in range(500000000): 5 ^ 6') The given result: C:\Users\surface\Desktop\PythonTest>python-3.9.9-embed-amd64\python C:\Users\surface\python_test.py 3 function calls in 24.398 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 24.398 24.398 24.398 24.398 :1() 1 0.000 0.000 24.398 24.398 {built-in method builtins.exec} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} C:\Users\surface\Desktop\PythonTest>python-3.10.0-embed-amd64\python C:\Users\surface\python_test.py 3 function calls in 27.941 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 27.941 27.941 27.941 27.941 :1() 1 0.000 0.000 27.941 27.941 {built-in method builtins.exec} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} C:\Users\surface\Desktop\PythonTest>python-3.11.0a2-embed-amd64\python C:\Users\surface\python_test.py 3 function calls in 42.209 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 42.209 42.209 42.209 42.209 :1() 1 0.000 0.000 42.209 42.209 {built-in method builtins.exec} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} Testcase #2 (simple add op) Source: import cProfile as profile profile.run('for _ in range(500000000): 5 + 6') The given result: C:\Users\surface\Desktop\PythonTest>python-3.9.9-embed-amd64\python C:\Users\surface\python_test.py 3 function calls in 24.599 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 24.599 24.599 24.599 24.599 :1() 1 0.000 0.000 24.599 24.599 {built-in method builtins.exec} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} C:\Users\surface\Desktop\PythonTest>python-3.10.0-embed-amd64\python C:\Users\surface\python_test.py 3 function calls in 27.414 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 27.414 27.414 27.414 27.414 :1() 1 0.000 0.000 27.414 27.414 {built-in method builtins.exec} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} C:\Users\surface\Desktop\PythonTest>python-3.11.0a2-embed-amd64\python C:\Users\surface\python_test.py 3 function calls in 43.675 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 43.675 43.675 43.675 43.675 :1() 1 0.000 0.000 43.675 43.675 {built-in method builtins.exec} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} As you can see, Python 3.11 costs *much more* time to execute Int object operator. I have also tested the same cases on another Windows PC, the result shows the same. Is it a common thing? What's the reason for this problem? Thanks. ---------- messages: 406849 nosy: xuxinhang priority: normal severity: normal status: open title: Performance regression of Int object operators. (Python 3.11) type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:55:50 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 15:55:50 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637682950.39.0.627386549235.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: > I'm not sure this is worth worrying about ... Instead of writing simple, mostly accurate code with math.fsum(), these functions have already applied labor intensive measures to get an exact mean and exact sum of square differences expressed in fractions. Then at the final step before the square root, it prematurely rounds to a float. This is easy to fix and has a single step cost comparable to that already paid for each input datum. In a sports analogy, we've run the ball almost the full length of the field and then failed to put the ball over the goal line. Part of the module's value proposition is that it strives to be more accurate than obvious implementations. The mean, variance, and pvariance function are correctly rounded. In this regard, the stdev and pstdev functions are deficient, but they could easily be made to be almost always correctly rounded. > One thought: would the deci_sqrt approach help with value ranges > where the values are well within float limits, but the squares > of the values are not? Yes, the Emin and Emax for the default context is already almost big enough: Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999, Emax=999999, capitals=1, clamp=0, flags=[], traps=[InvalidOperation, DivisionByZero, Overflow]) We could bump that up to fully envelop operations on the sum of squares: Context(Emin=-9_999_999, Emax=9_999_999, prec=50) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 10:59:56 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 23 Nov 2021 15:59:56 +0000 Subject: [issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache In-Reply-To: <1635938516.86.0.42328943914.issue45703@roundup.psfhosted.org> Message-ID: <1637683196.4.0.661729782592.issue45703@roundup.psfhosted.org> Miro Hron?ok added the comment: I consider it a bugfix. I don't expect users to rely on the previous behavior and be surprised by the new, but yet I know https://xkcd.com/1172/ very well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:22:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 16:22:59 +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: <1637684579.32.0.884981135255.issue41742@roundup.psfhosted.org> Irit Katriel added the comment: I agree with Terry, it's pretty clear that this is a list of the exceptions that are defined in the module. Indeed many builtin exceptions can be raised from any piece of code (for example, you can run out of memory in any module). ---------- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:28:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 16:28:33 +0000 Subject: [issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes In-Reply-To: <1610180126.52.0.315552258683.issue42872@roundup.psfhosted.org> Message-ID: <1637684913.39.0.259080592218.issue42872@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Improper NotADirectoryError when opening a file in a fake directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:37:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 16:37:45 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken Message-ID: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> New submission from Christian Heimes : Cross compiling is an approach to compile a program for a different CPU architecture and platform, e.g. compile for an ARM64 (aarch64) or WASM on a x86_64 build system. Python configure script, Makefile, and setup.py have multiple references to cross compiling. However I could not find any documentation in the devguide or Python docs how to cross compile. We also lack CI (buildbot) to test cross compiling. This lack of awareness and testing leads to breakage of the feature. For example the design of Programs/_freeze_module in main (3.11-dev) is incompatible with cross compiling. I kinda got cross compiling working with 3.10, but only with some additional hacks and patches. I also ran into other problems like _PYTHON_HOST_PLATFORM env var is not automatically forwarded to setup.py. The helper functions add_multiarch_paths() and add_cross_compiling_paths() break builds for me, too. Cross compiling only works when the methods are commented out. ---------- assignee: docs at python components: Build, Cross-Build, Documentation, Tests messages: 406853 nosy: Alex.Willmer, brett.cannon, christian.heimes, docs at python priority: normal severity: normal status: open title: Cross compiling on Linux is untested, undocumented, and broken versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:46:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Nov 2021 16:46:20 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637685980.13.0.142392488377.issue45775@roundup.psfhosted.org> STINNER Victor added the comment: Ok, let's reject this feature and restrict colorsys to simple color spaces which don't require profiles. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:47:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Nov 2021 16:47:14 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637686034.89.0.266685111348.issue45775@roundup.psfhosted.org> STINNER Victor added the comment: You can write your own module on PyPI with more advanced features if you want to extend colorsys ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:56:28 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Nov 2021 16:56:28 +0000 Subject: [issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds In-Reply-To: <1637607109.55.0.706004441577.issue45873@roundup.psfhosted.org> Message-ID: <1637686588.58.0.00610999342468.issue45873@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 5be98e57b3c3b36d1a1176b49c73b8822c6380e7 by Guido van Rossum in branch 'main': bpo-45873: Get rid of bootstrap_python (#29717) https://github.com/python/cpython/commit/5be98e57b3c3b36d1a1176b49c73b8822c6380e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:56:28 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Nov 2021 16:56:28 +0000 Subject: [issue45850] Port deep-freeze to Windows In-Reply-To: <1637604596.84.0.478261244979.issue45850@roundup.psfhosted.org> Message-ID: <1637686588.5.0.555315784008.issue45850@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 5be98e57b3c3b36d1a1176b49c73b8822c6380e7 by Guido van Rossum in branch 'main': bpo-45873: Get rid of bootstrap_python (#29717) https://github.com/python/cpython/commit/5be98e57b3c3b36d1a1176b49c73b8822c6380e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:57:20 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Tue, 23 Nov 2021 16:57:20 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1637686640.84.0.497695186546.issue43112@roundup.psfhosted.org> Tzu-ping Chung added the comment: Can anyone problem examples that it?s not an option to continue using the ?technically incorrect? `-gnu` suffix on 3.9 and 3.10? From what I understand, te suffix technically works (as in the module will load correctly), it just fails to distinguish the ABI in the name. If that?s correct, I feel ?being able to distinguish between modules built against musl and glibc? should be a feature request and only implemented for 3.11+, while versions 3.10 and prior continue to use `-gnu`. This will also provide a simpler way out of the wheel compatibility problem; projects can distribute different wheels for 3.10 (or lower) and 3.11 (or higher), while the former wheel continues to contain `-gnu`-suffixed modules, and only contain `-musl`-suffixed ones in the latter. ---------- nosy: +uranusjr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 11:57:39 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 16:57:39 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637686659.01.0.740364359921.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: > we've run the ball almost the full length of the field and then failed to put the ball over the goal line But if we only go from "faithfully rounded" to "almost always correctly rounded", it seems to me that we're still a couple of millimetres away from that goal line. It wouldn't be hard to go for _always_ correctly rounded and actually get it over. > Yes, the Emin and Emax for the default context is already almost big enough I'm confused: big enough for what? I was thinking of the use-case where the inputs are all floats, in which case an Emax of 999 and an Emin of -999 would already be more than big enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:00:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 17:00:58 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1637686858.0.0.339798966263.issue45881@roundup.psfhosted.org> Christian Heimes added the comment: I have uploaded a reproducer at https://github.com/tiran/cpython_builddep/compare/cross-aarch64 $ podman run -ti --rm -v $(pwd):/cpython:Z quay.io/tiran/cpythonbuild:ubuntu-impish-aarch64 ... aarch64-linux-gnu-gcc -fPIC -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/cpython/Include/internal -I/usr/include/x86_64-linux-gnu -I. -IObjects -IPython -I/usr/include -I/usr/include/x86_64-linux-gnu -I/usr/local/include -I/cpython/Include -I/cpython/builddep/ubuntu-impish-x86_64 -c /cpython/Modules/_ctypes/_ctypes.c -o build/temp.linux-aarch64-3.10/cpython/Modules/_ctypes/_ctypes.o -DPy_BUILD_CORE_MODULE -DHAVE_FFI_PREP_CIF_VAR=1 -DHAVE_FFI_PREP_CLOSURE_LOC=1 -DHAVE_FFI_CLOSURE_ALLOC=1 In file included from /usr/aarch64-linux-gnu/include/features.h:508, from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33, from /usr/aarch64-linux-gnu/include/limits.h:26, from /usr/lib/gcc-cross/aarch64-linux-gnu/11/include/limits.h:203, from /usr/lib/gcc-cross/aarch64-linux-gnu/11/include/syslimits.h:7, from /usr/lib/gcc-cross/aarch64-linux-gnu/11/include/limits.h:34, from /cpython/Include/Python.h:11, from /cpython/Modules/zlibmodule.c:8: /usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: gnu/stubs-32.h: No such file or directory 7 | # include ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:01:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 17:01:18 +0000 Subject: [issue29739] zipfile raises wrong exception for some incorrect passwords In-Reply-To: <1488833299.28.0.469862145344.issue29739@psf.upfronthosting.co.za> Message-ID: <1637686878.27.0.214972170083.issue29739@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:03:03 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 17:03:03 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) In-Reply-To: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> Message-ID: <1637686983.78.0.310632385261.issue45880@roundup.psfhosted.org> Raymond Hettinger added the comment: Here are timings from stock macOS builds from python.org: $ python3.10 --version Python 3.10.0 $ python3.10 -m timeit -r 11 -s 'x=5' 'x^3' # Xor with variable 5000000 loops, best of 11: 41.4 nsec per loop $ python3.10 -m timeit -r 11 -s 'x=5' 'x+3' # Add with variable 10000000 loops, best of 11: 22.7 nsec per loop $ python3.10 -m timeit -r 11 -s '3 + 5' # Constant folded 50000000 loops, best of 11: 7.15 nsec per loop $ python3.11 --version Python 3.11.0a2 $ python3.11 -m timeit -r 11 -s 'x=5' 'x^3' 20000000 loops, best of 11: 19.2 nsec per loop $ python3.10 -m timeit -r 11 -s 'x=5' 'x+3' 10000000 loops, best of 11: 22.5 nsec per loop $ python3.10 -m timeit -r 11 -s '3 + 5' 50000000 loops, best of 11: 7.16 nsec per loop ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:04:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 17:04:47 +0000 Subject: [issue2786] Names in function call exception should have class names, if they're methods In-Reply-To: <1210191958.85.0.412869826908.issue2786@psf.upfronthosting.co.za> Message-ID: <1637687087.54.0.511382681653.issue2786@roundup.psfhosted.org> Irit Katriel added the comment: This seems to have been fixed by now, on 3.11 I get this: >>> class foo: ... def __init__(self, bar): ... pass ... >>> foo() Traceback (most recent call last): File "", line 1, in TypeError: foo.__init__() missing 1 required positional argument: 'bar' ---------- nosy: +iritkatriel resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:07:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 17:07:03 +0000 Subject: [issue2516] Instance methods are misreporting the number of arguments In-Reply-To: <1206915815.51.0.55915619351.issue2516@psf.upfronthosting.co.za> Message-ID: <1637687223.61.0.316886102086.issue2516@roundup.psfhosted.org> Irit Katriel added the comment: This seems to have been fixed by now, on 3.11 I get this: >>> class A: ... def foo(self, x): pass ... >>> A().foo() Traceback (most recent call last): File "", line 1, in TypeError: A.foo() missing 1 required positional argument: 'x' ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:07:15 2021 From: report at bugs.python.org (Thomas Stolarski) Date: Tue, 23 Nov 2021 17:07:15 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637687235.83.0.689833729706.issue45775@roundup.psfhosted.org> Thomas Stolarski added the comment: I figured this would probably be the case, but since YIQ also requires a profile (and the FCC one it implements is pretty weird for digital work), I thought I'd give it a shot anyway. Would it be worth moving the test/formatting changes over to a different ticket or should we just leave them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:20:19 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 17:20:19 +0000 Subject: [issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds In-Reply-To: <1637607109.55.0.706004441577.issue45873@roundup.psfhosted.org> Message-ID: <1637688019.1.0.149122634218.issue45873@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes nosy_count: 1.0 -> 2.0 pull_requests: +27967 pull_request: https://github.com/python/cpython/pull/29730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:28:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 17:28:26 +0000 Subject: [issue41396] pystate.c:_PyCrossInterpreterData_Release() does not clear py exception on error In-Reply-To: <1595690825.61.0.00830808011082.issue41396@roundup.psfhosted.org> Message-ID: <1637688506.87.0.986474862519.issue41396@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +eric.snow, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:33:12 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 23 Nov 2021 17:33:12 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637688792.38.0.290129563797.issue45775@roundup.psfhosted.org> ?ric Araujo added the comment: I think that there?s no need to change the existing tests. The CPython project prefers to not do tiny improvements for their own sake. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:33:43 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 17:33:43 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637688823.02.0.220992157747.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: > It wouldn't be hard to go for _always_ correctly rounded > and actually get it over. Yes, that would be the right thing to do. Does the technique you had in mind involve testing 1 ulp up or down to see whether its square is closer to the input? > an Emax of 999 and an Emin of -999 would already be > more than big enough. Right. In haste, I confused max_exp=1024 with max_10_exp=308. Am still thinking that the precision needs to be bumped up a bit the 28 place default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:33:56 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 23 Nov 2021 17:33:56 +0000 Subject: [issue45775] Implementation of colorsys.rgb_to_yuv and vice versa In-Reply-To: <1636502804.95.0.337411519987.issue45775@roundup.psfhosted.org> Message-ID: <1637688836.21.0.351259304025.issue45775@roundup.psfhosted.org> ?ric Araujo added the comment: Thank you for suggesting the improvement and working on a PR nonetheless! Hope the experience can be useful for other tickets in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:42:17 2021 From: report at bugs.python.org (Gaige Paulsen) Date: Tue, 23 Nov 2021 17:42:17 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637689337.81.0.840470217783.issue39026@roundup.psfhosted.org> Gaige Paulsen added the comment: Sorry about the delay. Finally fixed my workflow for building from scratch. Result: I can confirm that the compilation problem is resolved with this change (and was failing with the main branch prior to the change). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:42:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 17:42:44 +0000 Subject: [issue27582] Mispositioned SyntaxError caret for unknown code points In-Reply-To: <1469102054.52.0.839726574023.issue27582@psf.upfronthosting.co.za> Message-ID: <1637689364.2.0.357144840119.issue27582@roundup.psfhosted.org> Irit Katriel added the comment: This seems to have been fixed by now, I get this on 3.11: >>> varname = ?d?a?t?apoint File "", line 1 varname = ?d?a?t?apoint ^ SyntaxError: invalid character '?' (U+201C) >>> varname = ?d?a?t?apoint.evidence File "", line 1 varname = ?d?a?t?apoint.evidence ^ SyntaxError: invalid character '?' (U+201C) >>> varname = ?d?a?t?apoint[evidence] File "", line 1 varname = ?d?a?t?apoint[evidence] ^ SyntaxError: invalid character '?' (U+201C) >>> varname = ?d?a?t?apoint(evidence) File "", line 1 varname = ?d?a?t?apoint(evidence) ^ SyntaxError: invalid character '?' (U+201C) ---------- nosy: +iritkatriel resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:47:27 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 17:47:27 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637689647.84.0.163294872354.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: > Does the technique you had in mind involve testing 1 ulp up or down to see whether its square is closer to the input? Kinda sorta. Below is some code: it's essentially just pure integer operations, with a last minute conversion to float (implicit in the division in the case of the second branch). And it would need to be better tested, documented, and double-checked to be viable. def isqrt_rto(n): """ Square root of n, rounded to the nearest integer using round-to-odd. """ a = math.isqrt(n) return a | (a*a != n) def isqrt_frac_rto(n, m): """ Square root of n/m, rounded to the nearest integer using round-to-odd. """ quotient, remainder = divmod(isqrt_rto(4*n*m), 2*m) return quotient | bool(remainder) def sqrt_frac(n, m): """ Square root of n/m as a float, correctly rounded. """ quantum = (n.bit_length() - m.bit_length() - 1) // 2 - 54 if quantum >= 0: return float(isqrt_frac_rto(n, m << 2 * quantum) << quantum) else: return isqrt_frac_rto(n << -2 * quantum, m) / (1 << -quantum) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:47:37 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Tue, 23 Nov 2021 17:47:37 +0000 Subject: [issue45561] Run smelly.py and multissltests.py from $(srcdir) In-Reply-To: <1634852280.03.0.00103137600776.issue45561@roundup.psfhosted.org> Message-ID: <1637689657.55.0.744585201502.issue45561@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:49:57 2021 From: report at bugs.python.org (Zachary Ware) Date: Tue, 23 Nov 2021 17:49:57 +0000 Subject: [issue45616] Python Launcher Matches 3.10 instead of 3.1 In-Reply-To: <1635270674.96.0.337719561337.issue45616@roundup.psfhosted.org> Message-ID: <1637689797.16.0.428131028272.issue45616@roundup.psfhosted.org> Change by Zachary Ware : ---------- keywords: +patch pull_requests: +27968 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 12:59:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Nov 2021 17:59:08 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637690348.59.0.826934476194.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4ae26b9c1d0c33e3db92c6f305293f9240dea358 by Victor Stinner in branch 'main': bpo-39026: Fix Python.h when building with Xcode (GH-29488) https://github.com/python/cpython/commit/4ae26b9c1d0c33e3db92c6f305293f9240dea358 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 13:02:03 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Nov 2021 18:02:03 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637690523.09.0.161712353902.issue39026@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +27969 pull_request: https://github.com/python/cpython/pull/29732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 13:01:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 18:01:56 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1637690516.56.0.499132085265.issue33381@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: -> docs at python components: +Documentation, Library (Lib) keywords: +easy, newcomer friendly nosy: +docs at python title: Incorrect documentation for strftime()/strptime() format code %f -> [doc] Incorrect documentation for strftime()/strptime() format code %f versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 13:05:41 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 23 Nov 2021 18:05:41 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637690741.76.0.673464047036.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: Gaige Paulsen: "Result: I can confirm that the compilation problem is resolved with this change (and was failing with the main branch prior to the change)." Thank you for the confirmation. I merged my change and I'm backporting it to Python 3.9 and 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 13:18:02 2021 From: report at bugs.python.org (Peter Wurmsdobler) Date: Tue, 23 Nov 2021 18:18:02 +0000 Subject: [issue45882] mailbox fails to read message from mbox Message-ID: <1637691482.36.0.788226953049.issue45882@roundup.psfhosted.org> New submission from Peter Wurmsdobler : When using mailbox to convert mbox files to maildir, I have noticed that it cannot handle messages in the mbox file that start with two subsequent `From` lines in the header like: ``` >From - Fri Feb 20 09:46:18 1998 >From namel at company.com Wed Feb 18 18:38:38 1998 ``` A new maildir message will be created, but none of fields following the two header lines such as `Date` etc. will be parsed; the result is a message with header and body inside the message. ---------- components: Library (Lib) messages: 406873 nosy: peter4 priority: normal severity: normal status: open title: mailbox fails to read message from mbox type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 13:21:38 2021 From: report at bugs.python.org (Gaige Paulsen) Date: Tue, 23 Nov 2021 18:21:38 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637691698.65.0.891164202841.issue39026@roundup.psfhosted.org> Gaige Paulsen added the comment: I can test the backports if you like. In that case, let me know when the backports are done, I should be able to test those rapidly, now that I have my build environment working for building from source. Thanks again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 13:25:47 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 18:25:47 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637691947.96.0.965933231462.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: Here's the float-and-Fraction-based code that I'm using to compare the integer-based code against: def sqrt_frac2(n, m): """ Square root of n/m as a float, correctly rounded. """ f = fractions.Fraction(n, m) # First approximation. x = math.sqrt(n / m) # Use the approximation to find a pair of floats bracketing the actual sqrt if fractions.Fraction(x)**2 >= f: x_lo, x_hi = math.nextafter(x, 0.0), x else: x_lo, x_hi = x, math.nextafter(x, math.inf) # Check the bracketing. If math.sqrt is correctly rounded (as it will be on a # typical machine), then the assert can't fail. But we can't rely on math.sqrt being # correctly rounded in general, so would need some fallback. fx_lo, fx_hi = fractions.Fraction(x_lo), fractions.Fraction(x_hi) assert fx_lo**2 <= f <= fx_hi**2 # Compare true square root with the value halfway between the two floats. mid = (fx_lo + fx_hi) / 2 if mid**2 < f: return x_hi elif mid**2 > f: return x_lo else: # Tricky case: mid**2 == f, so we need to choose the "even" endpoint. # Cheap trick: the addition in 0.5 * (x_lo + x_hi) will round to even. return 0.5 * (x_lo + x_hi) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 14:07:56 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 23 Nov 2021 19:07:56 +0000 Subject: [issue45883] reuse_address mistakenly removed from loop.create_server Message-ID: <1637694476.84.0.389312565282.issue45883@roundup.psfhosted.org> New submission from Jim Crist-Harif : In https://bugs.python.org/issue45129 the deprecated `reuse_address` parameter to `create_datagram_endpoint` was removed. This PR mistakenly removed this parameter from `create_server` as well (where it wasn't deprecated). ---------- components: asyncio messages: 406876 nosy: asvetlov, jcristharif, yselivanov priority: normal severity: normal status: open title: reuse_address mistakenly removed from loop.create_server type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 14:10:06 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Tue, 23 Nov 2021 19:10:06 +0000 Subject: [issue45883] reuse_address mistakenly removed from loop.create_server In-Reply-To: <1637694476.84.0.389312565282.issue45883@roundup.psfhosted.org> Message-ID: <1637694606.24.0.429341770789.issue45883@roundup.psfhosted.org> Change by Jim Crist-Harif : ---------- keywords: +patch pull_requests: +27970 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 14:11:12 2021 From: report at bugs.python.org (Jon Oxtoby) Date: Tue, 23 Nov 2021 19:11:12 +0000 Subject: [issue45884] datetime.strptime incorrectly handling hours and minutes with bad format string Message-ID: <1637694672.86.0.81735779429.issue45884@roundup.psfhosted.org> New submission from Jon Oxtoby : Running datetime.strptime against a string containing year, month, day but with a formatter including %H causes a two-digit day to be split across the day and hour fields of the datetime: datetime.datetime.strptime('20140812', '%Y%m%d%H') returns: datetime.datetime(2014, 8, 1, 2, 0) expected: ValueError: time data '20140812' does not match format '%Y%m%d%H' datetime.datetime.strptime('2014081201', '%Y%m%d%H%M') returns: datetime.datetime(2014, 8, 12, 0, 1) expected: ValueError: time data '2014081201' does not match format '%Y%m%d%H%M' ---------- components: Library (Lib) messages: 406877 nosy: joxtoby27 priority: normal severity: normal status: open title: datetime.strptime incorrectly handling hours and minutes with bad format string type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 14:45:44 2021 From: report at bugs.python.org (Jon Oxtoby) Date: Tue, 23 Nov 2021 19:45:44 +0000 Subject: [issue45884] datetime.strptime incorrectly handling hours and minutes with bad format string In-Reply-To: <1637694672.86.0.81735779429.issue45884@roundup.psfhosted.org> Message-ID: <1637696744.78.0.175078395458.issue45884@roundup.psfhosted.org> Jon Oxtoby added the comment: Just noticed the potential for this issue was raised in https://bugs.python.org/msg393688 so it's possible this is not a bug and is the desired behavior, but the documentation doesn't seem to address the issue (unless I'm overlooking it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 14:45:33 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 19:45:33 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637696733.2.0.454736556858.issue39026@roundup.psfhosted.org> Christian Heimes added the comment: I think GH-28612 broke Windows builds: python_uwp.cpp python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) struct PyStatus __cdecl PyConfig_SetArgv(struct PyConfig *,__int64,wchar_t * const *)" (__imp_?PyConfig_SetArgv@@YA?AUPyStatus@@PEAUPyConfig@@_JPEBQEA_W at Z) [D:\a\1\s\PCbuild\python_uwp.vcxproj] python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __cdecl PyStatus_Exception(struct PyStatus)" (__imp_?PyStatus_Exception@@YAHUPyStatus@@@Z) [D:\a\1\s\PCbuild\python_uwp.vcxproj] python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl PyConfig_InitPythonConfig(struct PyConfig *)" (__imp_?PyConfig_InitPythonConfig@@YAXPEAUPyConfig@@@Z) [D:\a\1\s\PCbuild\python_uwp.vcxproj] python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) int __cdecl PyStatus_IsExit(struct PyStatus)" (__imp_?PyStatus_IsExit@@YAHUPyStatus@@@Z) [D:\a\1\s\PCbuild\python_uwp.vcxproj] python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) struct PyStatus __cdecl PyConfig_SetString(struct PyConfig *,wchar_t * *,wchar_t const *)" (__imp_?PyConfig_SetString@@YA?AUPyStatus@@PEAUPyConfig@@PEAPEA_WPEB_W at Z) [D:\a\1\s\PCbuild\python_uwp.vcxproj] python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl PyConfig_Clear(struct PyConfig *)" (__imp_?PyConfig_Clear@@YAXPEAUPyConfig@@@Z) [D:\a\1\s\PCbuild\python_uwp.vcxproj] python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl PyPreConfig_InitPythonConfig(struct PyPreConfig *)" (__imp_?PyPreConfig_InitPythonConfig@@YAXPEAUPyPreConfig@@@Z) [D:\a\1\s\PCbuild\python_uwp.vcxproj] python_uwp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) struct PyStatus __cdecl PyStatus_Ok(void)" (__imp_?PyStatus_Ok@@YA?AUPyStatus@@XZ) [D:\a\1\s\PCbuild\python_uwp.vcxproj] D:\a\1\s\PCbuild\amd64\python_uwp.exe : fatal error LNK1120: 8 unresolved externals [D:\a\1\s\PCbuild\python_uwp.vcxproj] https://dev.azure.com/Python/cpython/_build/results?buildId=92032&view=results ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 14:56:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 19:56:38 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) In-Reply-To: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> Message-ID: <1637697398.97.0.24166225805.issue45880@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +Mark.Shannon, gvanrossum, iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:05:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Nov 2021 20:05:21 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) In-Reply-To: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> Message-ID: <1637697921.98.0.966410445073.issue45880@roundup.psfhosted.org> Irit Katriel added the comment: Raymond, your last two results look like 3.10 rather than 3.11. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:13:24 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Nov 2021 20:13:24 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) In-Reply-To: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> Message-ID: <1637698404.29.0.156722086673.issue45880@roundup.psfhosted.org> Guido van Rossum added the comment: I assume there's something wrong with the OP's methodology for profiling. (Raymond, in your last example there's a -s argument but nothing to run -- does timeit just use "pass" in that case?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:16:29 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 23 Nov 2021 20:16:29 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) In-Reply-To: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> Message-ID: <1637698589.61.0.78450309522.issue45880@roundup.psfhosted.org> Mark Shannon added the comment: > I assume there's something wrong with the OP's methodology for profiling. In a word "cProfile". All cProfile is doing is measuring the overhead of cProfile. That the overhead of cProfile has gone up is not surprising. That it has gone up so much, is a bit surprising. My advice would be use a sampling profiling like Scalene. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:27:23 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 20:27:23 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) In-Reply-To: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> Message-ID: <1637699243.29.0.843294726987.issue45880@roundup.psfhosted.org> Raymond Hettinger added the comment: Reposting with more careful timing runs. No regression was observed. $ python3.10 --version Python 3.10.0 $ python3.10 -m timeit -r 11 -s 'x=5' 'x^3' # Xor with variable 5000000 loops, best of 11: 41.7 nsec per loop $ python3.10 -m timeit -r 11 -s 'x=5' 'x+3' # Add with variable 10000000 loops, best of 11: 22.7 nsec per loop $ python3.10 -m timeit -r 11 '5+3' # Constant folded 50000000 loops, best of 11: 7.22 nsec per loop $ python3.11 --version Python 3.11.0a2 $ python3.11 -m timeit -r 11 -s 'x=5' 'x^3' # Xor with variable 20000000 loops, best of 11: 19.4 nsec per loop $ python3.11 -m timeit -r 11 -s 'x=5' 'x+3' # Add with variable 20000000 loops, best of 11: 17 nsec per loop $ python3.11 -m timeit -r 11 '5+3' # Constant folded 50000000 loops, best of 11: 7.27 nsec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:36:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 20:36:00 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637699760.39.0.51101412214.issue39026@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27971 pull_request: https://github.com/python/cpython/pull/29730 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:36:51 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 20:36:51 +0000 Subject: [issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds In-Reply-To: <1637607109.55.0.706004441577.issue45873@roundup.psfhosted.org> Message-ID: <1637699811.69.0.647571825133.issue45873@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f840398a5fd8741653c26eb8641c48656c9800d4 by Christian Heimes in branch 'main': bpo-45873: Restore Python 3.6 compatibility (GH-29730) https://github.com/python/cpython/commit/f840398a5fd8741653c26eb8641c48656c9800d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:36:58 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 20:36:58 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637699818.03.0.906597147797.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: Should the last line of sqrt_frac() be wrapped with float()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:50:16 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Tue, 23 Nov 2021 20:50:16 +0000 Subject: [issue45883] reuse_address mistakenly removed from loop.create_server In-Reply-To: <1637694476.84.0.389312565282.issue45883@roundup.psfhosted.org> Message-ID: <1637700616.84.0.930139178312.issue45883@roundup.psfhosted.org> Change by Oleg Iarygin : ---------- nosy: +arhadthedev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:56:06 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Nov 2021 20:56:06 +0000 Subject: [issue45880] Performance regression of Int object operators. (Python 3.11) In-Reply-To: <1637682778.64.0.753223972817.issue45880@roundup.psfhosted.org> Message-ID: <1637700966.22.0.248670668464.issue45880@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 15:56:58 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 20:56:58 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637701018.75.0.87051955773.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: > Should the last line of sqrt_frac() be wrapped with float()? It's already a float - it's the result of an int / int division. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 16:00:24 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 23 Nov 2021 21:00:24 +0000 Subject: [issue45885] Specialize COMPARE_OP Message-ID: <1637701224.16.0.881347004039.issue45885@roundup.psfhosted.org> New submission from Dennis Sweeney : Some specialization statistics: https://gist.github.com/sweeneyde/49cc3a9d074d56cf095cb0a42d13d7a4 Including 3 opcodes: COMPARE_OP_INT and COMPARE_OP_FLOAT and COMPARE_OP_STR (equality only) seems to give pretty good specialization numbers, better than just 2. ---------- components: Interpreter Core messages: 406887 nosy: Dennis Sweeney priority: normal severity: normal status: open title: Specialize COMPARE_OP type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 16:00:53 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 23 Nov 2021 21:00:53 +0000 Subject: [issue45885] Specialize COMPARE_OP In-Reply-To: <1637701224.16.0.881347004039.issue45885@roundup.psfhosted.org> Message-ID: <1637701253.6.0.0646532406166.issue45885@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- keywords: +patch pull_requests: +27972 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 16:01:40 2021 From: report at bugs.python.org (Muhammad Irfan Asghar) Date: Tue, 23 Nov 2021 21:01:40 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: <1637658187.68.0.0278695845153.issue45839@roundup.psfhosted.org> Message-ID: Muhammad Irfan Asghar added the comment: Hi The issue is finally solved by using the command pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pandas Thanks to all who helped. regards Irfan On Tue, Nov 23, 2021 at 10:03 AM Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > Could you check with "curl -k https://pypi.org/ >/dev/null" what > certificate is used by PyPI? > > On my system I get (amongst other output): > > ... > * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 > * ALPN, server accepted to use h2 > * Server certificate: > * subject: CN=pypi.org > * start date: Oct 22 18:55:44 2021 GMT > * expire date: Nov 23 18:55:43 2022 GMT > * subjectAltName: host "pypi.org" matched cert's "pypi.org" > * issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA H2 > 2021 > * SSL certificate verify ok. > ... > > Note how the issuer is GlobalSign. If you see some other certificate > authority, or get an error from curl due to the same certificate > verification problem, you have something on the path between you and PyPI > that intercepts the connection, such as a corporate proxy. > > Pip appears to have a way to override certificate verification, you'll > have to (a) read pip's manual for that and (b) be *very* sure you know > what's going on before you start trusting some other CA that's not in the > global trust root used by pip and certify. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 16:06:41 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Nov 2021 21:06:41 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637701601.87.0.953252074656.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: Hmm. isqrt_frac_rto is unnecessarily complicated. Here's a more streamlined version of the code. import math def isqrt_frac_rto(n, m): """ Square root of n/m, rounded to the nearest integer using round-to-odd. """ a = math.isqrt(n*m) // m return a | (a*a*m != n) def sqrt_frac(n, m): """ Square root of n/m as a float, correctly rounded. """ q = (n.bit_length() - m.bit_length() - 109) // 2 if q >= 0: return float(isqrt_frac_rto(n, m << 2 * q) << q) else: return isqrt_frac_rto(n << -2 * q, m) / (1 << -q) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 16:26:59 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 21:26:59 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637702819.7.0.748774349709.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 095bc8f0d6845dded8f67fbc6eca20dfac8b3929 by Christian Heimes in branch 'main': bpo-45847: Port _crypt to PY_STDLIB_MOD (GH-29725) https://github.com/python/cpython/commit/095bc8f0d6845dded8f67fbc6eca20dfac8b3929 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 16:51:08 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Nov 2021 21:51:08 +0000 Subject: [issue45873] Stop using bootstrap_python for deep-freeze in UNIX builds In-Reply-To: <1637607109.55.0.706004441577.issue45873@roundup.psfhosted.org> Message-ID: <1637704268.17.0.389199120256.issue45873@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 Nov 23 16:58:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 21:58:22 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637704702.38.0.440806466242.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b9e9292d75fdea621e05e39b8629e6935d282d0d by Christian Heimes in branch 'main': bpo-45847: Port _ssl and _hashlib to PY_STDLIB_MOD (GH-29727) https://github.com/python/cpython/commit/b9e9292d75fdea621e05e39b8629e6935d282d0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 16:58:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 21:58:48 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637704728.18.0.689016862739.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 9cf5646bb465b7d3d68bfe6d4711feb43d565051 by Christian Heimes in branch 'main': bpo-45847: Port _gdbm to PY_STDLIB_MOD (GH-29720) https://github.com/python/cpython/commit/9cf5646bb465b7d3d68bfe6d4711feb43d565051 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:35:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 22:35:22 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python Message-ID: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> New submission from Christian Heimes : The build process creates the binary Program/_freeze_module, which is used to create frozen modules. The program takes a Python file, compiles it, and stores its marshalled output in a header file. The approach does not work when cross compiling Python. In cross building case Program/_freeze_module cannot be executed on the build host. For example a cross build with build host "x86_64" and target host "aarch64" would create a aarch64 Program/_freeze_module. The current x86_64 host cannot executed binary (unless you use qemu and binfmt, which I'm deliberately ignoring here). To unblock cross building and until we find a better solution, I propose that we allow developers to override the freeze module command on the command line. This allows developers to use a freeze_module program from a non-cross build: ../../configure -C --host=aarch64-linux-gnu-gcc --build=x86_64-pc-linux-gnu make FREEZE_MODULE=../x86_64/Program/_freeze_module ---------- assignee: christian.heimes components: Build messages: 406893 nosy: christian.heimes priority: normal severity: normal status: open title: Fix Program/_freeze_module for cross compiling Python type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:38:23 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 23 Nov 2021 22:38:23 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1637707103.12.0.428749239546.issue45886@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27973 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:40:40 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 22:40:40 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637707240.79.0.648457946702.issue45876@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +27974 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:41:13 2021 From: report at bugs.python.org (Muhammad Irfan Asghar) Date: Tue, 23 Nov 2021 22:41:13 +0000 Subject: [issue45839] python3 executable is able to install pandas In-Reply-To: Message-ID: Muhammad Irfan Asghar added the comment: Great, thanks! On Tue, Nov 23, 2021 at 10:01 PM Muhammad Irfan Asghar < report at bugs.python.org> wrote: > > Muhammad Irfan Asghar added the comment: > > Hi > > The issue is finally solved by using the command > > pip3 install --trusted-host pypi.org --trusted-host pypi.python.org > --trusted-host files.pythonhosted.org pandas > > Thanks to all who helped. > > regards > Irfan > > On Tue, Nov 23, 2021 at 10:03 AM Ronald Oussoren > wrote: > > > > > Ronald Oussoren added the comment: > > > > Could you check with "curl -k https://pypi.org/ >/dev/null" what > > certificate is used by PyPI? > > > > On my system I get (amongst other output): > > > > ... > > * SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305 > > * ALPN, server accepted to use h2 > > * Server certificate: > > * subject: CN=pypi.org > > * start date: Oct 22 18:55:44 2021 GMT > > * expire date: Nov 23 18:55:43 2022 GMT > > * subjectAltName: host "pypi.org" matched cert's "pypi.org" > > * issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Atlas R3 DV TLS CA H2 > > 2021 > > * SSL certificate verify ok. > > ... > > > > Note how the issuer is GlobalSign. If you see some other certificate > > authority, or get an error from curl due to the same certificate > > verification problem, you have something on the path between you and PyPI > > that intercepts the connection, such as a corporate proxy. > > > > Pip appears to have a way to override certificate verification, you'll > > have to (a) read pip's manual for that and (b) be *very* sure you know > > what's going on before you start trusting some other CA that's not in the > > global trust root used by pip and certify. > > > > ---------- > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:40:54 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 23 Nov 2021 22:40:54 +0000 Subject: [issue45887] [subinterpreters] Pull all interpreter-global objects into one place. Message-ID: <1637707254.12.0.17655589949.issue45887@roundup.psfhosted.org> New submission from Eric Snow : Currently there are still a bunch of PyObject static variables in the code that need to become per-interpreter. This includes quite a few static types (e.g. in Objects/*.c), as well as freelists and caches. To make the transition easier I'd like to move all those objects under a single struct. When I started consolidating globals a few years back, my plan was to turn static variables into fields on the _PyRuntimeState struct, where they can later be moved down into PyInterpreterState and become per-interpreter. That has worked fine but the mental indirection in that process is clunky. Consequently, in practice we've ended up just moving things directly to PyInterpreterState, even in cases where making something per-interpreter is premature. So at this point I'm planning on a slightly different approach. We'll move the objects (and other state) to PyInterpreterState as pointer fields, and then use the main interpreter's pointers in the corresponding fields in all subinterpreters. Thus it will be equivalent to having a single global state. However, it will go smoother down the road when we make all that state unique to each interpreter. ---------- assignee: eric.snow components: Interpreter Core messages: 406894 nosy: Mark.Shannon, eric.snow, ncoghlan, vstinner priority: normal severity: normal status: open title: [subinterpreters] Pull all interpreter-global objects into one place. versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:42:23 2021 From: report at bugs.python.org (Eric Snow) Date: Tue, 23 Nov 2021 22:42:23 +0000 Subject: [issue45887] [subinterpreters] Pull all interpreter-global objects into one place. In-Reply-To: <1637707254.12.0.17655589949.issue45887@roundup.psfhosted.org> Message-ID: <1637707343.5.0.528590945972.issue45887@roundup.psfhosted.org> Change by Eric Snow : ---------- keywords: +patch pull_requests: +27975 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:46:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 22:46:54 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637707614.29.0.943067167723.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: I've opened a PR to make this easy to experiment with. It also worked with my frac_sqrt() and deci_sqrt(), but having all integer arithmetic and always correct rounding are nice wins. The only downside is that I completely understood the first two variants but am still studying the new one. Perhaps Tim will have a look as well. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:48:24 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 23 Nov 2021 22:48:24 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637707704.23.0.717491949583.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: As a side effect of inlining the variance code, we also get to fix the error messages which were variance specific. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 17:58:30 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Tue, 23 Nov 2021 22:58:30 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637708310.98.0.825250934613.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +27976 pull_request: https://github.com/python/cpython/pull/29738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 18:00:08 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Nov 2021 23:00:08 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1637708408.41.0.945674437753.issue45886@roundup.psfhosted.org> Guido van Rossum added the comment: To the question "why does _freeze_module need to be a (C) binary" (IOW, why can't it be replaced by a Python script that is run with PYTHON_FOR_REGEN, which always runs on the build host), the reason is that it uses the bytecode compiler to generate correct output. The bytecode compiler is written in C and depends on many other parts of the runtime. Bytecode is not compatible between versions (and in 3.11 it is an especially moving target) so we absolutely must use the bytecode compiler from the current source tree. Fortunately bytecode *is* portable across OS and CPU versions, so there is no problem with taking a _freeze_module binary compiled for the build host and running it there (on the build host). It *is* complicated to build a binary for the build host in a tree configured for cross compilation though -- you'd have to do an out-of-tree build configured for the build host platform. Rather than solving *that* problem, Christian proposes to let the user solve that, and allowing the user to pass in the path to the host platform _freeze_module binary. ---------- nosy: +eric.snow, gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 18:19:55 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 23 Nov 2021 23:19:55 +0000 Subject: [issue45299] SMTP.send_message() does from mangling when it should not In-Reply-To: <1632718949.8.0.657238158075.issue45299@roundup.psfhosted.org> Message-ID: <1637709595.4.0.147957526225.issue45299@roundup.psfhosted.org> Andrei Kulakov added the comment: Seems like a reasonable request to me. I can make the PR+test. To minimize backwards-incompatible change, we can pass `_mangle_from=policy._mangle_from` argument instead of passing the entire policy. Is that a good idea or passing the policy argument should be fine too? ---------- nosy: +andrei.avk, r.david.murray stage: -> needs patch type: -> behavior versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 20:46:58 2021 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Nov 2021 01:46:58 +0000 Subject: [issue45299] SMTP.send_message() does from mangling when it should not In-Reply-To: <1632718949.8.0.657238158075.issue45299@roundup.psfhosted.org> Message-ID: <1637718418.48.0.37331828137.issue45299@roundup.psfhosted.org> R. David Murray added the comment: In this case the docs are correct and the code has a bug. The intent was that if the message passed in to BytesGenerator has a policy, that policy should be followed. If it is not being followed, that's a bug in BytesGenerator. The tricky part of course is backward compatibility. Is there code out there depending on this bug? Anyone want to hazard a guess? Are there things other than mangle_from_ that are being ignored? If we decide it is too risky to fix in BytesGenerator (or maybe only to fix it in a feature release), then I'd pass the whole policy in the else clause, with a comment about what bug it is working around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 22:33:25 2021 From: report at bugs.python.org (Jacob Walls) Date: Wed, 24 Nov 2021 03:33:25 +0000 Subject: [issue32731] getpass.getuser() raises an unspecified exceptions (ImportError, OSError, etc) In-Reply-To: <1517421752.06.0.467229070634.issue32731@psf.upfronthosting.co.za> Message-ID: <1637724805.04.0.619905803817.issue32731@roundup.psfhosted.org> Change by Jacob Walls : ---------- nosy: +jacobtylerwalls nosy_count: 4.0 -> 5.0 pull_requests: +27977 pull_request: https://github.com/python/cpython/pull/29739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 23:41:24 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 04:41:24 +0000 Subject: [issue45616] Python Launcher Matches 3.10 instead of 3.1 In-Reply-To: <1635270674.96.0.337719561337.issue45616@roundup.psfhosted.org> Message-ID: <1637728884.79.0.547934195617.issue45616@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +27978 pull_request: https://github.com/python/cpython/pull/29740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 23 23:41:12 2021 From: report at bugs.python.org (Zachary Ware) Date: Wed, 24 Nov 2021 04:41:12 +0000 Subject: [issue45616] Python Launcher Matches 3.10 instead of 3.1 In-Reply-To: <1635270674.96.0.337719561337.issue45616@roundup.psfhosted.org> Message-ID: <1637728872.26.0.799461633665.issue45616@roundup.psfhosted.org> Zachary Ware added the comment: New changeset f9de97aae5fe9dafb58a8099171f4a09c449f4e8 by Zachary Ware in branch 'main': bpo-45616: Let py.exe distinguish between v3.1 and v3.10 (GH-29731) https://github.com/python/cpython/commit/f9de97aae5fe9dafb58a8099171f4a09c449f4e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 00:02:41 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 05:02:41 +0000 Subject: [issue45616] Python Launcher Matches 3.10 instead of 3.1 In-Reply-To: <1635270674.96.0.337719561337.issue45616@roundup.psfhosted.org> Message-ID: <1637730161.8.0.141898784512.issue45616@roundup.psfhosted.org> miss-islington added the comment: New changeset ae065f83625f3abcf75d928f405e05582fc035b4 by Miss Islington (bot) in branch '3.10': bpo-45616: Let py.exe distinguish between v3.1 and v3.10 (GH-29731) https://github.com/python/cpython/commit/ae065f83625f3abcf75d928f405e05582fc035b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 00:58:44 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Wed, 24 Nov 2021 05:58:44 +0000 Subject: [issue45299] SMTP.send_message() does from mangling when it should not In-Reply-To: <1632718949.8.0.657238158075.issue45299@roundup.psfhosted.org> Message-ID: <1637733524.67.0.46940010539.issue45299@roundup.psfhosted.org> Andrei Kulakov added the comment: There are 3 policy settings that are also being passed as parameters to Generator/BytesGenerator: - mangle_from_ - linesep - maxheaderlen Both linesep and maxheaderlen are being inserted into policy after self.policy (if there is one) overrides message policy. The docs for both linesep and maxheaderlen match the code. So this only leaves us the buggy `mangle_from_`. I think it makes sense to fix it in `send_message()` rather than in BytesGenerator because: - less backwards compatibility breakage - there's already a workaround for BytesGenerator (provide the parameter) - there were no reports from users of BytesGenerator We have two ways to fix it in send_message() -- - provide policy as an arg - provide mangle_from_ as an arg I think the 2nd choice is better because it's more direct and easier to understand. If we use msg.policy as an arg, it looks like we're using msg.policy to override msg.policy, which wouldn't make any sense except that mangle_from_ is being set from policy arg rather than msg.policy. If there's code out there that relies on this bug in send_message(), I would guess it's more likely to be test suites that compare output to version where *from* is mangled. Docs for BytesGenerator should be fixed to warn about this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:07:23 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 07:07:23 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1637737643.57.0.827222648723.issue45886@roundup.psfhosted.org> Christian Heimes added the comment: New changeset dd8ce9ea8d7e45224a348ea7962b5f50cbf86dc5 by Christian Heimes in branch 'main': bpo-45886: Allow overriding freeze command for cross compiling (GH-29735) https://github.com/python/cpython/commit/dd8ce9ea8d7e45224a348ea7962b5f50cbf86dc5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:19:32 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 07:19:32 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637738372.67.0.138659086884.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 324527012fa1078428a6207918640cf860e28c81 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port _posixshmem to PY_STDLIB_MOD (GH-29738) https://github.com/python/cpython/commit/324527012fa1078428a6207918640cf860e28c81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:37:09 2021 From: report at bugs.python.org (Rob Blackbourn) Date: Wed, 24 Nov 2021 07:37:09 +0000 Subject: [issue45888] Revisit: start_tls() difficult when using asyncio.start_server() Message-ID: <1637739429.36.0.799749161441.issue45888@roundup.psfhosted.org> New submission from Rob Blackbourn : The issue 34975 "start_tls() difficult when using asyncio.start_server()" was closed because streams was being re-written, but it's still a useful enhancement, and a fairly simple change. Could this be revisited? I've done a proof of concept here: https://github.com/rob-blackbourn/asyncio-upgradeable-streams ---------- assignee: christian.heimes components: Library (Lib), SSL messages: 406906 nosy: christian.heimes, rob-blackbourn priority: normal severity: normal status: open title: Revisit: start_tls() difficult when using asyncio.start_server() type: enhancement versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:39:37 2021 From: report at bugs.python.org (vladexl) Date: Wed, 24 Nov 2021 07:39:37 +0000 Subject: [issue45879] Access violation In-Reply-To: <1637675344.51.0.888057929265.issue45879@roundup.psfhosted.org> Message-ID: <1637739577.57.0.817408510988.issue45879@roundup.psfhosted.org> vladexl added the comment: Sorry i can't provide simple example, but will describe steps. And also i found reason of such behavior. It was a function from pythonwin: PyWinObject_FromHANDLE. When i removed it from code - issue gone. So, in order to start 2 python scripts simultaneously: 1. 2 interpreters was created (Py_NewInterpreter) 2. 2 windows threads started and 2 python scripts inside (PyRun_AnyFileExFlags(hFile, filePath, true, nullptr); 3. Python scripts like this: (i started additional thread inside python script, it's necessary) @entry def main(): import time i = 100 while i < 103 : print("iter {0} ".format(i)) time.sleep(1) i = i +1 def entry(function): def entry_decorator(): import threading thread = threading.Thread(target=_threadmain, args=(function,)) thread.start() return entry_decorator def _threadmain(function): # call entry point from primary script function() myevent = __mymodule.GetStopEvent() while True: rc = win32event.MsgWaitForMultipleObjects((myevent,), 1, 1000, win32event.QS_ALLINPUT); if rc == win32event.WAIT_OBJECT_0: break pythoncom.PumpWaitingMessages() pythoncom.CoUninitialize() 4. GetStopEvent like this: PyObject* GetStopEvent(PyObject *self, PyObject *args) { HANDLE hEvent = CreateEvent(...); return PyWinObject_FromHANDLE(hEvent); } 5. Exception appears after starting/stopping(firing event) 3..4 times. It works fine in case of single starting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:49:43 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 07:49:43 +0000 Subject: [issue22045] Python make issue In-Reply-To: <1406117862.23.0.135696000898.issue22045@psf.upfronthosting.co.za> Message-ID: <1637740183.47.0.975565576427.issue22045@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:51:47 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 24 Nov 2021 07:51:47 +0000 Subject: [issue45514] Deprecate legacy functions from importlib.resources (importlib_resources 5.3) In-Reply-To: <1634580203.88.0.440304730222.issue45514@roundup.psfhosted.org> Message-ID: <1637740307.95.0.176699002334.issue45514@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset d5cd2effa69551c6bc7edfef8a414d545dea9117 by Jason R. Coombs in branch 'main': bpo-45514: Deprecate importlib resources legacy functions. (GH-29036) https://github.com/python/cpython/commit/d5cd2effa69551c6bc7edfef8a414d545dea9117 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:53:22 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 24 Nov 2021 07:53:22 +0000 Subject: [issue45514] Deprecate legacy functions from importlib.resources (importlib_resources 5.3) In-Reply-To: <1634580203.88.0.440304730222.issue45514@roundup.psfhosted.org> Message-ID: <1637740402.41.0.278582365603.issue45514@roundup.psfhosted.org> Jason R. Coombs added the comment: See https://discuss.python.org/t/deprecating-importlib-resources-legacy-api/11386 for some lively discussion on this deprecation. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 02:54:31 2021 From: report at bugs.python.org (Nick Papior) Date: Wed, 24 Nov 2021 07:54:31 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths Message-ID: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> New submission from Nick Papior : The documentation of Path.match only says it will match a pattern. But quite often this pattern may be desirable to have as a Path as well. import pathlib as pl path = pl.Path("foo/bar") print(path.match("bar")) print(path.match(pl.Path("bar"))) However, the last one fails and one has to resort to print(path.match(str(pl.Path("bar")))) which in my opinion is a little misleading. I couldn't find any other bug/enhancement report of this. Also, this probably also targets later versions. ---------- components: Library (Lib) messages: 406910 nosy: nickpapior priority: normal severity: normal status: open title: pathlib: Path.match does not work on paths type: enhancement versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 03:12:57 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Nov 2021 08:12:57 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637741577.47.0.660410014905.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: > am still studying the new one Sorry - I should have added at least _some_ comments to it. Here's the underlying principle, which I think of as "The magic of round-to-odd": Suppose x is a positive real number and e is an integer satisfying 2^e <= x. Then assuming IEEE 754 binary64 floating-point format, the quantity: 2^(e-54) * to-odd(x / 2^(e-54)) rounds to the same value as x does under _any_ of the standard IEEE 754 rounding modes, including the round-ties-to-even rounding mode that we care about here. Here, to-odd is the function R -> Z that maps each integer to itself, but maps each non-integral real number x to the *odd* integer nearest x. (So for example all of 2.1, 2.3, 2.9, 3.0, 3.1, 3.9 map to 3.) This works because (x / 2^(e-54)) gives us an integer with at least 55 bits: the 53 bits we'll need in the eventual significand, a rounding bit, and then the to-odd supplies a "sticky" bit that records inexactness. Note that the principle works in the subnormal range too - no additional tricks are needed for that. In that case we just end up wastefully computing a few more bits than we actually _need_ to determine the correctly-rounded value. The code applies this principle to the case x = sqrt(n/m) and e = (n.bit_length() - m.bit_length() - 1)//2. The condition 2^e <= x holds because: 2^(n.bit_length() - 1) <= n m < 2^m.bit_length() so 2^(n.bit_length() - 1 - m.bit_length()) < n/m and taking square roots gives 2^((n.bit_length() - 1 - m.bit_length())/2) < ?(n/m) so taking e = (n.bit_length() - 1 - m.bit_length())//2, we have 2^e <= 2^((n.bit_length() - 1 - m.bit_length())/2) < ?(n/m) Now putting q = e - 54, we need to compute 2^q * round-to-odd(?(n/m) / 2^q) rounded to a float. The two branches both do this computation, by moving 2^q into either the numerator or denominator of the fraction as appropriate depending on the sign of q. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 03:40:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 08:40:37 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637743237.48.0.401212565007.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27979 pull_request: https://github.com/python/cpython/pull/29741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 03:57:17 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Nov 2021 08:57:17 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637744237.34.0.383623706849.issue45889@roundup.psfhosted.org> Ronald Oussoren added the comment: This would definitely be a new feature and not something that can be back ported. That said, I don't understand why it is desirable to use a Path as the match argument. That argument is a glob pattern (such as "*.py") and not a file name . ---------- nosy: +ronaldoussoren versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 03:57:50 2021 From: report at bugs.python.org (Alex) Date: Wed, 24 Nov 2021 08:57:50 +0000 Subject: [issue43399] xml.etree.ElementTree.extend does not work with iterators when using the Python implementation In-Reply-To: <1614873561.76.0.875762243403.issue43399@roundup.psfhosted.org> Message-ID: <1637744270.45.0.875663809549.issue43399@roundup.psfhosted.org> Change by Alex : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 04:20:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 09:20:22 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637745622.21.0.00883679385774.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27980 pull_request: https://github.com/python/cpython/pull/29743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 04:20:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 09:20:48 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637745648.95.0.588581851259.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 8af6481f6b7d43646c47d8fa6cc6d5eb465e2b0f by Christian Heimes in branch 'main': bpo-45847: Port _uuid to PY_STDLIB_MOD (GH-29741) https://github.com/python/cpython/commit/8af6481f6b7d43646c47d8fa6cc6d5eb465e2b0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 04:37:29 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Wed, 24 Nov 2021 09:37:29 +0000 Subject: [issue45019] Freezing modules has manual steps but could be automated. In-Reply-To: <1630004779.62.0.284599538008.issue45019@roundup.psfhosted.org> Message-ID: <1637746649.1.0.405573300108.issue45019@roundup.psfhosted.org> Change by Oleg Iarygin : ---------- nosy: +arhadthedev nosy_count: 5.0 -> 6.0 pull_requests: +27981 pull_request: https://github.com/python/cpython/pull/29744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 04:47:30 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 09:47:30 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637747250.92.0.400513763335.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 64c3807da93fc3e0c15bc376f220b2d24551023e by Christian Heimes in branch 'main': bpo-45847: Fix _crypt detection on Ubuntu (GH-29743) https://github.com/python/cpython/commit/64c3807da93fc3e0c15bc376f220b2d24551023e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 04:51:29 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 09:51:29 +0000 Subject: [issue22045] Python make issue In-Reply-To: <1406117862.23.0.135696000898.issue22045@psf.upfronthosting.co.za> Message-ID: <1637747489.8.0.477826209977.issue22045@roundup.psfhosted.org> Christian Heimes added the comment: Python 2 is no longer supported. Can you reproduce the issue with Python 3.9 or newer? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 05:09:51 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 24 Nov 2021 10:09:51 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1637748591.51.0.434959456335.issue23882@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +27982 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 05:09:55 2021 From: report at bugs.python.org (Nick Papior) Date: Wed, 24 Nov 2021 10:09:55 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637748595.88.0.866206563597.issue45889@roundup.psfhosted.org> Nick Papior added the comment: Ok, I see this a feature. :) As for why it is desirable. A part of a path is still a path, and matching for something must mean that you are matching a partial path. Even if you use '*.py' as the pattern this would still make sense as a path: path = pl.Path("foo/bar") print(path.match("bar")) print(path.match(str(pl.Path("bar")))) print(path.match(str(pl.Path("*")))) The idea is that *anything* that can match a path _is_ a sub-path by definition, otherwise it can't be matched. So allowing path is just as natural as far as I see it. As for the above argumentation I think this also holds for Path.glob and Path.rglob where pattern could just as well be a Path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 05:38:53 2021 From: report at bugs.python.org (Christoph Groth) Date: Wed, 24 Nov 2021 10:38:53 +0000 Subject: [issue43475] Worst-case behaviour of hash collision with float NaN In-Reply-To: <1615474533.28.0.166606930148.issue43475@roundup.psfhosted.org> Message-ID: <1637750333.97.0.574727367034.issue43475@roundup.psfhosted.org> Christoph Groth added the comment: Hello. I would like to point out a possible problem that this change to CPython has introduced. This change looks innocent, but it breaks the unwritten rule that the hash value of a number (or actually any built-in immutable type!) in Python depends only on its value. Thus, before this change, it was possible to convert a tuple of floats into a numpy array and back into a tuple, and the hash values of both tuples would be equal. This is no longer the case. Or, more generally, any hashable tuple could be pickled and unpickled, without changing its hash value. I could well imagine that this breaks real code in subtle ways. Likewise, it is now no longer possible to provide a library of sequences of numbers that always hashes like built-in tuples. (As "tinyarray", of which I am the author, did.) ---------- nosy: +cwg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 06:10:50 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Wed, 24 Nov 2021 11:10:50 +0000 Subject: [issue45509] Gzip header corruption not properly checked. In-Reply-To: <1634553667.76.0.606198171759.issue45509@roundup.psfhosted.org> Message-ID: <1637752250.79.0.629261568834.issue45509@roundup.psfhosted.org> Ruben Vorderman added the comment: I have found that using the timeit module provides more precise measurements: For a simple gzip header. (As returned by gzip.compress or zlib.compress with wbits=31) ./python -m timeit -s "import io; data = b'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00'; from gzip import _read_gzip_header" '_read_gzip_header(io.BytesIO(data))' For a gzip header with FNAME. (Returned by gzip itself and by Python's GzipFile) ./python -m timeit -s "import io; data = b'\x1f\x8b\x08\x08j\x1a\x9ea\x02\xffcompressable_file\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00'; from gzip import _read_gzip_header" '_read_gzip_header(io.BytesIO(data))' For a gzip header with all flags set: ./python -m timeit -s 'import gzip, io; data = b"\x1f\x8b\x08\x1f\x00\x00\x00\x00\x00\xff\x05\x00extraname\x00comment\x00\xe9T"; from gzip import _read_gzip_header' '_read_gzip_header(io.BytesIO(data))' Since performance is most critical for in-memory compression and decompression, I now optimized for no flags. Before (current main): 500000 loops, best of 5: 469 nsec per loop after (PR): 1000000 loops, best of 5: 390 nsec per loop For the most common case of only FNAME set: before: 200000 loops, best of 5: 1.48 usec per loop after: 200000 loops, best of 5: 1.45 usec per loop For the case where FCHRC is set: before: 200000 loops, best of 5: 1.62 usec per loop after: 100000 loops, best of 5: 2.43 usec per loop So this PR is now a clear win for decompressing anything that has been compressed with gzip.compress. It is neutral for normal file decompression. There is a performance cost associated with correctly checking the header, but that is expected. It is better than the alternative of not checking it. ---------- Added file: https://bugs.python.org/file50459/benchmark_gzip_read_header.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 06:23:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 11:23:46 +0000 Subject: [issue45890] Add tests for tracing try-except-finally blocks Message-ID: <1637753025.86.0.0360448888462.issue45890@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: iritkatriel components: Interpreter Core, Tests nosy: iritkatriel priority: normal severity: normal status: open title: Add tests for tracing try-except-finally blocks type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 06:25:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 11:25:24 +0000 Subject: [issue45890] Add tests for tracing try-except-finally blocks Message-ID: <1637753124.91.0.268808569835.issue45890@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +27983 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 06:37:34 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 11:37:34 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637753854.4.0.106495028136.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27984 pull_request: https://github.com/python/cpython/pull/29747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 06:38:14 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Nov 2021 11:38:14 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637753894.35.0.102636838562.issue45889@roundup.psfhosted.org> Ronald Oussoren added the comment: Match doesn't match paths, but basically does a regular expression match on the textual representation (using glob syntax instead of normal regular expression syntax). Because of this I don't agree with your idea that anything that can match a path is a sub-path. What is your use case for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 06:48:28 2021 From: report at bugs.python.org (Nick Papior) Date: Wed, 24 Nov 2021 11:48:28 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637754508.24.0.876924686834.issue45889@roundup.psfhosted.org> Nick Papior added the comment: > Because of this I don't agree with your idea that anything that can match a path is a sub-path. Why not? If a match is True, it means that what is matched must be some kind of valid path matching a glob specification. Whether it is a regular expression, or anything else. If one did $(ls pattern) one would list the paths that matches the pattern, and hence a path. Agreed that the pattern itself is not necessarily a fixed/single path, but a shell glob path. Yet, matches will regardless be a path. As for the use case I want to assert a files path has a parent that matches another directory/filename something like this: ref_file = Path("hello") for f in dir.iterdir(): if f.parent.match(ref_file): in the real application the match is a bit more complex with nested directories as well as a recursive iterator. Lastly, you say: > That said, I don't understand why it is desirable to use a Path as the match argument. I am on the other side: I don't understand why it is undesirable to use a Path as the match argument. :) A simple if isinstance(pattern, PurePath): pattern = str(pattern) would suffice. Or possibly str(pattern.expanduser()) for consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 06:57:49 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 11:57:49 +0000 Subject: [issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro` In-Reply-To: <1637659974.6.0.574362436807.issue45878@roundup.psfhosted.org> Message-ID: <1637755069.85.0.0482705613141.issue45878@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27985 pull_request: https://github.com/python/cpython/pull/29748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 07:04:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 12:04:44 +0000 Subject: [issue32082] atexit module: allow getting/setting list of handlers directly In-Reply-To: <1511171681.08.0.213398074469.issue32082@psf.upfronthosting.co.za> Message-ID: <1637755484.96.0.582704255847.issue32082@roundup.psfhosted.org> Irit Katriel added the comment: Yes, I agree this should be closed as a duplicate of issue17186. The shortcut for updating the list of handlers is not really necessary because the API already allows you to do this. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> no way to introspect registered atexit handlers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 07:18:24 2021 From: report at bugs.python.org (Kumar Aditya) Date: Wed, 24 Nov 2021 12:18:24 +0000 Subject: [issue25066] Better repr for multiprocessing.synchronize objects In-Reply-To: <1441945512.28.0.268911334925.issue25066@psf.upfronthosting.co.za> Message-ID: <1637756304.62.0.579060721792.issue25066@roundup.psfhosted.org> Change by Kumar Aditya : ---------- keywords: +patch nosy: +kumaraditya303 nosy_count: 7.0 -> 8.0 pull_requests: +27986 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 07:24:12 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Nov 2021 12:24:12 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637756652.55.0.55206028565.issue45889@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm not sure what your code tries to accomplish, does it check that ``f.parent`` refers to the same location as ``ref_file``? A clearer solution for that would be ``f.parent.resolve() == ref_file.resolve()``. ---- The argument to match, glob and rglob cannot be Paths because the argument is not a path but a pattern. Those are conceptually different. What would ``Path("dir/some.py").match(Path("*.py"))`` return? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 07:38:57 2021 From: report at bugs.python.org (Nick Papior) Date: Wed, 24 Nov 2021 12:38:57 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637757537.04.0.428283746723.issue45889@roundup.psfhosted.org> Nick Papior added the comment: It basically checks that some part of the path is the same as some part of a reference path, they need not have the same complete parent which is why the resolve command would negate this comparison always. ------ As for your last example, that will be quite easily handled: > would ``Path("dir/some.py").match(Path("*.py"))`` return? str(Path("*.py")) == "*.py" So no problems here. It would even allow users for easier combination of patterns suffix_path = Path("*.py") if path.match("home" / suffix_path): elif path.match("other" / suffix_path): The equivalent code would have been: suffix_path = "*.py" if path.match(os.path.join("home", suffix_path): elif path.match(os.path.join("other", suffix_path): I think the former does not infer any confusion, nor does it seem to me to introduce anything that contradicts the meaning of match/glob/rglob. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 07:56:18 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 24 Nov 2021 12:56:18 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637758578.8.0.546462113734.issue45889@roundup.psfhosted.org> Ronald Oussoren added the comment: I don't think our opinions about this will converge, I'm therefore leaving this discussion. >> would ``Path("dir/some.py").match(Path("*.py"))`` return? > > str(Path("*.py")) == "*.py" > > So no problems here. I do think this is a problem, treating a Path like an pattern feels wrong to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 07:58:33 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Nov 2021 12:58:33 +0000 Subject: [issue43475] Worst-case behaviour of hash collision with float NaN In-Reply-To: <1615474533.28.0.166606930148.issue43475@roundup.psfhosted.org> Message-ID: <1637758713.08.0.254565968952.issue43475@roundup.psfhosted.org> Mark Dickinson added the comment: @cwg: Yep, we're aware of this. There are no good solutions here - only a mass of constraints, compromises and trade-offs. I think we're already somewhere on the Pareto boundary of the "best we can do" given the constraints. Moving to another point on the boundary doesn't seem worth the code churn. What concrete action would you propose that the Python core devs take at this point? > it was possible to convert a tuple of floats into a numpy array and back into a tuple, and the hash values of both tuples would be equal. This is no longer the case. Sure, but the problem isn't really with hash; that's just a detail. It lies deeper than that - it's with containment itself: >>> import numpy as np >>> import math >>> x = math.nan >>> some_list = [1.5, 2.3, x] >>> x in some_list True >>> x in list(np.array(some_list)) # expect True, get False False The result of the change linked to this PR is that the hash now also reflects that containment depends on object identity, not just object value. Reverting the change would solve the superficial hash problem, but not the underlying containment problem, and would re-introduce the performance issue that was fixed here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 08:04:10 2021 From: report at bugs.python.org (noobie1000) Date: Wed, 24 Nov 2021 13:04:10 +0000 Subject: [issue45891] bool variable isinstance of int Message-ID: <1637759050.81.0.989804439301.issue45891@roundup.psfhosted.org> New submission from noobie1000 : Hello, Recently I observed that isinstance(x, int) returns True, even when x is defined as a bool. While I understand that internally, a bool is treated as an int with values 0 and 1; to me, this is a bit misleading that the python interpreter returns True when we perform the isinstance() check. May be I'm missing some deeper explanation. Could someone please shed some light on this. Has this been discussed by the community in the past. Thank you very much for reading this ticket. >>> x = True >>> isinstance(x, int) True ---------- components: IO messages: 406926 nosy: noobie1000 priority: normal severity: normal status: open title: bool variable isinstance of int type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 08:04:30 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Nov 2021 13:04:30 +0000 Subject: [issue43475] Worst-case behaviour of hash collision with float NaN In-Reply-To: <1615474533.28.0.166606930148.issue43475@roundup.psfhosted.org> Message-ID: <1637759070.2.0.384632582119.issue43475@roundup.psfhosted.org> Mark Dickinson added the comment: Just for fun: I gave a somewhat ranty 10-minute talk on this topic at a (virtual) conference a few months ago: https://www.youtube.com/watch?v=01oeosRVwgY ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 08:46:50 2021 From: report at bugs.python.org (Christoph Groth) Date: Wed, 24 Nov 2021 13:46:50 +0000 Subject: [issue43475] Worst-case behaviour of hash collision with float NaN In-Reply-To: <1615474533.28.0.166606930148.issue43475@roundup.psfhosted.org> Message-ID: <1637761610.4.0.229899843413.issue43475@roundup.psfhosted.org> Christoph Groth added the comment: > What concrete action would you propose that the Python core devs take at this point? Nothing for now. I stumbled across this issue through https://gitlab.kwant-project.org/kwant/tinyarray/-/issues/20 and had the impression that the aspect that I raised (that, for example, hash values of immutable built-in objects now no longer survive pickling) was not examined in this otherwise in-depth discussion. So I added it for reference. If problems come up that are caused by this change, I would consider reverting it a possible solution. > The result of the change linked to this PR is that the hash now also reflects that containment depends on object identity, not just object value. This is a nice way to phrase it. Thanks for the link to the entertaining talk. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 08:47:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 13:47:37 +0000 Subject: [issue45891] bool variable isinstance of int In-Reply-To: <1637759050.81.0.989804439301.issue45891@roundup.psfhosted.org> Message-ID: <1637761657.4.0.78069234152.issue45891@roundup.psfhosted.org> Christian Heimes added the comment: This is the expected behavior. The bool type is a subtype of int. True is int 1 in disguise and False is int 0. >>> bool.__mro__ (, , ) >>> True == 1 True >>> True == 2 False >>> False == 0 True ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 08:53:03 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 24 Nov 2021 13:53:03 +0000 Subject: [issue45885] Specialize COMPARE_OP In-Reply-To: <1637701224.16.0.881347004039.issue45885@roundup.psfhosted.org> Message-ID: <1637761983.23.0.607890096523.issue45885@roundup.psfhosted.org> Mark Shannon added the comment: Is COMPARE_OP worth specializing by itself? Most comparisons are followed by a jump, and much of the overhead is in the branching around the choice of operator as well as pushing and popping (with inc/decrefs) a value that has only one bit of information (True/False). ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 09:04:13 2021 From: report at bugs.python.org (Nick Papior) Date: Wed, 24 Nov 2021 14:04:13 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637762653.68.0.740942657119.issue45889@roundup.psfhosted.org> Nick Papior added the comment: Thanks for the discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 09:18:47 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 24 Nov 2021 14:18:47 +0000 Subject: [issue45891] bool variable isinstance of int In-Reply-To: <1637759050.81.0.989804439301.issue45891@roundup.psfhosted.org> Message-ID: <1637763527.16.0.059318540169.issue45891@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi noobie1000, This is not a general forum for asking questions about Python's design or language, this is for reporting bugs. There are many forums where you can ask "Why" questions and ask for the community to "shed some light on this", such as Reddit's r/python, the various mailing lists, Discuss, IRC, etc. In future please use them rather than the bug tracker. Regarding bool, you can start by reading this: https://www.python.org/dev/peps/pep-0285/ If that doesn't answer your questions, please feel free to take them to the many different forums here: https://www.python.org/community/forums/ https://www.python.org/community/lists/ https://www.python.org/community/irc/ ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 09:28:48 2021 From: report at bugs.python.org (noobie1000) Date: Wed, 24 Nov 2021 14:28:48 +0000 Subject: [issue45891] bool variable isinstance of int In-Reply-To: <1637759050.81.0.989804439301.issue45891@roundup.psfhosted.org> Message-ID: <1637764128.17.0.359150644584.issue45891@roundup.psfhosted.org> noobie1000 added the comment: Hello Steven, Sorry, this is my first ever post and was lost in the enormity of issues/documentation. Noted your points :) Thank you. ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 09:30:23 2021 From: report at bugs.python.org (noobie1000) Date: Wed, 24 Nov 2021 14:30:23 +0000 Subject: [issue45891] bool variable isinstance of int In-Reply-To: <1637759050.81.0.989804439301.issue45891@roundup.psfhosted.org> Message-ID: <1637764223.51.0.149829473482.issue45891@roundup.psfhosted.org> Change by noobie1000 : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 09:37:42 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Nov 2021 14:37:42 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637764662.45.0.510724636603.issue45822@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27987 pull_request: https://github.com/python/cpython/pull/29750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 10:31:12 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 24 Nov 2021 15:31:12 +0000 Subject: [issue45760] Remove "PyNumber_InMatrixMultiply" In-Reply-To: <1636418955.82.0.973177651555.issue45760@roundup.psfhosted.org> Message-ID: <1637767872.39.0.609465459206.issue45760@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch nosy: +corona10 nosy_count: 3.0 -> 4.0 pull_requests: +27988 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 10:55:50 2021 From: report at bugs.python.org (Alex) Date: Wed, 24 Nov 2021 15:55:50 +0000 Subject: [issue45892] Improve REPL with the underscore separators for int/float Message-ID: <1637769350.02.0.325532195868.issue45892@roundup.psfhosted.org> New submission from Alex : I often use to the Python REPL to perform some simple calculations (typically some combinatorial or probabilities computation). I believe it would be a nice improvement if the number displayed in the REPL would be formatted as if f"{result:_}" was given (with the underscore separators). For example: >>> 36 ** 7 78_364_164_096 As I understand things: * the REPL always shows the __repr__ * updating the __repr__ for int/float is a no-no for backward compatibility reasons If these assumptions are correct (please correct me if this is wrong), then I guess this cannot be implemented, unless I missed something? ---------- components: Interpreter Core messages: 406934 nosy: alexprengere priority: normal severity: normal status: open title: Improve REPL with the underscore separators for int/float type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 11:13:08 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 16:13:08 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1637770388.71.0.633443232705.issue45881@roundup.psfhosted.org> Christian Heimes added the comment: bpo-45886 addresses the cross build issue with freeze_module command. The wrong header files come from the fact that setup.py uses CC variable from sysconfig instead of environment. The sysconfig variable contains the C compiler of the build interpreter instead of the host interpreter. The correct value is in os.environ. ---------- dependencies: +Fix Program/_freeze_module for cross compiling Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 11:18:41 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 16:18:41 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1637770721.76.0.288462348342.issue45881@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27989 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 11:20:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 16:20:06 +0000 Subject: [issue3232] Wrong str->bytes conversion in Lib/encodings/idna.py In-Reply-To: <1214701412.5.0.118957128053.issue3232@psf.upfronthosting.co.za> Message-ID: <1637770806.85.0.9103864796.issue3232@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 11:23:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 16:23:06 +0000 Subject: [issue17179] Misleading error from type() when passing unknown keyword argument In-Reply-To: <1360571201.2.0.86006347662.issue17179@psf.upfronthosting.co.za> Message-ID: <1637770986.66.0.127389915282.issue17179@roundup.psfhosted.org> Irit Katriel added the comment: This seems to have been fixed by now. I get this on 3.11: >>> from types import new_class >>> from datetime import datetime >>> new_class('tdatetime', (datetime, ), kwds={'foo':'bar'}) Traceback (most recent call last): File "", line 1, in File "/Users/iritkatriel/src/cpython-1/Lib/types.py", line 77, in new_class return meta(name, resolved_bases, ns, **kwds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: tdatetime.__init_subclass__() takes no keyword arguments ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 11:38:33 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Nov 2021 16:38:33 +0000 Subject: [issue45892] Improve REPL with the underscore separators for int/float In-Reply-To: <1637769350.02.0.325532195868.issue45892@roundup.psfhosted.org> Message-ID: <1637771913.81.0.423788677718.issue45892@roundup.psfhosted.org> Eric V. Smith added the comment: We can't change the repr of int/float. However, you can use sys.displayhook to achieve what you want: import sys def displayhook(o): if o is None: return __builtins__._ = None if isinstance(o, (int, float)): print(format(o, '_')) else: print(repr(o)) __builtins__._ = o sys.displayhook = displayhook Then: >>> 12312312 12_312_312 >>> 123123e123 1.23123e+128 >>> None >>> 'test' 'test' ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 11:39:09 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Nov 2021 16:39:09 +0000 Subject: [issue45892] Improve REPL with the underscore separators for int/float In-Reply-To: <1637769350.02.0.325532195868.issue45892@roundup.psfhosted.org> Message-ID: <1637771949.3.0.72058765912.issue45892@roundup.psfhosted.org> Eric V. Smith added the comment: Oops, the float example should be: >>> 123123.9 123_123.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 12:23:42 2021 From: report at bugs.python.org (Henry Schreiner) Date: Wed, 24 Nov 2021 17:23:42 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1637774622.47.0.250970990427.issue43112@roundup.psfhosted.org> Henry Schreiner added the comment: We had a call and have a potential path forward. Quick summary: * Add a patch on top of the current patch to make CPython look for `-gnu` on top of `-musl` for Alpine 3.15 and 3.14. Reverting the patch would break every Alpine wheel previously locally compiled (like NumPy) and would require rebuilding all shipped packages that depend on Python. * Revert the patch for CPython 3.10 in Alpine 3.16, due mid next year. * Take the existing patch (PR 24502) targeting upstream CPython 3.11 and change search to include `abi3-gnu` on musl after looking for `abi3-musl`. The ability to install both binaries into a single folder would be a new "feature" of CPython 3.11. * Optionally this could be checked and normalized by auditwheel (like changing `-musl` to `-gnu` on 3.9) if desired. ABI3 wheels targeting <3.11 could be normalized to `-gnu`. How does that sound? ---------- nosy: +Henry Schreiner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 12:42:13 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Nov 2021 17:42:13 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637775733.84.0.985234547802.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: Here's a reference for this use of round-to-odd: https://www.lri.fr/~melquion/doc/05-imacs17_1-expose.pdf I'm happy to provide any proofs that anyone feels are needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 12:44:28 2021 From: report at bugs.python.org (R. David Murray) Date: Wed, 24 Nov 2021 17:44:28 +0000 Subject: [issue45299] SMTP.send_message() does from mangling when it should not In-Reply-To: <1632718949.8.0.657238158075.issue45299@roundup.psfhosted.org> Message-ID: <1637775868.17.0.765085222893.issue45299@roundup.psfhosted.org> R. David Murray added the comment: Your backward compatibility argument is persuasive. As you say, that means the BytesGenerate docs would need to be updated to note that that parameter is the exception to the rule for backward compatibility reasons. (If it is the only exception I have to wonder if I had a backward compatibility reason for doing it that way in the first place and just forgot to document it. It is too long ago to remember. It is even possible that effectively changing the default broke mbox and that's why it is an exception :) As for the send_message change, if mangle_from_ is the only exception then I think just passing it does make sense, maybe with a comment referencing the BytesGenerator docs for mangle_from_ to explain why it is needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 12:53:41 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 17:53:41 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1637776421.97.0.194562174233.issue45881@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b30bf4520ae9d6e7eca09d812dd8a86c020b9202 by Christian Heimes in branch 'main': bpo-45881: Use CC from env first for cross building (GH-29752) https://github.com/python/cpython/commit/b30bf4520ae9d6e7eca09d812dd8a86c020b9202 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 12:58:01 2021 From: report at bugs.python.org (Zachary Ware) Date: Wed, 24 Nov 2021 17:58:01 +0000 Subject: [issue45616] Python Launcher Matches 3.10 instead of 3.1 In-Reply-To: <1635270674.96.0.337719561337.issue45616@roundup.psfhosted.org> Message-ID: <1637776681.27.0.900003711066.issue45616@roundup.psfhosted.org> Zachary Ware added the comment: Thanks for the report, Gabe! We actually ran into this in the opposite direction as well; a system with 3.1 but not 3.10 started up 3.1 for `py -3.10` causing unexpected syntax errors. The fix is now merged and will be available with the release of v3.10.1 and the next v3.11 alpha. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 12:57:55 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 17:57:55 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1637776675.53.0.813391689847.issue45881@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27990 pull_request: https://github.com/python/cpython/pull/29753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:01:05 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 18:01:05 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1637776865.43.0.396284370965.issue45881@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +27991 pull_request: https://github.com/python/cpython/pull/29754 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:01:53 2021 From: report at bugs.python.org (Zachary Ware) Date: Wed, 24 Nov 2021 18:01:53 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1637776913.37.0.0546557166116.issue44391@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, vinay.sajip, zach.ware versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:18:14 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 18:18:14 +0000 Subject: [issue45020] Freeze all modules imported during startup. In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org> Message-ID: <1637777894.2.0.924494409655.issue45020@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes nosy_count: 24.0 -> 25.0 pull_requests: +27992 pull_request: https://github.com/python/cpython/pull/29755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:18:20 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 18:18:20 +0000 Subject: [issue45020] Freeze all modules imported during startup. In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org> Message-ID: <1637777900.64.0.00314621835433.issue45020@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes, christian.heimes nosy_count: 24.0 -> 25.0 pull_requests: +27992, 27993 pull_request: https://github.com/python/cpython/pull/29755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:18:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 18:18:22 +0000 Subject: [issue45020] Freeze all modules imported during startup. In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org> Message-ID: <1637777902.58.0.16877127396.issue45020@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes, christian.heimes, christian.heimes nosy_count: 24.0 -> 25.0 pull_requests: +27992, 27993, 27994 pull_request: https://github.com/python/cpython/pull/29755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:25:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Nov 2021 18:25:14 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637778314.94.0.541391427275.issue45727@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +27995 pull_request: https://github.com/python/cpython/pull/29757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:30:14 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 18:30:14 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637778614.02.0.365177405509.issue45822@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27996 pull_request: https://github.com/python/cpython/pull/29758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:30:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Nov 2021 18:30:14 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637778614.33.0.0391491338109.issue45822@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset abfc794bbf2c6a0939ddd81b6e700c46944ba87a by Pablo Galindo Salgado in branch 'main': bpo-45822: Minor cleanups to the test_Py_CompileString test (GH-29750) https://github.com/python/cpython/commit/abfc794bbf2c6a0939ddd81b6e700c46944ba87a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:30:20 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 18:30:20 +0000 Subject: [issue45822] Py_CompileString does not respect the coding cookie with the new parser if flags are empty In-Reply-To: <1637091566.73.0.796016842609.issue45822@roundup.psfhosted.org> Message-ID: <1637778620.28.0.682686614188.issue45822@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +27997 pull_request: https://github.com/python/cpython/pull/29759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:50:21 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 24 Nov 2021 18:50:21 +0000 Subject: [issue45893] Azure Pipelines currently failing Message-ID: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> New submission from Guido van Rossum : E.g. https://dev.azure.com/Python/cpython/_build/results?buildId=92084&view=results ---------- assignee: steve.dower components: Build messages: 406945 nosy: gvanrossum, steve.dower priority: high severity: normal status: open title: Azure Pipelines currently failing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:50:48 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 24 Nov 2021 18:50:48 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637779848.35.0.987848491982.issue45893@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:51:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Nov 2021 18:51:34 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637779894.48.0.971689192148.issue45893@roundup.psfhosted.org> Steve Dower added the comment: Seems we lost the C++ handling in Include/cpython/initconfig.h: #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif ---------- keywords: +easy (C) versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 13:59:55 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 24 Nov 2021 18:59:55 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637780395.38.0.278875167013.issue45893@roundup.psfhosted.org> Steve Dower added the comment: Also, we should define $env:IncludeUWP="true" in the Windows PR tests. That will build extra binaries every time (that we ship in the Windows Store) and would catch this issue earlier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:01:47 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 19:01:47 +0000 Subject: [issue45020] Freeze all modules imported during startup. In-Reply-To: <1630005838.27.0.743852977618.issue45020@roundup.psfhosted.org> Message-ID: <1637780507.81.0.949639891602.issue45020@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 5c4b19ec49a5fbad65a682225f7cfed8b78f2a2f by Christian Heimes in branch 'main': bpo-45020: Fix strict-prototypes warning (GH-29755) https://github.com/python/cpython/commit/5c4b19ec49a5fbad65a682225f7cfed8b78f2a2f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:02:40 2021 From: report at bugs.python.org (Thomas Kluyver) Date: Wed, 24 Nov 2021 19:02:40 +0000 Subject: [issue43806] asyncio.StreamReader hangs when reading from pipe and other process exits unexpectedly In-Reply-To: <1618143469.5.0.154132734242.issue43806@roundup.psfhosted.org> Message-ID: <1637780560.3.0.669410883078.issue43806@roundup.psfhosted.org> Thomas Kluyver added the comment: In the example script, I believe you need to close the write end of the pipe in the parent after forking: cpid = os.fork() if cpid == 0: # Write to pipe (child) else: # Parent os.close(ctx) # Read from pipe This is the same with synchronous code: os.read(prx, 1) also hangs. You only get EOF when nothing has the write end open any more. All the asyncio machinery doesn't really make any difference to this. For a similar reason, the code writing (the child, in this case) should close the read end of the pipe after forking. If the parent goes away but the child still has the read end open, then trying to write to the pipe can hang (if the buffer is already full). If the child has closed the read end, trying to write will give you a BrokenPipeError. ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:03:15 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Wed, 24 Nov 2021 19:03:15 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637780595.07.0.522686843376.issue45693@roundup.psfhosted.org> Change by Jim Crist-Harif : ---------- keywords: +patch pull_requests: +27998 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:03:36 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 24 Nov 2021 19:03:36 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637780616.36.0.739930834228.issue45893@roundup.psfhosted.org> Guido van Rossum added the comment: Christian thinks that a PR by Victor broke this (GH-29488 / bpo-39026) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:04:41 2021 From: report at bugs.python.org (Jim Crist-Harif) Date: Wed, 24 Nov 2021 19:04:41 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637780681.66.0.04582644844.issue45693@roundup.psfhosted.org> Jim Crist-Harif added the comment: Apologies for the delay here. I've pushed a documentation patch at https://github.com/python/cpython/pull/29760. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:20:15 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 19:20:15 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637781615.89.0.622512301543.issue45893@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +27999 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:21:13 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 19:21:13 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637781673.48.0.140860396649.issue45893@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: -patch type: -> compile error versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:23:36 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 19:23:36 +0000 Subject: [issue18061] m68k Python 3.3 test results In-Reply-To: <1369515304.6.0.15163680976.issue18061@psf.upfronthosting.co.za> Message-ID: <1637781816.63.0.0521114909812.issue18061@roundup.psfhosted.org> Irit Katriel added the comment: Python 3.3 is no longer maintained, and there was no activity on this for 8 years, so I am closing. If there are still issues with these tests on a current version (>= 3.9), please create a new issue. ---------- nosy: +iritkatriel resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:34:13 2021 From: report at bugs.python.org (Thomas Kluyver) Date: Wed, 24 Nov 2021 19:34:13 +0000 Subject: [issue43805] multiprocessing.Queue hangs when process on other side dies In-Reply-To: <1618141970.93.0.19986621438.issue43805@roundup.psfhosted.org> Message-ID: <1637782453.4.0.860511349058.issue43805@roundup.psfhosted.org> Thomas Kluyver added the comment: I think this is expected. The queue itself doesn't know that one particular process is meant to put data into it. It just knows that there's no data to get, so .get() blocks as the docs say it should. This doesn't apply to issue22393, because the pool knows about its worker processes, so if one dies before completing a task, it can know something is wrong. You could add a method to 'half close' a queue, so it can only be used for receiving, but not sending. If you called this in the parent process after starting the child, then if the child died, the queue would know that nothing could ever put data into it, and .get() could error. The channels API in Trio allows this, and it's the same idea I've just described at the OS level in issue43806. ---------- nosy: +takluyver _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:44:15 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 19:44:15 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637783055.29.0.586140300804.issue45693@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28000 pull_request: https://github.com/python/cpython/pull/29762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:44:19 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 19:44:19 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637783059.35.0.0359171097174.issue45693@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28001 pull_request: https://github.com/python/cpython/pull/29763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:44:23 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 19:44:23 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637783063.53.0.393381981285.issue45693@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28002 pull_request: https://github.com/python/cpython/pull/29764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:44:08 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 19:44:08 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637783048.34.0.855845760694.issue45693@roundup.psfhosted.org> miss-islington added the comment: New changeset d71c7bc7339eb82de493c66ebbbfa1cad250ac78 by Jim Crist-Harif in branch 'main': bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760) https://github.com/python/cpython/commit/d71c7bc7339eb82de493c66ebbbfa1cad250ac78 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 14:59:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 24 Nov 2021 19:59:51 +0000 Subject: [issue10552] Tools/unicode/gencodec.py error In-Reply-To: <1290889753.14.0.0688566147025.issue10552@psf.upfronthosting.co.za> Message-ID: <1637783991.6.0.908498940046.issue10552@roundup.psfhosted.org> Irit Katriel added the comment: I don't think Martin's patch has been applied. Is it needed? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:12:16 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 20:12:16 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637784736.17.0.216970263588.issue45893@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f4afc53bf68c8ded20b281cd1baa88a679b4a3fd by Christian Heimes in branch 'main': bpo-45893: Add missing extern C to initconfig.h (GH-29761) https://github.com/python/cpython/commit/f4afc53bf68c8ded20b281cd1baa88a679b4a3fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:12:20 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 20:12:20 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637784740.04.0.586555941589.issue45893@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28003 pull_request: https://github.com/python/cpython/pull/29765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:35:15 2021 From: report at bugs.python.org (Amos Anderson) Date: Wed, 24 Nov 2021 20:35:15 +0000 Subject: [issue45894] exception lost when loop.stop() in finally Message-ID: <1637786115.42.0.981078468976.issue45894@roundup.psfhosted.org> New submission from Amos Anderson : I found a case where an exception is lost if the loop is stopped in a `finally`. ``` import asyncio import logging logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger() async def method_that_raises(): loop = asyncio.get_event_loop() try: logger.info("raising exception") raise ValueError("my exception1") # except Exception as e: # logger.info("in catcher") # logger.exception(e) # raise finally: logger.info("stopped") loop.stop() # await asyncio.sleep(0.5) return async def another_level(): try: await method_that_raises() except Exception as e: logger.info("trapping from another_level") logger.exception(e) if __name__ == "__main__": logger.info("start") try: asyncio.run(another_level()) except Exception as e: logger.exception(e) logger.info("done") ``` gives this output in python 3.10.0 and 3.8.10 (tested in Ubuntu Windows Subsystem Linux) and 3.8.11 in Windows: ``` INFO:root:start DEBUG:asyncio:Using selector: EpollSelector INFO:root:raising exception INFO:root:stopped INFO:root:done ``` i.e., no evidence an exception was raised (other than the log message included to prove one was raised) If I remove the `return`, then the exception propagates as expected. I believe the exception should be propagated regardless of whether there's a `return` in the `finally` block. ---------- components: asyncio messages: 406957 nosy: Amos.Anderson, asvetlov, yselivanov priority: normal severity: normal status: open title: exception lost when loop.stop() in finally type: behavior versions: Python 3.10, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:39:55 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Nov 2021 20:39:55 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637786395.17.0.709809789819.issue45693@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 8cabcde8d66bfd8abc98b862c93c66946f8514a1 by Miss Islington (bot) in branch '3.10': bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760) (GH-29762) https://github.com/python/cpython/commit/8cabcde8d66bfd8abc98b862c93c66946f8514a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:40:13 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Nov 2021 20:40:13 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637786413.83.0.251945807316.issue45693@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 151c9bf649a049f52df388a8f2390988949abf59 by Miss Islington (bot) in branch '3.9': bpo-45693: Document `port` parameter to `loop.create_server` (GH-29760) (GH-29763) https://github.com/python/cpython/commit/151c9bf649a049f52df388a8f2390988949abf59 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:40:55 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Nov 2021 20:40:55 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637786455.11.0.0970524594423.issue45693@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks for the PR, @jcristharif. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:41:12 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Nov 2021 20:41:12 +0000 Subject: [issue45693] `loop.create_server` with port=0 uses different ports for ipv4 & ipv6 In-Reply-To: <1635877955.05.0.115164279782.issue45693@roundup.psfhosted.org> Message-ID: <1637786472.37.0.607021683142.issue45693@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.11 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:54:26 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Nov 2021 20:54:26 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637787266.72.0.957886809982.issue45727@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +28004 pull_request: https://github.com/python/cpython/pull/29767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 15:55:56 2021 From: report at bugs.python.org (Amos Anderson) Date: Wed, 24 Nov 2021 20:55:56 +0000 Subject: [issue45894] exception lost when loop.stop() in finally In-Reply-To: <1637786115.42.0.981078468976.issue45894@roundup.psfhosted.org> Message-ID: <1637787356.13.0.636054000901.issue45894@roundup.psfhosted.org> Amos Anderson added the comment: If I do this instead: ``` try: logger.info("raising exception") raise ValueError("my exception1") finally: logger.info("stopped") loop.stop() await asyncio.sleep(0.5) ``` i.e., do an `await` instead of a `return`, then the original exception is also lost: ``` INFO:root:start DEBUG:asyncio:Using selector: EpollSelector INFO:root:raising exception INFO:root:stopped ERROR:root:Event loop stopped before Future completed. Traceback (most recent call last): File "test.py", line 37, in asyncio.run(another_level()) File "/home/amos/miniconda3/lib/python3.8/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/home/amos/miniconda3/lib/python3.8/asyncio/base_events.py", line 614, in run_until_complete raise RuntimeError('Event loop stopped before Future completed.') RuntimeError: Event loop stopped before Future completed. INFO:root:done ``` it's also a bit surprising that my handler in `another_level` didn't see either exception, but I'm not really sure what I'd expect in that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 16:30:36 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 24 Nov 2021 21:30:36 +0000 Subject: [issue45894] exception lost when loop.stop() in finally In-Reply-To: <1637786115.42.0.981078468976.issue45894@roundup.psfhosted.org> Message-ID: <1637789436.01.0.150867620172.issue45894@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not related to loop.stop() and asyncio in general. It is the return statement which eats the exception. Simpler example: >>> def f(): ... try: ... 1/0 ... finally: ... return 42 ... >>> f() 42 Return (and also break and continue) in the finally block cancel an exception if it was raised. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 16:33:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Nov 2021 21:33:14 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637789594.54.0.0601974210511.issue45893@roundup.psfhosted.org> STINNER Victor added the comment: > Seems we lost the C++ handling in Include/cpython/initconfig.h I was never in initconfig.h since the PEP 587 (PyConfig C API) was implemented. I'm not sure why the build *started* to fail on Windows. Thanks for fixing the issue ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 16:35:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 24 Nov 2021 21:35:33 +0000 Subject: [issue10552] Tools/unicode/gencodec.py error In-Reply-To: <1290889753.14.0.0688566147025.issue10552@psf.upfronthosting.co.za> Message-ID: <1637789733.31.0.269955843515.issue10552@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 16:50:04 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 21:50:04 +0000 Subject: [issue45895] _Py_Sigset_Converter used without #ifdef HAVE_SIGSET_T check Message-ID: <1637790604.74.0.0454243973029.issue45895@roundup.psfhosted.org> New submission from Christian Heimes : posixmodule.c defines _Py_Sigset_Converter() only when feature macro HAVE_SIGSET_T is set. Several use of the function miss the feature macro check and fail on platforms without sigset_t (e.g. wasm). Modules/posixmodule.c:5939:14: error: implicit declaration of function '_Py_Sigset_Converter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Modules/posixmodule.c:5952:14: error: implicit declaration of function '_Py_Sigset_Converter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] Modules/clinic/signalmodule.c.h:385:10: error: implicit declaration of function '_Py_Sigset_Converter' is invalid in C99 [-Werror,-Wimplicit-function-declaration] ---------- components: Build, Cross-Build messages: 406964 nosy: Alex.Willmer, brett.cannon, christian.heimes priority: normal severity: normal stage: needs patch status: open title: _Py_Sigset_Converter used without #ifdef HAVE_SIGSET_T check type: compile error versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 16:57:52 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Nov 2021 21:57:52 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637791072.19.0.231815409325.issue45893@roundup.psfhosted.org> miss-islington added the comment: New changeset cd85d91bc66a587ce2ba668c897a5ecf118733cc by Miss Islington (bot) in branch '3.10': bpo-45893: Add missing extern C to initconfig.h (GH-29761) https://github.com/python/cpython/commit/cd85d91bc66a587ce2ba668c897a5ecf118733cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 17:00:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Nov 2021 22:00:12 +0000 Subject: [issue45893] Azure Pipelines currently failing In-Reply-To: <1637779821.28.0.900585770279.issue45893@roundup.psfhosted.org> Message-ID: <1637791212.13.0.842917201121.issue45893@roundup.psfhosted.org> Christian Heimes added the comment: You are welcome! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 17:15:22 2021 From: report at bugs.python.org (Rob) Date: Wed, 24 Nov 2021 22:15:22 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows Message-ID: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> New submission from Rob : Hi, In the docs for the asyncio event loop, it has a note on page: https://docs.python.org/3/library/asyncio-eventloop.html#running-subprocesses "Note The default asyncio event loop on Windows does not support subprocesses. See Subprocess Support on Windows for details." Then following the link in that note to: https://docs.python.org/3/library/asyncio-platforms.html#subprocess-support-on-windows Says: "On Windows, the default event loop ProactorEventLoop supports subprocesses, whereas SelectorEventLoop does not." So the issue is, there are conflicting statements about default support for asyncio subprocesses on Windows. It seems the first statement listed above, is wrong or outdated since the default event loop on Windows is the ProactorEventLoop which does support subprocesses. Thank you! ---------- assignee: docs at python components: Documentation messages: 406967 nosy: Rob4226, docs at python priority: normal severity: normal status: open title: Conflicting statements in docs about default support for asyncio subprocesses on Windows versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 17:21:33 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Nov 2021 22:21:33 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637792493.16.0.906721905863.issue45727@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 24c10d2943c482c4d3ecc71d45df2d8c10fa5bb1 by Pablo Galindo Salgado in branch 'main': bpo-45727: Only trigger the 'did you forgot a comma' error suggestion if inside parentheses (GH-29757) https://github.com/python/cpython/commit/24c10d2943c482c4d3ecc71d45df2d8c10fa5bb1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 18:24:39 2021 From: report at bugs.python.org (Alex Willmer) Date: Wed, 24 Nov 2021 23:24:39 +0000 Subject: [issue44724] multiprocessing: the Resource Tracker process is never reaped In-Reply-To: <1627046993.43.0.654405119923.issue44724@roundup.psfhosted.org> Message-ID: <1637796279.6.0.953099925096.issue44724@roundup.psfhosted.org> Change by Alex Willmer : ---------- nosy: +Alex.Willmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 18:38:12 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 24 Nov 2021 23:38:12 +0000 Subject: [issue45892] Improve REPL with the underscore separators for int/float In-Reply-To: <1637769350.02.0.325532195868.issue45892@roundup.psfhosted.org> Message-ID: <1637797092.78.0.160017972995.issue45892@roundup.psfhosted.org> Eric V. Smith added the comment: And you can probably use sitecustomize.py to import this. Since I don't see any action item here, I'm going to close this issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 19:11:21 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 25 Nov 2021 00:11:21 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637799081.13.0.628786075169.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +28005 pull_request: https://github.com/python/cpython/pull/29768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 19:28:02 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Thu, 25 Nov 2021 00:28:02 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637800082.37.0.267217414419.issue45847@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +28006 pull_request: https://github.com/python/cpython/pull/29769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 19:34:04 2021 From: report at bugs.python.org (Amos Anderson) Date: Thu, 25 Nov 2021 00:34:04 +0000 Subject: [issue45894] exception lost when loop.stop() in finally In-Reply-To: <1637786115.42.0.981078468976.issue45894@roundup.psfhosted.org> Message-ID: <1637800444.99.0.880567147976.issue45894@roundup.psfhosted.org> Amos Anderson added the comment: Ah, thank you, Serhiy. I didn't know that, but I see that in the documentation: https://docs.python.org/3/reference/compound_stmts.html#the-try-statement But what about the 2nd case I presented where a `RuntimeError` was raised? That's the actual case I'm working on. Based on this: > If the finally clause raises another exception, the saved exception is set as the context of the new exception. My expectation is that the two exceptions would be chained. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 19:37:05 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Nov 2021 00:37:05 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637800625.26.0.490135737793.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: > Here's a reference for this use of round-to-odd: > https://www.lri.fr/~melquion/doc/05-imacs17_1-expose.pdf Thanks Mark. It looks like I'll be getting a little education over the Thanksgiving holiday :-) Shown below is the code that I'm thinking of using to test for correct rounding. Is this the right way to do it? # Verify correct rounding. Find exact values for half the distance # to the two adjacent representable floats. The unrounded function # input should fall between the exact squares of those values. for i in range(10_000_000): numerator: int = randrange(10 ** randrange(40)) + 1 denonimator: int = randrange(10 ** randrange(40)) + 1 x: Fraction = Fraction(numerator, denonimator) root: float = sqrt_frac(numerator, denonimator) r_up: float = math.nextafter(root, math.inf) half_way_up: Fraction = (Fraction(root) + Fraction(r_up)) / 2 half_way_up_squared: Fraction = half_way_up ** 2 r_down: float = math.nextafter(root, -math.inf) half_way_down: Fraction = (Fraction(root) + Fraction(r_down)) / 2 half_way_down_squared: Fraction = half_way_down ** 2 assert r_down < root < r_up assert half_way_down_squared <= x <= half_way_up_squared ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 20:01:50 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 25 Nov 2021 01:01:50 +0000 Subject: [issue45727] Parse error when missing commas is inconsistent In-Reply-To: <1636116249.02.0.999141328872.issue45727@roundup.psfhosted.org> Message-ID: <1637802110.16.0.499066722764.issue45727@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c72311d91787005713bb5daf4532a86e06496afd by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-45727: Only trigger the 'did you forgot a comma' error suggestion if inside parentheses. (GH-29767) https://github.com/python/cpython/commit/c72311d91787005713bb5daf4532a86e06496afd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 20:23:43 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 25 Nov 2021 01:23:43 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1637803423.74.0.000547526535867.issue45896@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +asvetlov, yselivanov type: -> behavior versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 20:53:51 2021 From: report at bugs.python.org (Trey Hunner) Date: Thu, 25 Nov 2021 01:53:51 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError Message-ID: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> New submission from Trey Hunner : When making a dataclass with slots=True and frozen=True, assigning to an invalid attribute raises a TypeError rather than a FrozenInstanceError: >>> from dataclasses import dataclass >>> @dataclass(frozen=True, slots=True) ... class Vector: ... x: float ... y: float ... z: float ... >>> v = Vector(1, 2, 3) >>> v.a = 4 Traceback (most recent call last): File "", line 1, in File "", line 5, in __setattr__ TypeError: super(type, obj): obj must be an instance or subtype of type ---------- messages: 406973 nosy: trey priority: normal severity: normal status: open title: Frozen dataclasses with slots raise TypeError type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 21:27:53 2021 From: report at bugs.python.org (Alex Waygood) Date: Thu, 25 Nov 2021 02:27:53 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError In-Reply-To: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> Message-ID: <1637807273.52.0.99915272989.issue45897@roundup.psfhosted.org> Alex Waygood added the comment: This looks to be due to the fact that `slots=True` leads to the creation of an entirely new class (see line 1102), meaning that in the `super(cls, self)` calls in lines 611 and 618 (in the `_frozen_get_del_attr` function, responsible for generating `__setattr__` and `__delattr__` methods), `self` is no longer an instance of `cls`. I believe this can be fixed by tweaking `_frozen_get_del_attr` so that `cls` in the generated `__setattr__` and `__delattr__` methods is dynamically computed (`cls = type(self)`), rather than read from a closure, as is currently the case. ---------- components: +Library (Lib) nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 24 22:12:58 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 25 Nov 2021 03:12:58 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError In-Reply-To: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> Message-ID: <1637809978.83.0.028728477363.issue45897@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 02:01:15 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 25 Nov 2021 07:01:15 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError In-Reply-To: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> Message-ID: <1637823675.47.0.806156080568.issue45897@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 02:01:30 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 25 Nov 2021 07:01:30 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError In-Reply-To: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> Message-ID: <1637823690.4.0.643188188784.issue45897@roundup.psfhosted.org> Change by Eric V. Smith : ---------- versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 02:19:56 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Nov 2021 07:19:56 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1637824796.87.0.252365871451.issue45896@roundup.psfhosted.org> Andrew Svetlov added the comment: You are correct, the first statement is outdated. Please feel free to make a pull request. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 02:21:39 2021 From: report at bugs.python.org (Rob) Date: Thu, 25 Nov 2021 07:21:39 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1637824899.25.0.78035535598.issue45896@roundup.psfhosted.org> Rob added the comment: Ok will do. Thanks for confirming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 03:09:41 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 08:09:41 +0000 Subject: [issue45895] _Py_Sigset_Converter used without #ifdef HAVE_SIGSET_T check In-Reply-To: <1637790604.74.0.0454243973029.issue45895@roundup.psfhosted.org> Message-ID: <1637827781.1.0.0363718509658.issue45895@roundup.psfhosted.org> Christian Heimes added the comment: The problem has been reported before in bpo-41498. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 03:14:57 2021 From: report at bugs.python.org (Julien Palard) Date: Thu, 25 Nov 2021 08:14:57 +0000 Subject: [issue42238] Deprecate suspicious.py? In-Reply-To: <1604274563.95.0.828690163802.issue42238@roundup.psfhosted.org> Message-ID: <1637828097.62.0.549258665566.issue42238@roundup.psfhosted.org> Julien Palard added the comment: A new false positive in b48ac6fe38b2fca9963b097c04cdecfc6083104e: +++ b/Misc/NEWS.d/next/Tests/2021-11-23-12-36-21.bpo-45878.eOs_Mp.rst @@ -0,0 +1,2 @@ +Test ``Lib/ctypes/test/test_functions.py::test_mro`` now uses +``self.assertRaises`` instead of ``try/except``. It's been only one month since the last true positive, so I'll still watching this closely... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 03:16:11 2021 From: report at bugs.python.org (Francesc Elies) Date: Thu, 25 Nov 2021 08:16:11 +0000 Subject: [issue45842] AddressSanitizer: bad-free - hello world c extension In-Reply-To: <1637323577.79.0.578225391074.issue45842@roundup.psfhosted.org> Message-ID: <1637828171.92.0.728472074607.issue45842@roundup.psfhosted.org> Francesc Elies added the comment: I tested the same script in ubuntu and got the following. ==1361==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD. While on windows he does not complain about ASan runtime not bein first in initial library list. Once I use LD_PRELOAD in linux. Lsan detected memory leaks, after suppressing them with LSAN_OPTIONS=detect_leaks=0, the script ran fine. So far I could not find an LD_PRELOAD equivalent in windows. I am suspecting if one would compile python with asan and run the test on windows, I would get similar results as in linux. Sadly at the moment asan suppressions doesn't seem to work on windows. I think this is not a real bug on python but the way we are loading asan-rt in windows. Once I am sure I will colse this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 03:55:51 2021 From: report at bugs.python.org (Jakub Kulik) Date: Thu, 25 Nov 2021 08:55:51 +0000 Subject: [issue44133] Some C-API symbols (e.g. Py_FrozenMain) are not always exported In-Reply-To: <1621011524.07.0.0957325647121.issue44133@roundup.psfhosted.org> Message-ID: <1637830551.68.0.211840009973.issue44133@roundup.psfhosted.org> Jakub Kulik added the comment: On Solaris (and most likely several other platforms), `PyThread_get_thread_native_id` is also not available. ---------- nosy: +kulikjak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 04:05:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 25 Nov 2021 09:05:00 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1637831100.13.0.912893278854.issue1284670@roundup.psfhosted.org> Irit Katriel added the comment: Mike, from looking at the code the change proposed here is not there, so while the patch may not apply cleanly anymore, the commits you mention do not make this issue irrelevant. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 04:08:09 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 09:08:09 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637831289.07.0.395474336111.issue41498@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch nosy: +christian.heimes nosy_count: 3.0 -> 4.0 pull_requests: +28007 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 04:29:28 2021 From: report at bugs.python.org (Alex) Date: Thu, 25 Nov 2021 09:29:28 +0000 Subject: [issue45892] Improve REPL with the underscore separators for int/float In-Reply-To: <1637769350.02.0.325532195868.issue45892@roundup.psfhosted.org> Message-ID: <1637832568.41.0.828866601455.issue45892@roundup.psfhosted.org> Alex added the comment: Thanks a lot Eric for your answers, I did not know about sys.displayhook. Now I know I can easily implement this myself, but the larger question would be: "do we want to update the default displayhook for those simple use cases". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 04:41:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 25 Nov 2021 09:41:41 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1637833301.44.0.0248614771306.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: New changeset c456dfafe9f9f6614fbcf2213a93707f0e101f4e by Irit Katriel in branch 'main': bpo-45711: use exc_value instead of exc_type to determine if exc_info is valid. Add more assertions. (GH-29627) https://github.com/python/cpython/commit/c456dfafe9f9f6614fbcf2213a93707f0e101f4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 04:53:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 25 Nov 2021 09:53:52 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1637834032.27.0.501934095258.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: Following the analysis/discussion on https://github.com/faster-cpython/ideas/issues/106: * exc_info is always normalized, so we actually will never need to create a tuple of these three values (exc_curinfo, the exception raised but not yet caught can be unnormalized, but it is not pushed/popped on the stack). * We will reduce the interpreter's exc_info representation to just the exception instance. * There are two APIs that are impacted, both in non-documented edge cases: 1. sys.exc_info()[2] can currently be different from sys.exc_info()[1].__traceback__ because changes to the latter (while an except clause is executing) don't show up in the former. This is arguably a bug, we will change it so that the type and traceback are always consistent with the exception. 2. PyErr_SetExcInfo does no arg checking, and will set exc_info to an inconsistent triplet if you ask it to. However, the exc_value arg must be an exception instance so the only thing you can do is pass in nonsensical args where the type/traceback do not match the exception. This function's purpose is to save/restore exc_info. We will make it ignore the type and traceback and document that change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 05:07:33 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 10:07:33 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637834853.73.0.106901478928.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch nosy: +christian.heimes nosy_count: 7.0 -> 8.0 pull_requests: +28008 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 05:23:16 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 10:23:16 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637835796.76.0.617180144995.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: I have added wasm32/wasm64 architectures with emscripten/wasi operating system as cross-build targets. The values are based on Rust targets: $ rustc --print target-list | grep wasm wasm32-unknown-emscripten wasm32-unknown-unknown wasm32-wasi wasm64-unknown-unknown wasm (WebAssembly) is "native instruction set" for the JavaScript VM while wasi or emscripten provide operating system facilities like memory management and I/O. ---------- nosy: +brett.cannon versions: +Python 3.11 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 05:50:43 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 10:50:43 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637837443.2.0.438729622018.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: Our config.sub is recent enough and has support for wasm32, wasm64, wasi, and emscripten: $ grep was[mi] config.sub | wasm32 | wasm64 \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 05:52:41 2021 From: report at bugs.python.org (Kumar Aditya) Date: Thu, 25 Nov 2021 10:52:41 +0000 Subject: [issue45019] Freezing modules has manual steps but could be automated. In-Reply-To: <1630004779.62.0.284599538008.issue45019@roundup.psfhosted.org> Message-ID: <1637837561.36.0.0051365205672.issue45019@roundup.psfhosted.org> Change by Kumar Aditya : ---------- nosy: +kumaraditya303 nosy_count: 6.0 -> 7.0 pull_requests: +28009 pull_request: https://github.com/python/cpython/pull/29772 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 06:14:35 2021 From: report at bugs.python.org (Oleg Iarygin) Date: Thu, 25 Nov 2021 11:14:35 +0000 Subject: [issue45019] Freezing modules has manual steps but could be automated. In-Reply-To: <1630004779.62.0.284599538008.issue45019@roundup.psfhosted.org> Message-ID: <1637838875.04.0.858842417898.issue45019@roundup.psfhosted.org> Oleg Iarygin added the comment: If a directory is renamed anyway, maybe `deepfrozen_modules` is better? `deepfreeze_modules` looks like "modules that are part of deepfreeze tool itself". Also it rhymes with `frozen_modules`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 06:25:01 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 11:25:01 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1637839501.04.0.0823297326226.issue45886@roundup.psfhosted.org> Christian Heimes added the comment: The FREEZE_MODULE trick fails with out-of-tree builds when SRCDIR contains the frozen_modules header files from a previous build. When doing OOT building, make includes the SRCDIR in the search path for dependencies (VPATH). It considers $(srcdir)/Python/frozen_modules/importlib._bootstrap_external.h as recent enough and therefore does not generate $(builddir)/Python/frozen_modules/importlib._bootstrap_external.h. The freeze_module program does not know about VPATH and looks up the file in the $(builddir) tree: $ make FREEZE_MODULE=/cpython/builddep/ubuntu-impish-x86_64/Programs/_freeze_module ... python3.9 ../../Tools/scripts/deepfreeze.py Python/frozen_modules/importlib._bootstrap_external.h -m importlib._bootstrap_external -o Python/deepfreeze/importlib._bootstrap_external.c Traceback (most recent call last): File "/cpython/builddep/wasi/../../Tools/scripts/deepfreeze.py", line 463, in main() File "/cpython/builddep/wasi/../../Tools/scripts/deepfreeze.py", line 451, in main with open(args.file, encoding="utf-8") as f: FileNotFoundError: [Errno 2] No such file or directory: 'Python/frozen_modules/importlib._bootstrap_external.h' make: *** [Makefile:1055: Python/deepfreeze/importlib._bootstrap_external.c] Error 1 $ make FREEZE_MODULE=/cpython/builddep/ubuntu-impish-x86_64/Programs/_freeze_module Python/frozen_modules/importlib._bootstrap_external.h make: '../../Python/frozen_modules/importlib._bootstrap_external.h' is up to date. I see two possible solutions for the problem: * extend ``make clean`` to also remove $(FROZEN_FILES_OUT). The make clean command is suppose to remove all files that interferes with OOT builds (see check-clean-src in Makefile.pre.in). * prefix $(FROZEN_FILES_OUT) and their targets with $(abs_builddir) to avoid VPATH lookups. abs_builddir is the absolute path to the build directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 06:28:50 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Nov 2021 11:28:50 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637839730.59.0.671660071417.issue41498@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28010 pull_request: https://github.com/python/cpython/pull/29773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 06:29:11 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 11:29:11 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637839751.14.0.0153137458436.issue41498@roundup.psfhosted.org> Christian Heimes added the comment: New changeset dc19e8698327cae3d6274b73c135375955f1d0d0 by Christian Heimes in branch 'main': bpo-41498: Fix build on platforms without sigset_t (GH-29770) https://github.com/python/cpython/commit/dc19e8698327cae3d6274b73c135375955f1d0d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 06:32:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 11:32:49 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637839969.91.0.953389706673.issue41498@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28011 pull_request: https://github.com/python/cpython/pull/29774 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 06:53:11 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Nov 2021 11:53:11 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637841191.58.0.808565419591.issue41498@roundup.psfhosted.org> miss-islington added the comment: New changeset 632d589afcaac3b8441c8c042a98e1ae452533e0 by Miss Islington (bot) in branch '3.10': [3.10] bpo-41498: Fix build on platforms without sigset_t (GH-29770) (GH-29773) https://github.com/python/cpython/commit/632d589afcaac3b8441c8c042a98e1ae452533e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 06:57:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 11:57:40 +0000 Subject: [issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols Message-ID: <1637841460.9.0.780352638967.issue45898@roundup.psfhosted.org> New submission from Christian Heimes : ctypes's cfield.c redefines a couple of symbols like ffi_type_void and others. The symbols are exported by ffi.h and libffi for more than 12 years: https://github.com/libffi/libffi/blame/e1539266e6c6dde3c99832323586f33f977d1dc0/include/ffi.h.in#L184 I think we can safely remove the symbols from the file. The idea is inspired by pyodide patch https://github.com/pyodide/pyodide/blob/main/cpython/patches/remove-duplicate-symbols-from-cfield.c.patch ---------- components: ctypes messages: 406991 nosy: christian.heimes priority: normal severity: normal status: open title: ctypes cfield.c defines duplicate ffi_type_* symbols type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:02:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 12:02:58 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637841778.6.0.236199395525.issue41498@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 71b414750eee7af98cc3cee3a64c59d48302a17a by Christian Heimes in branch '3.9': [3.9] bpo-41498: Fix build on platforms without sigset_t (GH-29770) (GH-29774) https://github.com/python/cpython/commit/71b414750eee7af98cc3cee3a64c59d48302a17a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:06:59 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 12:06:59 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637842019.61.0.621537822945.issue41498@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:15:15 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Thu, 25 Nov 2021 12:15:15 +0000 Subject: [issue45759] Improve error messages for non-matching `elif`/`else` statements In-Reply-To: <1636415498.31.0.65214367286.issue45759@roundup.psfhosted.org> Message-ID: <1637842515.69.0.0201553734531.issue45759@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- pull_requests: +28012 pull_request: https://github.com/python/cpython/pull/29775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:30:56 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Nov 2021 12:30:56 +0000 Subject: [issue45568] @asynccontextmanager is missing in decorator usage example In-Reply-To: <1634896302.66.0.162029203149.issue45568@roundup.psfhosted.org> Message-ID: <1637843456.98.0.331104498729.issue45568@roundup.psfhosted.org> miss-islington added the comment: New changeset 4dd82194f4a0e48a94191655e571b3aad1c4a22a by Zbigniew Siciarz in branch 'main': bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) https://github.com/python/cpython/commit/4dd82194f4a0e48a94191655e571b3aad1c4a22a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:35:30 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Nov 2021 12:35:30 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637843730.47.0.618858744796.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ce5a6460aebdc51a810d2755782fe8f0d7918ec2 by Victor Stinner in branch '3.10': bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29732) https://github.com/python/cpython/commit/ce5a6460aebdc51a810d2755782fe8f0d7918ec2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:41:24 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Nov 2021 12:41:24 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637844084.0.0.0705038989158.issue39026@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28013 pull_request: https://github.com/python/cpython/pull/29776 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 07:52:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Nov 2021 12:52:11 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637844731.32.0.452817801031.issue45866@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +28014 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 08:20:38 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 25 Nov 2021 13:20:38 +0000 Subject: [issue45897] Frozen dataclasses with slots raise TypeError In-Reply-To: <1637805231.22.0.691568548115.issue45897@roundup.psfhosted.org> Message-ID: <1637846438.28.0.338843446489.issue45897@roundup.psfhosted.org> Eric V. Smith added the comment: I think the error should be AttributeError, which is what you'd get if the class weren't frozen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 08:26:13 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Nov 2021 13:26:13 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1637846772.99.0.18965743326.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: I decided to exclude macros which can be used as l-value from the PEP 670, since the motivation to disallow using them as l-value is different, and I prefer to restrict PEP 670 scope. Disallowing using macros as l-value is more about hide implementation details and improving compatibility with Python implementations other than CPython, like PyPy or RustPython. The PEP 670 is restricted to advantages and disavantages of converting macros to functions (static inline or regular functions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 08:59:59 2021 From: report at bugs.python.org (Martin) Date: Thu, 25 Nov 2021 13:59:59 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1637848799.18.0.549421291231.issue43656@roundup.psfhosted.org> Martin added the comment: Irit, would you be able to take a look at the patch? --- I found another application scenario for the patch: In Numpy and Pandas, the assert_* functions in testing have a __tracebackhide__ local that advises pytest to hide the frame. With the patch in place, we could at least not display any locals if __tracebackhide__ is present. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 09:36:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 25 Nov 2021 14:36:35 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1637850995.53.0.530192962365.issue43656@roundup.psfhosted.org> Irit Katriel added the comment: While I do think this module should be more customisable than it is, I think it should be done via support for subclassing rather than injecting functions that get forwarded on as you do here. There are other issues on bpo related to customising this module, with more convincing use cases than suppressing errors. I think it?s more likely that a patch will be accepted which solves the general problem of this module being inflexible (while being backwards compatible). The patch you propose here solves a small part of the problem while making the api clunkier and it commits us to supporting this new parameter when we try to solve the general problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 09:41:25 2021 From: report at bugs.python.org (Martin) Date: Thu, 25 Nov 2021 14:41:25 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1637851285.67.0.5981979848.issue43656@roundup.psfhosted.org> Martin added the comment: Thanks for your definitive answer, this is what I was waiting for. I understand and I totally agree that subclassing is the way to go to make traceback more flexible. Would you mind linking the other issues concerning the general improvement of traceback? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 09:44:30 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 25 Nov 2021 14:44:30 +0000 Subject: [issue45299] SMTP.send_message() does from mangling when it should not In-Reply-To: <1632718949.8.0.657238158075.issue45299@roundup.psfhosted.org> Message-ID: <1637851470.52.0.972502563347.issue45299@roundup.psfhosted.org> Andrei Kulakov added the comment: R. David: `mangle_from_` is the only exception; I agree it seems likely it was done this way for backwards compatibility. Grant: do you agree with the fix to logic? Also do you agree that mangle_from_ is the only setting that's not being applied to msg generation from message policy? Would you like to work on the PR? If not, I can create the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 09:52:05 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 25 Nov 2021 14:52:05 +0000 Subject: [issue43656] TracebackException or StackSummary.extract with capture_locals=True fail to catch exceptions raised by repr() on value of frame local variable in FrameSummary.__init__. In-Reply-To: <1617010609.77.0.749976985588.issue43656@roundup.psfhosted.org> Message-ID: <1637851925.48.0.222378058732.issue43656@roundup.psfhosted.org> Irit Katriel added the comment: Try the search function on the tracker (that's what I would need to do to find what to link). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 10:16:34 2021 From: report at bugs.python.org (jhpfjyne) Date: Thu, 25 Nov 2021 15:16:34 +0000 Subject: [issue45899] NameError on if clause of class-level list comprehension Message-ID: <1637853394.9.0.0901919134045.issue45899@roundup.psfhosted.org> New submission from jhpfjyne : Accessing an attribute defined at class-level in the if clause of a list comprehension at class-level throws a NameError. >>> class Foo: ... a = ['a', 'b'] ... b = ['b', 'c'] ... c = [x for x in a if x not in b] ... Traceback (most recent call last): File "", line 1, in File "", line 4, in Foo File "", line 4, in NameError: name 'b' is not defined ---------- components: Interpreter Core messages: 407002 nosy: jhpfjyne priority: normal severity: normal status: open title: NameError on if clause of class-level list comprehension type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 10:24:08 2021 From: report at bugs.python.org (ThiefMaster) Date: Thu, 25 Nov 2021 15:24:08 +0000 Subject: [issue45899] NameError on if clause of class-level list comprehension In-Reply-To: <1637853394.9.0.0901919134045.issue45899@roundup.psfhosted.org> Message-ID: <1637853848.56.0.617662670278.issue45899@roundup.psfhosted.org> Change by ThiefMaster : ---------- nosy: +ThiefMaster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 10:42:54 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Nov 2021 15:42:54 +0000 Subject: [issue45899] NameError on if clause of class-level list comprehension In-Reply-To: <1637853394.9.0.0901919134045.issue45899@roundup.psfhosted.org> Message-ID: <1637854974.97.0.672016619265.issue45899@roundup.psfhosted.org> Mark Dickinson added the comment: This is expected behaviour. See the docs here: https://docs.python.org/3.9/reference/executionmodel.html#resolution-of-names > The scope of names defined in a class block is limited to the class block; it does not extend to the code blocks of methods ? this includes comprehensions and generator expressions since they are implemented using a function scope. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 10:50:09 2021 From: report at bugs.python.org (Matthew Barnett) Date: Thu, 25 Nov 2021 15:50:09 +0000 Subject: [issue45899] NameError on if clause of class-level list comprehension In-Reply-To: <1637853394.9.0.0901919134045.issue45899@roundup.psfhosted.org> Message-ID: <1637855409.8.0.758310683388.issue45899@roundup.psfhosted.org> Matthew Barnett added the comment: It's not just in the 'if' clause: >>> class Foo: ... a = ['a', 'b'] ... b = ['b', 'c'] ... c = [b for x in a] ... Traceback (most recent call last): File "", line 1, in File "", line 4, in Foo File "", line 4, in NameError: name 'b' is not defined ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 10:53:03 2021 From: report at bugs.python.org (William George) Date: Thu, 25 Nov 2021 15:53:03 +0000 Subject: [issue45900] Type annotations needed for convenience functions in ipaddress module Message-ID: <1637855583.63.0.623282774553.issue45900@roundup.psfhosted.org> New submission from William George : The convenience factory functions in the ipaddress module each return one of two types (IPv4Network vs IPv6Network, etc). Modern code wants to be friendly to either stack, and these functions are great at enabling that, but current implementation blocks type inference for most (all?) IDEs. Proposal is easy enough, specifying return type of e.g. `Union[IPv4Network, IPv6Network]` for these factory functions. I believe the rest of the public interface for this module is unambiguous enough that annotations aren't needed, but if others see value they could be added easily enough. For some of these there exists a version-independent base class that could be referenced instead of a union, but it's not clear to me how well IDEs will actually honor such an annotation referencing an internal class (single-underscore). My limited testing of that didn't work well and there's no such base class for the Interface classes anyway. PR for this incomming. ---------- components: Library (Lib) messages: 407005 nosy: pmoody, wrgeorge1983 priority: normal severity: normal status: open title: Type annotations needed for convenience functions in ipaddress module type: enhancement versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 10:58:56 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 25 Nov 2021 15:58:56 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637839501.04.0.0823297326226.issue45886@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Imthink I prefer the ?make clean? extension.-- --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 11:15:49 2021 From: report at bugs.python.org (William George) Date: Thu, 25 Nov 2021 16:15:49 +0000 Subject: [issue45900] Type annotations needed for convenience functions in ipaddress module In-Reply-To: <1637855583.63.0.623282774553.issue45900@roundup.psfhosted.org> Message-ID: <1637856949.04.0.484460664245.issue45900@roundup.psfhosted.org> Change by William George : ---------- keywords: +patch pull_requests: +28015 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 11:18:39 2021 From: report at bugs.python.org (Grant Edwards) Date: Thu, 25 Nov 2021 16:18:39 +0000 Subject: [issue45299] SMTP.send_message() does from mangling when it should not In-Reply-To: <1632718949.8.0.657238158075.issue45299@roundup.psfhosted.org> Message-ID: <1637857119.9.0.608839213703.issue45299@roundup.psfhosted.org> Grant Edwards added the comment: Yes, passing the mangle_from value to BytesGenerator seems like the safest fix. It's unfortunate that BytesGenerator defaults to doing "the wrong thing" in the absence of a policy argument, but there might be code that depends on it. I've never done a PR before, but I could work on it next week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 11:50:31 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Nov 2021 16:50:31 +0000 Subject: [issue45568] @asynccontextmanager is missing in decorator usage example In-Reply-To: <1634896302.66.0.162029203149.issue45568@roundup.psfhosted.org> Message-ID: <1637859031.72.0.374249846902.issue45568@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- nosy: +asvetlov nosy_count: 3.0 -> 4.0 pull_requests: +28016 pull_request: https://github.com/python/cpython/pull/29779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 12:03:27 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Thu, 25 Nov 2021 17:03:27 +0000 Subject: [issue45299] SMTP.send_message() does from mangling when it should not In-Reply-To: <1632718949.8.0.657238158075.issue45299@roundup.psfhosted.org> Message-ID: <1637859807.46.0.69445876324.issue45299@roundup.psfhosted.org> Andrei Kulakov added the comment: Grant: sounds good! I can do the initial PR review. Note that the PR will need a test and a news entry. See the link below on authoring PRs: https://devguide.python.org/pullrequest/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 12:04:06 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Nov 2021 17:04:06 +0000 Subject: [issue45900] Type annotations needed for convenience functions in ipaddress module In-Reply-To: <1637855583.63.0.623282774553.issue45900@roundup.psfhosted.org> Message-ID: <1637859846.53.0.518260385994.issue45900@roundup.psfhosted.org> Andrew Svetlov added the comment: Typing for stdlib is provided by https://github.com/python/typeshed CPython policy discourages embedded typing declarations. ---------- nosy: +asvetlov resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 12:20:26 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Nov 2021 17:20:26 +0000 Subject: [issue45568] @asynccontextmanager is missing in decorator usage example In-Reply-To: <1634896302.66.0.162029203149.issue45568@roundup.psfhosted.org> Message-ID: <1637860826.27.0.182038978196.issue45568@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 52d10f6485a168141e7a50d68f9a9566fdd8379d by Andrew Svetlov in branch '3.10': [3.10] bpo-45568: Actually use @asynccontextmanager in usage example (GH-29151) (GH-29779) https://github.com/python/cpython/commit/52d10f6485a168141e7a50d68f9a9566fdd8379d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 12:31:47 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Nov 2021 17:31:47 +0000 Subject: [issue45568] @asynccontextmanager is missing in decorator usage example In-Reply-To: <1634896302.66.0.162029203149.issue45568@roundup.psfhosted.org> Message-ID: <1637861507.76.0.928125235635.issue45568@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 12:31:29 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 25 Nov 2021 17:31:29 +0000 Subject: [issue45568] @asynccontextmanager is missing in decorator usage example In-Reply-To: <1634896302.66.0.162029203149.issue45568@roundup.psfhosted.org> Message-ID: <1637861489.45.0.917498235198.issue45568@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 12:45:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 25 Nov 2021 17:45:45 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1637862345.83.0.831437823563.issue45711@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28017 pull_request: https://github.com/python/cpython/pull/29780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 13:36:19 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Nov 2021 18:36:19 +0000 Subject: [issue41498] Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set In-Reply-To: <1596745207.18.0.893678923913.issue41498@roundup.psfhosted.org> Message-ID: <1637865379.08.0.277680036255.issue41498@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 13:39:24 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Nov 2021 18:39:24 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637865564.57.0.387862976375.issue40280@roundup.psfhosted.org> Brett Cannon added the comment: LLVM considers `was32-wasi` an alias for `wasm32-unknown-wasi`. Verified on the WebAssembly Discover server at https://discord.com/channels/453584038356058112/596492540388179976/898618010221310062. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 13:42:44 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Nov 2021 18:42:44 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637865764.43.0.53033858462.issue40280@roundup.psfhosted.org> Brett Cannon added the comment: My last message had a couple of typos; should have been `wasm32-wasi` and "Discord", not "Discovery". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 13:48:37 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Nov 2021 18:48:37 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637866117.03.0.229073184769.issue40280@roundup.psfhosted.org> Brett Cannon added the comment: Do we need to care about our `config.guess` being updated as well? This is a totally ignorant question based on https://github.com/WebAssembly/wasi-sdk#notes-for-autoconf mentioning `config.guess`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 13:49:05 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 25 Nov 2021 18:49:05 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637866145.35.0.89540017534.issue40280@roundup.psfhosted.org> Brett Cannon added the comment: To help keep links up-to-date, Pyodide now lives at: https://github.com/pyodide/pyodide/tree/main/cpython ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 14:27:04 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 19:27:04 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1637868424.05.0.947179477807.issue33393@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes nosy_count: 3.0 -> 4.0 pull_requests: +28018 pull_request: https://github.com/python/cpython/pull/29781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 14:29:55 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 19:29:55 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637868595.73.0.12322927995.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: Our config.sub agrees with LLVM: $ ./config.sub wasm32-wasi wasm32-unknown-wasi The config.sub and config.guess scripts in main are recent enough for wasm. Just to be sure I created https://github.com/python/cpython/pull/29781 and plan to backport the changeset to 3.10 and 3.9. It's generally safe to update the files to latest version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 14:53:23 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 19:53:23 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1637870003.79.0.934564029932.issue45881@roundup.psfhosted.org> Christian Heimes added the comment: New changeset cd6d2577fadc4cc0275017f27f46b0a628216353 by Christian Heimes in branch '3.9': [3.9] bpo-45881: Use CC from env first for cross building (GH-29752) (GH-29754) https://github.com/python/cpython/commit/cd6d2577fadc4cc0275017f27f46b0a628216353 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 14:55:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 19:55:37 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1637870137.77.0.932910704229.issue33393@roundup.psfhosted.org> Christian Heimes added the comment: New changeset dfcc6ff36f8bedae420fe228312527ec3937c973 by Christian Heimes in branch 'main': bpo-33393: Update config.guess and config.sub (GH-29781) https://github.com/python/cpython/commit/dfcc6ff36f8bedae420fe228312527ec3937c973 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 15:00:17 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 20:00:17 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1637870417.27.0.141022418967.issue33393@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28019 pull_request: https://github.com/python/cpython/pull/29782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 15:00:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 20:00:21 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1637870421.13.0.870869356222.issue33393@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28020 pull_request: https://github.com/python/cpython/pull/29783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 15:24:49 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 20:24:49 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637871889.56.0.946671859628.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 1052a39b7603e4d8401a5987af0c36f4a1d0b1e4 by Christian Heimes in branch 'main': bpo-40280: Add wasm cross build targets (GH-29771) https://github.com/python/cpython/commit/1052a39b7603e4d8401a5987af0c36f4a1d0b1e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 15:49:56 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Nov 2021 20:49:56 +0000 Subject: [issue43137] webbrowser to support "gio open " In-Reply-To: <1612527994.14.0.364284995735.issue43137@roundup.psfhosted.org> Message-ID: <1637873396.66.0.689321933215.issue43137@roundup.psfhosted.org> miss-islington added the comment: New changeset 97dcab783279444ff721a301e1faca6f29fdc600 by Simon McVittie in branch 'main': bpo-43137: webbrowser: Replace gvfs-open and gnome-open with "gio open" (GH-29154) https://github.com/python/cpython/commit/97dcab783279444ff721a301e1faca6f29fdc600 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 15:55:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 20:55:56 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637873756.08.0.523508294553.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28021 pull_request: https://github.com/python/cpython/pull/29784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 16:48:25 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 21:48:25 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637876905.42.0.570327217607.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: I have uploaded my config.site override to https://gist.github.com/tiran/5ccffa28723d3e4739db848451bd9efa . It contains overrides based on pyodide and overrides for new features. I'm also getting this error with emscripten 2.0.13. _sys_shutdown is the syscall for shutdown(2) used by the socket module. error: undefined symbol: __sys_shutdown (referenced by top-level compiled C/C++ code) warning: Link with `-s LLD_REPORT_UNDEFINED` to get more information on undefined symbols warning: To disable errors for undefined symbols use `-s ERROR_ON_UNDEFINED_SYMBOLS=0` warning: ___sys_shutdown may need to be added to EXPORTED_FUNCTIONS if it arrives from a system library Error: Aborting compilation due to previous errors ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 16:51:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 21:51:12 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637877072.99.0.174448057952.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: https://github.com/emscripten-core/emscripten/issues/13393 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 16:52:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 21:52:00 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1637877120.32.0.31463472202.issue33393@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b5249349845c21a07e13888aa12c5b86c0f06c31 by Christian Heimes in branch '3.9': [3.9] bpo-33393: Update config.guess and config.sub (GH-29781) (GH-29783) https://github.com/python/cpython/commit/b5249349845c21a07e13888aa12c5b86c0f06c31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 16:52:05 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 21:52:05 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1637877125.73.0.421313105251.issue33393@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 3f565f8edf84cfe8fa3e9cbf5da7c5911acaa6f9 by Christian Heimes in branch '3.10': [3.10] bpo-33393: Update config.guess and config.sub (GH-29781) (GH-29782) https://github.com/python/cpython/commit/3f565f8edf84cfe8fa3e9cbf5da7c5911acaa6f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 16:52:33 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Nov 2021 21:52:33 +0000 Subject: [issue33393] update config.guess and config.sub In-Reply-To: <1525108484.46.0.682650639539.issue33393@psf.upfronthosting.co.za> Message-ID: <1637877153.73.0.881788571731.issue33393@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 19:36:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Nov 2021 00:36:54 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637887014.19.0.498454769686.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: Mark, would it preferable to use ldexp() to build the float? + return math.ldexp(isqrt_frac_rto(n << -2 * q, m), q) - return isqrt_frac_rto(n << -2 * q, m) / (1 << -q) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 19:42:22 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 26 Nov 2021 00:42:22 +0000 Subject: [issue44353] PEP 604 NewType In-Reply-To: <1623183708.45.0.801079090844.issue44353@roundup.psfhosted.org> Message-ID: <1637887342.97.0.154609431863.issue44353@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood nosy_count: 12.0 -> 13.0 pull_requests: +28022 pull_request: https://github.com/python/cpython/pull/29785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 22:42:08 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Nov 2021 03:42:08 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1637898128.11.0.635964986463.issue23882@roundup.psfhosted.org> Change by Inada Naoki : ---------- versions: +Python 3.11 -Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 23:10:33 2021 From: report at bugs.python.org (Tim Peters) Date: Fri, 26 Nov 2021 04:10:33 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637899833.63.0.406951961128.issue45876@roundup.psfhosted.org> Tim Peters added the comment: Note that, on Windows, ldexp() in the presence of denorms can truncate. Division rounds, so assert x / 2**i == ldexp(x, -i) can fail. >>> import math >>> d = math.nextafter(0.0, 1.0) >>> d 5e-324 >>> d3 = 7 * d # .0000...0111 >>> d3 3.5e-323 >>> d3 / 4.0 # rounds 1e-323 >>> math.ldexp(d3, -2) # truncates 5e-324 or, perhaps more dramatically, >>> d3 / 8.0, math.ldexp(d3, -3) (5e-324, 0.0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 25 23:55:23 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 26 Nov 2021 04:55:23 +0000 Subject: [issue44353] PEP 604 NewType In-Reply-To: <1623183708.45.0.801079090844.issue44353@roundup.psfhosted.org> Message-ID: <1637902523.7.0.55602933837.issue44353@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 93c65df83cef71a4bc77d71afecdec8744c4f73a by Alex Waygood in branch 'main': bpo-44353: Correct docstring for `NewType` (#29785) https://github.com/python/cpython/commit/93c65df83cef71a4bc77d71afecdec8744c4f73a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 00:19:18 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 05:19:18 +0000 Subject: [issue45619] Mentioning structural pattern matching in the list of binding In-Reply-To: <1635301679.85.0.944511615119.issue45619@roundup.psfhosted.org> Message-ID: <1637903958.66.0.153701400367.issue45619@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28023 pull_request: https://github.com/python/cpython/pull/29787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 00:19:14 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 26 Nov 2021 05:19:14 +0000 Subject: [issue45619] Mentioning structural pattern matching in the list of binding In-Reply-To: <1635301679.85.0.944511615119.issue45619@roundup.psfhosted.org> Message-ID: <1637903954.2.0.546203063745.issue45619@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset cd876c84932ecc2f7a6c41f3fc800a34d5b06b95 by Arthur Milchior in branch 'main': bpo-45619: documentation of execution model: clarify and update binding summary (#29232) https://github.com/python/cpython/commit/cd876c84932ecc2f7a6c41f3fc800a34d5b06b95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 00:36:44 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 05:36:44 +0000 Subject: [issue45619] Mentioning structural pattern matching in the list of binding In-Reply-To: <1635301679.85.0.944511615119.issue45619@roundup.psfhosted.org> Message-ID: <1637905004.76.0.0606031716565.issue45619@roundup.psfhosted.org> miss-islington added the comment: New changeset 7842aed7a7938df20b652177458407683e7f1a0b by Miss Islington (bot) in branch '3.10': bpo-45619: documentation of execution model: clarify and update binding summary (GH-29232) https://github.com/python/cpython/commit/7842aed7a7938df20b652177458407683e7f1a0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 01:16:47 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Nov 2021 06:16:47 +0000 Subject: [issue45901] store app file type ignores command-line arguments Message-ID: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> New submission from Eryk Sun : The file association for the store app uses '"%1"' for the command-line parameters. This ignores the rest of the command-line arguments, i.e. '%*'. In PC/layout/support/appxmanifest.py, the add_application() calls that add the "Python" and "PythonW" applications should be changed to use the parameters string '"%1" %*' in the file types. ---------- components: Installation, Windows messages: 407029 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: store app file type ignores command-line arguments type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 01:17:43 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 26 Nov 2021 06:17:43 +0000 Subject: [issue45619] Mentioning structural pattern matching in the list of binding In-Reply-To: <1635301679.85.0.944511615119.issue45619@roundup.psfhosted.org> Message-ID: <1637907463.4.0.00663577949568.issue45619@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 Fri Nov 26 01:54:42 2021 From: report at bugs.python.org (Kumar Aditya) Date: Fri, 26 Nov 2021 06:54:42 +0000 Subject: [issue45653] Freeze the encodings module. In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org> Message-ID: <1637909682.57.0.98925865426.issue45653@roundup.psfhosted.org> Change by Kumar Aditya : ---------- nosy: +kumaraditya303 nosy_count: 3.0 -> 4.0 pull_requests: +28024 pull_request: https://github.com/python/cpython/pull/29788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 02:26:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 07:26:58 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637911618.68.0.525059961017.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset ee1e2c604c8a66a407116d9c3e589ab0b9580c54 by Christian Heimes in branch 'main': bpo-40280: Use Setup.stdlib static for wasm builds (GH-29784) https://github.com/python/cpython/commit/ee1e2c604c8a66a407116d9c3e589ab0b9580c54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 02:57:11 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 07:57:11 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637913431.97.0.487962871356.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: There's also a potential double-rounding issue with ldexp, when the first argument is an int: ldexp(n, e) will first round n to a float, and then (again for results in the subnormal range) potentially also need to round the result. >>> n = 2**53 + 1 >>> e = -1128 >>> math.ldexp(n, e) 0.0 >>> n / (1 << -e) 5e-324 I'm a bit (but only a bit) surprised and disappointed by the Windows issue; thanks, Tim. It seems to be okay on Mac (Intel, macOS 11.6.1): >>> import math >>> d = math.nextafter(0.0, 1.0) >>> d 5e-324 >>> d3 = 7 * d >>> d3 3.5e-323 >>> d3 / 4.0 1e-323 >>> math.ldexp(d3, -2) 1e-323 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 03:49:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 08:49:24 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637916564.42.0.689896902393.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28025 pull_request: https://github.com/python/cpython/pull/29789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:36:30 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Fri, 26 Nov 2021 09:36:30 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. Message-ID: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> New submission from Ruben Vorderman : Python now uses the excellent timsort for most (all?) of its sorting. But this is not the fastest sort available for one particular use case. If the number of possible values in the array is limited, it is possible to perform a counting sort: https://en.wikipedia.org/wiki/Counting_sort. In a counting sort each value maps to an integer corresponding to its relative value. The values are then counted by using key = map_to_key(value); count_array[key]. Then from this count_array a new array of sorted values can be constructed. (See the wikipedia article for a more detailed explanation). For the python bytes and bytesarray types this is extremely simple to implement. All 256 possible values are can be directly used as keys. Rough implementation: - Use buffer protocol to get pointer to bytes/bytesarray internal c-string - Declare a count_array: Py_ssize_t[256] count_array . (use memset to set it to 0) - Iterate over the c-string and add each value to the countarray. count_array[buffer[i]] += 1 - Allocate a new bytes(array) object, or in the case of bytesarray the sorting can be performed inplace when bytesarray.sort() is used. - Iterate over the count_array. Get the number of values for each key and use memset to insert the sequences of keys into position. The most obvious way to implement this algorithm will be as bytesarray.sort() where it is sorted inplace and as bytes.sort() which returns a new sorted bytes object. This is much much faster than using bytes(sorted(bytes)). I made a quick cython implementation for speed testing here: https://github.com/rhpvorderman/bytes_sort/blob/main/bytes_sort.pyx Currently to get a sorted bytestring one has to do bytes(sorted(my_bytes)). Test results: # First make sure there is no regression when sorting an empty string $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes(sorted(b''))" 500000 loops, best of 5: 560 nsec per loop $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'')" 500000 loops, best of 5: 565 nsec per loop # Test result for very small strings $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes(sorted(b'abc'))" 500000 loops, best of 5: 628 nsec per loop $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'abc')" 500000 loops, best of 5: 578 nsec per loop # Even on a very small already sorted string, a counting sort is faster. # Test with a proper string $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes(sorted(b'Let\'s test a proper string now. One that has some value to be sorted.'))" 100000 loops, best of 5: 2.32 usec per loop $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'Let\'s test a proper string now. One that has some value to be sorted.')" 500000 loops, best of 5: 674 nsec per loop More than three times faster! ---------- components: C API messages: 407032 nosy: rhpvorderman priority: normal severity: normal status: open title: Bytes and bytesarrays can be sorted with a much faster count sort. type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:40:38 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Fri, 26 Nov 2021 09:40:38 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637919638.24.0.047920540795.issue45902@roundup.psfhosted.org> Ruben Vorderman added the comment: Also I didn't know if this should be in Component C-API or Interpreter Core. But I guess this will be implemented as C-API calls PyBytes_Sort and PyByteArray_SortInplace so I figured C-API is the correct component here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:41:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 09:41:56 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637919716.58.0.218414776834.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- dependencies: +Cross compiling on Linux is untested, undocumented, and broken, Fix Program/_freeze_module for cross compiling Python, Undefinied _Py_Sigset_Converter function when HAVE_SIGSET_T not set, ctypes cfield.c defines duplicate ffi_type_* symbols, update config.guess and config.sub _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:47:47 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 09:47:47 +0000 Subject: [issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols In-Reply-To: <1637841460.9.0.780352638967.issue45898@roundup.psfhosted.org> Message-ID: <1637920067.27.0.194347379391.issue45898@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +28026 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:51:51 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 26 Nov 2021 09:51:51 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637920311.86.0.610680611017.issue45902@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +Mark.Shannon, brett.cannon, rhettinger, serhiy.storchaka, tim.peters, vstinner, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:56:58 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Fri, 26 Nov 2021 09:56:58 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637920618.19.0.262249579765.issue45902@roundup.psfhosted.org> Ruben Vorderman added the comment: I changed the cython script a bit to use a more naive implementation without memset. Now it is always significantly faster than bytes(sorted(my_bytes)). $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'')" 500000 loops, best of 5: 495 nsec per loop $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'abc')" 500000 loops, best of 5: 519 nsec per loop $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'Let\'s test a proper string now. One that has some value to be sorted.')" 500000 loops, best of 5: 594 nsec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 04:59:40 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 09:59:40 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637920780.18.0.577620352119.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 92631a4144fba041a5fb6578620db784821dfdc5 by Victor Stinner in branch '3.9': bpo-39026: Fix Python.h when building with Xcode (GH-29488) (GH-29776) https://github.com/python/cpython/commit/92631a4144fba041a5fb6578620db784821dfdc5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 05:01:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 10:01:46 +0000 Subject: [issue39026] Include/cpython/pystate.h contains non-relative of initconfig.h include causing macOS Framework include failure In-Reply-To: <1576078444.86.0.577960577024.issue39026@roundup.psfhosted.org> Message-ID: <1637920906.11.0.876576237813.issue39026@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Gaige Paulsen for the bug report, it's now fixed. > I think GH-28612 broke Windows builds: It was related to C++ build, it's now fixed by bpo-45893. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 05:03:43 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 10:03:43 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637921023.12.0.179445415684.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: Related: https://stackoverflow.com/questions/32150888/should-ldexp-round-correctly ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 05:17:53 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 10:17:53 +0000 Subject: [issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols In-Reply-To: <1637841460.9.0.780352638967.issue45898@roundup.psfhosted.org> Message-ID: <1637921873.66.0.623672895091.issue45898@roundup.psfhosted.org> Christian Heimes added the comment: Windows tests are failing without ffi_type_ symbols: cfield.obj : error LNK2001: unresolved external symbol _ffi_type_double [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_float [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_uint32 [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_sint8 [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_uint8 [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_uint64 [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_uint16 [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] cfield.obj : error LNK2001: unresolved external symbol _ffi_type_sint16 [D:\a\cpython\cpython\PCbuild\_ctypes.vcxproj] ---------- nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 05:36:29 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 10:36:29 +0000 Subject: [issue45884] datetime.strptime incorrectly handling hours and minutes with bad format string In-Reply-To: <1637694672.86.0.81735779429.issue45884@roundup.psfhosted.org> Message-ID: <1637922989.44.0.731466952929.issue45884@roundup.psfhosted.org> Change by Christian Heimes : ---------- superseder: -> strptime %d handling of single digit day of month _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 05:50:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 10:50:37 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637923837.95.0.25231574021.issue45866@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 253b7a0a9fef1d72a4cb87b837885576e68e917c by Victor Stinner in branch 'main': bpo-45866: pegen strips directory of "generated from" header (GH-29777) https://github.com/python/cpython/commit/253b7a0a9fef1d72a4cb87b837885576e68e917c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 05:51:32 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Fri, 26 Nov 2021 10:51:32 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637923892.0.0.795563038623.issue45902@roundup.psfhosted.org> Ruben Vorderman added the comment: Sorry for the spam. I see I made a typo in the timeit script. Next time I will be more dilligent when making these kinds of reports and triple checking it before hand, and sending it once. I used -c instead of -s and now all the setup time is also included. This confounds the results. The proper test commands should be: python -m timeit -s "from bytes_sort import bytes_sort, bytearray_sort_inplace" "bytes_sort(b'My string here')" python -m timeit "bytes(sorted(b'My string here'))" Using just sorted, to purely compare the sorting algorithms without the overhead of creating a new bytes object. python -m timeit "sorted(b'My string here')" Correct comparison results # String = b'' using bytes(sorted: 188 nsec using sorted: 108 nsec using byte_sort: 125 nsec # Some overhead here, setting up the countarray # String = b'abc' using bytes(sorted: 252 nsec using sorted: 145 nsec using byte_sort: 136 nsec # Overhead compared to sorted already negated when sorting 3 items(!) # String = b'Let\'s test a proper string now. One that has some value to be sorted.' using bytes(sorted: 1830 nsec (reported as 1.83 usec) using sorted: 1550 nsec (reported as 1.55 usec) using byte_sort: 220 nsec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 05:58:01 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 10:58:01 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637924281.17.0.902553868192.issue45866@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28027 pull_request: https://github.com/python/cpython/pull/29792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 06:03:10 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 11:03:10 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637924590.26.0.286349849421.issue45902@roundup.psfhosted.org> Mark Dickinson added the comment: Can you give example use-cases for sorting a bytes or bytearray object? I see value in the intermediate object - the frequency table, but the reconstructed sorted bytes object just seems like an inefficient representation of the frequency table, and I'm not sure how it would be useful. As the wikipedia page for counting sort says, the real value is in sorting items by keys that are small integers, and the special case where the item is identical to the key isn't all that useful: > In some descriptions of counting sort, the input to be sorted is assumed to be more simply a sequence of integers itself, but this simplification does not accommodate many applications of counting sort. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 06:54:44 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 11:54:44 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637927684.75.0.170813487358.issue45902@roundup.psfhosted.org> Mark Dickinson added the comment: (Changing the issue type: as I understand it, this is a proposal for a new feature, namely new methods bytes.sort and bytearray.sort, rather than a performance improvement to an existing feature.) ---------- type: performance -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 07:05:10 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Fri, 26 Nov 2021 12:05:10 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637928310.48.0.814520378811.issue45902@roundup.psfhosted.org> Ruben Vorderman added the comment: I used it for the median calculation of FASTQ quality scores (https://en.wikipedia.org/wiki/FASTQ_format). But in the end I used the frequency table to calculate the median more quickly. So as you say, the frequency table turned out to be more useful. Having said that the usefulness depends on how many times 8-bit data is passed into sorted. (bytes,bytearrays, most python strings are 8-bit I believe). I raised this issue not because I want a .sort() method on bytes or bytearrays, but mostly because I think python's sorted function can be improved with regards to 8-bit data. I think it is an interesting thing to consider, depending on how often this occurs. For example: sorted(b'Let\'s test a proper string now. One that has some value to be sorted.') and list(bytes_sort(b'Let\'s test a proper string now. One that has some value to be sorted.')) This returns the same result (a list of integers). But the byte_sort implementation is 2.5 times faster. So sorted is not optimally implemented here. Since sorted is now basically throwing everything into list.sort an alternative codepath using bytes.sort can be considered. (If there are enough use cases for it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 07:20:20 2021 From: report at bugs.python.org (Roman Yurchak) Date: Fri, 26 Nov 2021 12:20:20 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637929220.41.0.662723981707.issue40280@roundup.psfhosted.org> Change by Roman Yurchak : ---------- nosy: +Roman Yurchak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 07:22:31 2021 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 26 Nov 2021 12:22:31 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1637929351.38.0.800891292968.issue27580@roundup.psfhosted.org> Petr Viktorin added the comment: The NUL check was around for a long time, available to be used (XKCD-1172 style) as a simple check against reading binary files. The change did break tests of distutils. Maybe it deserves a What's New entry? ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 07:23:14 2021 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 26 Nov 2021 12:23:14 +0000 Subject: [issue27580] CSV Null Byte Error In-Reply-To: <1469077368.13.0.160030895608.issue27580@psf.upfronthosting.co.za> Message-ID: <1637929394.91.0.606875440281.issue27580@roundup.psfhosted.org> Petr Viktorin added the comment: *docutils, not distutils ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 07:46:25 2021 From: report at bugs.python.org (Roman Yurchak) Date: Fri, 26 Nov 2021 12:46:25 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637930785.36.0.557990769986.issue40280@roundup.psfhosted.org> Roman Yurchak added the comment: Thanks a lot for working on this! > _sys_shutdown is the syscall for shutdown(2) used by the socket module. Yes, the issue with Emscripten is that a number of system calls are either not implemented or implemented but not tested. See a list we are using in https://github.com/pyodide/pyodide/blob/main/cpython/pyconfig.undefs.h (though things might have improved since it was created). FYI, with Emscripten, the list of CPython unit tests that are currently skipped (as of Python 3.9.5) is in https://github.com/pyodide/pyodide/blob/main/src/tests/python_tests.txt some of those are due to browser VM limitations (e.g. virtual filestem by Emscripten that's not fully POSIX compliant, no processes, no sockets, async only via the browser event loop etc), others because we are not yet using threading since not all browsers support it, and some failures probably need more investigation. Also opened https://github.com/pyodide/pyodide/issues/2000 . Let us know if there is anything we can do help with this effort. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 07:52:26 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 12:52:26 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637931146.6.0.506104188337.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28029 pull_request: https://github.com/python/cpython/pull/29794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 07:52:15 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 12:52:15 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1637931135.41.0.353981738976.issue45886@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28028 pull_request: https://github.com/python/cpython/pull/29793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 08:10:17 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 13:10:17 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637932217.98.0.436032832438.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28030 pull_request: https://github.com/python/cpython/pull/29795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 08:26:24 2021 From: report at bugs.python.org (Muhammad Farhan) Date: Fri, 26 Nov 2021 13:26:24 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637933184.89.0.554452519169.issue45795@roundup.psfhosted.org> Muhammad Farhan added the comment: Hi, Hope all of you are doing good. Looks like you guys are not interested in this issue. Can you please provide me the source code for yhe urllib, I will fix it myself ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 08:30:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 13:30:00 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637933400.56.0.0793263817371.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset d224e769b83a6a027bec8e21ee62db2b96d5af8e by Christian Heimes in branch 'main': bpo-40280: clean and ignore .wasm files (GH-29794) https://github.com/python/cpython/commit/d224e769b83a6a027bec8e21ee62db2b96d5af8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 08:52:19 2021 From: report at bugs.python.org (Roman Yurchak) Date: Fri, 26 Nov 2021 13:52:19 +0000 Subject: [issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols In-Reply-To: <1637841460.9.0.780352638967.issue45898@roundup.psfhosted.org> Message-ID: <1637934739.54.0.508296344662.issue45898@roundup.psfhosted.org> Change by Roman Yurchak : ---------- nosy: +Roman Yurchak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 08:53:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 13:53:56 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637934836.32.0.0227443020649.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: Thanks Roman, I replied on the pyodide issue tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:10:18 2021 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 26 Nov 2021 14:10:18 +0000 Subject: [issue45760] Remove "PyNumber_InMatrixMultiply" In-Reply-To: <1636418955.82.0.973177651555.issue45760@roundup.psfhosted.org> Message-ID: <1637935818.61.0.349038729435.issue45760@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset db671b010cb4662011c6e6567a1f4fcd509102b8 by Dong-hee Na in branch 'main': bpo-45760: Remove PyNumber_InMatrixMultiply (GH-29751) https://github.com/python/cpython/commit/db671b010cb4662011c6e6567a1f4fcd509102b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:10:34 2021 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 26 Nov 2021 14:10:34 +0000 Subject: [issue45760] Remove "PyNumber_InMatrixMultiply" In-Reply-To: <1636418955.82.0.973177651555.issue45760@roundup.psfhosted.org> Message-ID: <1637935834.44.0.0833833900661.issue45760@roundup.psfhosted.org> Change by Dong-hee Na : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:15:36 2021 From: report at bugs.python.org (Jon Oxtoby) Date: Fri, 26 Nov 2021 14:15:36 +0000 Subject: [issue45884] datetime.strptime incorrectly handling hours and minutes with bad format string In-Reply-To: <1637694672.86.0.81735779429.issue45884@roundup.psfhosted.org> Message-ID: <1637936136.96.0.145812858129.issue45884@roundup.psfhosted.org> Jon Oxtoby added the comment: I was indeed overlooking the note in the documentation that the leading zero is optional for some formatters when using strptime. Closing. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:16:09 2021 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 26 Nov 2021 14:16:09 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637936169.41.0.689827574599.issue40280@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:17:03 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 14:17:03 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637936223.82.0.646032821555.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 8caceb7a474bf32cddfd25fba25b531ff65f4365 by Christian Heimes in branch 'main': bpo-40280: Add configure check for socket shutdown (GH-29795) https://github.com/python/cpython/commit/8caceb7a474bf32cddfd25fba25b531ff65f4365 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:21:31 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 26 Nov 2021 14:21:31 +0000 Subject: [issue45558] shutil.copytree: Give the option to disable copystat Message-ID: <1637936491.78.0.458091867672.issue45558@roundup.psfhosted.org> New submission from Jason R. Coombs : Can you provide a description of what motivated you to change the behavior or what benefits this change would have for you or others? Do you know why others haven?t reported this need previously? ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:29:46 2021 From: report at bugs.python.org (Neil Isaac) Date: Fri, 26 Nov 2021 14:29:46 +0000 Subject: [issue13475] Add '--mainpath'/'--nomainpath' command line options to override sys.path[0] initialisation In-Reply-To: <1322181994.22.0.955887054946.issue13475@psf.upfronthosting.co.za> Message-ID: <1637936986.8.0.82256171184.issue13475@roundup.psfhosted.org> Change by Neil Isaac : ---------- nosy: +nisaac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:33:21 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 14:33:21 +0000 Subject: [issue44353] PEP 604 NewType In-Reply-To: <1623183708.45.0.801079090844.issue44353@roundup.psfhosted.org> Message-ID: <1637937201.82.0.811521321886.issue44353@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28031 pull_request: https://github.com/python/cpython/pull/29796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:43:12 2021 From: report at bugs.python.org (Jakub Wilk) Date: Fri, 26 Nov 2021 14:43:12 +0000 Subject: =?utf-8?q?=5Bissue45903=5D_What=E2=80=99s_New_In_Python_3=2E11=3A_wrong_r?= =?utf-8?q?eference_to_Signature=2Efrom=5Fcallable?= Message-ID: <1637937792.91.0.161252797195.issue45903@roundup.psfhosted.org> New submission from Jakub Wilk : says: "Removed from the inspect module: [?] the undocumented Signature.from_callable and Signature.from_function functions, deprecated since Python 3.5; use the Signature.from_callable() method instead." But Signature.from_callable can't possibly be removed and the suggested replacement at the same time. I think it should say: "? the undocumented Signature.from_builtin and ?" ---------- assignee: docs at python components: Documentation messages: 407054 nosy: docs at python, hugovk, jwilk priority: normal severity: normal status: open title: What?s New In Python 3.11: wrong reference to Signature.from_callable versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 09:58:16 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 14:58:16 +0000 Subject: [issue44353] PEP 604 NewType In-Reply-To: <1623183708.45.0.801079090844.issue44353@roundup.psfhosted.org> Message-ID: <1637938696.93.0.235584710362.issue44353@roundup.psfhosted.org> miss-islington added the comment: New changeset 3f024e27c29a57dd4f805aa2431d713ed0fe57b2 by Miss Islington (bot) in branch '3.10': bpo-44353: Correct docstring for `NewType` (GH-29785) https://github.com/python/cpython/commit/3f024e27c29a57dd4f805aa2431d713ed0fe57b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 10:17:48 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 15:17:48 +0000 Subject: [issue43137] webbrowser to support "gio open " In-Reply-To: <1612527994.14.0.364284995735.issue43137@roundup.psfhosted.org> Message-ID: <1637939868.89.0.104623879153.issue43137@roundup.psfhosted.org> Christian Heimes added the comment: gio is not available on older distros. For example I could not find it in Xenial with libglib2.0-bin 2.48.2-0ubuntu4.8. I suggest that you keep the fallbacks or seek agreement that we no longer support old distros without gio. ---------- keywords: +3.11regression -patch nosy: +christian.heimes, pablogsal priority: normal -> release blocker type: -> enhancement versions: +Python 3.11 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 10:38:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 15:38:57 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637941137.91.0.286703198395.issue45866@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b6defde2afe656db830d6fedf74ca5f6225f5928 by Victor Stinner in branch '3.10': bpo-45866: pegen strips directory of "generated from" header (GH-29777) (GH-29792) https://github.com/python/cpython/commit/b6defde2afe656db830d6fedf74ca5f6225f5928 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 10:48:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 15:48:55 +0000 Subject: [issue9436] test_sysconfig failure: build a 32-bit Python a 64-bit OS In-Reply-To: <1280591591.84.0.476083865565.issue9436@psf.upfronthosting.co.za> Message-ID: <1637941735.54.0.909114376255.issue9436@roundup.psfhosted.org> Irit Katriel added the comment: This test is disabled when platform == "win32". Does that cover this case or does it need to be disabled for platform == "win64" as well? commit db902ac0b4df295bd90109852c1abd05da831b81 Author: Brian Curtin Date: Thu Jul 22 15:38:28 2010 +0000 Skip this test as it doesn't apply to Windows. It was added for #9189 for some GCC flags. diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py index 428379c3c3..053859238d 100644 --- a/Lib/test/test_sysconfig.py +++ b/Lib/test/test_sysconfig.py @@ -277,6 +277,7 @@ def test_main(self): _main() self.assertTrue(len(output.getvalue().split('\n')) > 0) + @unittest.skipIf(sys.platform == "win32", "Does not apply to Windows") def test_ldshared_value(self): ldflags = sysconfig.get_config_var('LDFLAGS') ldshared = sysconfig.get_config_var('LDSHARED') ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 10:50:23 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 15:50:23 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637941823.13.0.15887204366.issue45902@roundup.psfhosted.org> Mark Dickinson added the comment: > If there are enough use cases for it. Well, that's the question. :-) *I* can't think of any good use cases, but maybe others can. But if we can't come up with some use cases, then this feels like a solution looking for a problem, and that makes it hard to justify both the short-term effort and the longer-term maintenance costs of adding the complexity. FWIW, given a need to efficiently compute frequency tables for reasonably long byte data, I'd probably reach first for NumPy (and numpy.bincount in particular): Python 3.10.0 (default, Nov 12 2021, 12:32:57) [Clang 12.0.5 (clang-1205.0.22.11)] Type 'copyright', 'credits' or 'license' for more information IPython 7.28.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import collections, numpy as np In [2]: t = b'MDIAIHHPWIRRPFFPFHSPSRLFDQFFGEHLLESDLFSTATSLSPFYLRPPSFLRAPSWIDTGLSEMRLEKDRFSVNLDVKHFSPEELKVKVLGDVIEVHGKHEERQDEHGFISREFHRKYRI ...: PADVDPLAITSSLSSDGVLTVNGPRKQVSGPERTIPITREEKPAVAAAPKK'; t *= 100 In [3]: %timeit np.bincount(np.frombuffer(t, np.uint8)) 32.7 ?s ? 3.15 ?s per loop (mean ? std. dev. of 7 runs, 10000 loops each) In [4]: %timeit collections.Counter(t) 702 ?s ? 25.8 ?s per loop (mean ? std. dev. of 7 runs, 1000 loops each) In [5]: %timeit sorted(t) 896 ?s ? 64.2 ?s per loop (mean ? std. dev. of 7 runs, 1000 loops each) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 10:58:23 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Nov 2021 15:58:23 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637942303.49.0.406266881557.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: Instead of calling float(), perhaps do an int/int division to match the other code path so that the function depends on only one mechanism for building the float result. - return float(_isqrt_frac_rto(n, m << 2 * q) << q) + (_isqrt_frac_rto(n, m << 2 * q) << q) / 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:01:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 16:01:16 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637942476.92.0.57851886802.issue45866@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28032 pull_request: https://github.com/python/cpython/pull/29797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:05:09 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Nov 2021 16:05:09 +0000 Subject: [issue45795] urllib http client vulnerable to DOS attack In-Reply-To: <1636732525.38.0.485782952474.issue45795@roundup.psfhosted.org> Message-ID: <1637942709.33.0.782747953815.issue45795@roundup.psfhosted.org> Senthil Kumaran added the comment: Hi Muhammad, I haven't gotten to this. urllib doesn't maintain a client state during multiple request / response. The code is available here https://github.com/python/cpython/tree/main/Lib/urllib ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:05:25 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 16:05:25 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1637942725.1.0.565096781276.issue45886@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 765b2a3ad2e8abf9a06d5e9b3802b575ec115d76 by Christian Heimes in branch 'main': bpo-45886: Fix OOT build when srcdir has frozen module headers (GH-29793) https://github.com/python/cpython/commit/765b2a3ad2e8abf9a06d5e9b3802b575ec115d76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:11:53 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 16:11:53 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637943113.04.0.0101892091202.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: [Raymond] > [...] perhaps do an int/int division to match the other code path [...] Sure, works for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:20:09 2021 From: report at bugs.python.org (Alex Waygood) Date: Fri, 26 Nov 2021 16:20:09 +0000 Subject: =?utf-8?q?=5Bissue45903=5D_What=E2=80=99s_New_In_Python_3=2E11=3A_wrong_r?= =?utf-8?q?eference_to_Signature=2Efrom=5Fcallable?= In-Reply-To: <1637937792.91.0.161252797195.issue45903@roundup.psfhosted.org> Message-ID: <1637943609.77.0.47708074771.issue45903@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:23:50 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 16:23:50 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637943830.26.0.791163487192.issue45866@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 93a540d74c654819ad04d72fcdcf827d0e259999 by Victor Stinner in branch '3.9': bpo-45866: pegen strips directory of "generated from" header (GH-29777) (GH-29792) (GH-29797) https://github.com/python/cpython/commit/93a540d74c654819ad04d72fcdcf827d0e259999 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:28:02 2021 From: report at bugs.python.org (George King) Date: Fri, 26 Nov 2021 16:28:02 +0000 Subject: [issue45904] Pasting the U00FF character into Python REPL misinterprets character Message-ID: <1637944082.95.0.645505652849.issue45904@roundup.psfhosted.org> New submission from George King : Using macOS 11.6 Terminal.app with Python 3.10.0 installed directly from python.org. I open the REPL. If I enter `char(0xff)` I get back '?' as expected (U00FF LATIN SMALL LETTER Y WITH DIAERESIS). However, If I copy this character with surrounding quotes, and then paste it into the REPL, it pastes as '' and evaluates to the empty string. If I copy it without quotes and then paste into the REPL, I see nothing. When I hit return, the prompt renders as `>>> ^M>>>`. This suggests that the character is getting misinterpreted as a control character or something. If I paste it into the terminal shell when the Python REPL is not running, it appears as the latin1 letter that I expect. If I run `python3 -c 'print("?")'` the character prints fine. It seems to me that the python REPL is setting some terminal mode that fails on this particular character. Perhaps this is a problem with the macOS readline/libedit implementation? It seems that only U00FF is problematic; U00FE and U01000 both paste in just fine. I verified that my terminal profile is set to UTF-8 encoding. I also repeated this experiment in the Kitty terminal emulator, and got identical results. Here is the readline version: >>> readline._READLINE_LIBRARY_VERSION 'EditLine wrapper' >>> readline._READLINE_RUNTIME_VERSION 1026 >>> readline._READLINE_VERSION 1026 ---------- messages: 407065 nosy: gwk priority: normal severity: normal status: open title: Pasting the U00FF character into Python REPL misinterprets character type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:29:21 2021 From: report at bugs.python.org (George King) Date: Fri, 26 Nov 2021 16:29:21 +0000 Subject: [issue45904] Pasting the U00FF character into Python REPL misinterprets character In-Reply-To: <1637944082.95.0.645505652849.issue45904@roundup.psfhosted.org> Message-ID: <1637944161.18.0.226122946311.issue45904@roundup.psfhosted.org> George King added the comment: Edit: `chr(0xff)` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:30:15 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 16:30:15 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637944215.42.0.145813464185.issue45866@roundup.psfhosted.org> STINNER Victor added the comment: It seems like all bugs reported in this issue has been fixed, so I close the issue. Thanks for the bug report ;-) > -# @generated by pegen from ./Tools/peg_generator/pegen/metagrammar.gram > +# @generated by pegen from ../../Tools/peg_generator/pegen/metagrammar.gram This issue is now fixed in 3.9, 3.10 and main branches. > ERROR: missing _freeze_module I'm no longer able to reproduce this error on an up-to-date main branch. The issue has been fixed by this change: commit 5be98e57b3c3b36d1a1176b49c73b8822c6380e7 Author: Guido van Rossum Date: Tue Nov 23 08:56:06 2021 -0800 bpo-45873: Get rid of bootstrap_python (#29717) Instead we use $(PYTHON_FOR_REGEN) .../deepfreeze.py with the frozen .h file as input, as we did for Windows in bpo-45850. We also get rid of the code that generates the .h files when make regen-frozen is run (i.e., .../make_frozen.py), and the MANIFEST file. Restore Python 3.8 and 3.9 as Windows host Python again Co-authored-by: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com> ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:39:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 16:39:47 +0000 Subject: [issue4322] function with modified __name__ uses original name when there's an arg error In-Reply-To: <1226645058.7.0.820357853432.issue4322@psf.upfronthosting.co.za> Message-ID: <1637944787.35.0.0725569826412.issue4322@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> def foo(): pass ... >>> foo.__name__ = 'bar' >>> foo(1) Traceback (most recent call last): File "", line 1, in TypeError: foo() takes 0 positional arguments but 1 was given ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:41:33 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 26 Nov 2021 16:41:33 +0000 Subject: [issue45905] Provide a C API for introspectable frames for Cython and similar tools Message-ID: <1637944893.57.0.969509870806.issue45905@roundup.psfhosted.org> New submission from Mark Shannon : See https://github.com/cython/cython/issues/4484 ---------- messages: 407069 nosy: Mark.Shannon priority: normal severity: normal status: open title: Provide a C API for introspectable frames for Cython and similar tools _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:41:51 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 26 Nov 2021 16:41:51 +0000 Subject: [issue45905] Provide a C API for introspectable frames for Cython and similar tools In-Reply-To: <1637944893.57.0.969509870806.issue45905@roundup.psfhosted.org> Message-ID: <1637944911.16.0.288532461296.issue45905@roundup.psfhosted.org> Change by Mark Shannon : ---------- assignee: -> Mark.Shannon type: -> enhancement versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:44:58 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 16:44:58 +0000 Subject: [issue22684] message.as_bytes() produces recursion depth exceeded In-Reply-To: <1413894566.0.0.84714989702.issue22684@psf.upfronthosting.co.za> Message-ID: <1637945098.27.0.780214007896.issue22684@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce this on 3.11. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:51:23 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 26 Nov 2021 16:51:23 +0000 Subject: [issue45019] Freezing modules has manual steps but could be automated. In-Reply-To: <1630004779.62.0.284599538008.issue45019@roundup.psfhosted.org> Message-ID: <1637945483.14.0.951589688031.issue45019@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset b0b10e146b1cbf9c5dfa44af116a2eeb0f210e8b by Kumar Aditya in branch 'main': bpo-45019: Cleanup module freezing and deepfreeze (#29772) https://github.com/python/cpython/commit/b0b10e146b1cbf9c5dfa44af116a2eeb0f210e8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:53:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 16:53:03 +0000 Subject: [issue32936] RobotFileParser.parse() should raise an exception when the robots.txt file is invalid In-Reply-To: <1519469593.78.0.467229070634.issue32936@psf.upfronthosting.co.za> Message-ID: <1637945583.35.0.74138419991.issue32936@roundup.psfhosted.org> Irit Katriel added the comment: Please reopen this or create a new issue if this is still a problem and you can provide the missing information. ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 11:53:52 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 26 Nov 2021 16:53:52 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637945632.14.0.189355641952.issue45902@roundup.psfhosted.org> Eric V. Smith added the comment: Given that the normal sort() machinery wouldn't use this code, I don't think there's any advantage to adding .sort() methods to bytes and bytesarray. The downside to adding these methods is the increased complexity in the stdlib. I think the better approach is to put bytes_sort on PyPI. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:12:31 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Nov 2021 17:12:31 +0000 Subject: [issue43137] webbrowser to support "gio open " In-Reply-To: <1612527994.14.0.364284995735.issue43137@roundup.psfhosted.org> Message-ID: <1637946751.08.0.583568287366.issue43137@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The next 3.10 and 3.11 releases are very soon so unfortunately if this is not fixed by then I will need to revert PR29154 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:17:53 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 17:17:53 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637947073.99.0.490532481453.issue45866@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28033 pull_request: https://github.com/python/cpython/pull/29798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:20:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 17:20:35 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637947235.89.0.113791095597.issue45902@roundup.psfhosted.org> STINNER Victor added the comment: There are other byte-like objects like memoryview or array.array (for some array types). I would suggest writing a function rather than a method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:29:34 2021 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Nov 2021 17:29:34 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1637947774.99.0.439214226548.issue45902@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 12:38:36 2021 From: report at bugs.python.org (lutecki) Date: Fri, 26 Nov 2021 17:38:36 +0000 Subject: [issue44452] Allow paths to be joined without worrying about a leading slash In-Reply-To: <1624021106.97.0.804015487667.issue44452@roundup.psfhosted.org> Message-ID: <1637948316.23.0.76027645616.issue44452@roundup.psfhosted.org> lutecki added the comment: So how this should work? I'm testing this simple example on Windows: a = Path("/a/b") b = Path("c/d") and b / a gives me WindowsPath('/a/b'). So I'm like "ok, a seems like absolute, I will test for that" but on Windows a.is_absolute() is False. ??? Regards ---------- nosy: +lutecki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:03:43 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Fri, 26 Nov 2021 18:03:43 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1637949823.23.0.728603493766.issue45847@roundup.psfhosted.org> Erlend E. Aasland added the comment: Some info regarding _multiprocessing: Modules/_multiprocessing/semaphore.c is currently conditionally included in setup.py (HAVE_SEM_OPEN && !POSIX_SEMAPHORES_NOT_ENABLED), but always included in Modules/Setup. Here's some historical bpo's (more or less) relevant to Modules/_multiprocessing/semaphore.c: - bpo-7272 - bpo-5545 - bpo-3770 Commit 99c48a8d315fe55c8e1e8eac2e01cd930cb89686 message says: Author: Hye-Shik Chang Date: Sat Jun 28 01:04:31 2008 +0000 Give information for compililation of _multiprocessing.SemLock on FreeBSD: FreeBSD's P1003.1b semaphore support is highly experimental and it's disabled by default. Even if a user loads the experimental kernel module manually, _multiprocessing doesn't work correctly due to several known incompatibilities around sem_unlink and sem_getvalue, yet. Excerpt from the FreeBSD 9.0 release notes[^1], released four years later (2012-01-12): kern.features.sysv_sem. System V semaphores support kern.features.p1003_1b_mqueue. POSIX P1003.1B message queues support kern.features.p1003_1b_semaphores. POSIX P1003.1B semaphores support kern.features.kposix_priority_scheduling POSIX P1003.1B real-time extensions I haven't checked OpenBSD or NetBSD yet. Other relevant commits: - c4920e86ef7511b4e858028e870b1811437a71d0 - 40a6164afa79f6b97e7e40e0f35f6081fde437c2 [^1]: https://www.freebsd.org/releases/9.0R/relnotes-detailed/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:20:12 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 18:20:12 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637950812.69.0.395155639088.issue45901@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +28034 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29799 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:22:55 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 18:22:55 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637950975.07.0.707061882118.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: Since I've failed to find a coherent statement and proof of the general principle I articulated anywhere online, I've included one below. (To be absolutely clear, the principle is not new - it's very well known, but oddly hard to find written down anywhere.) ---------------------- Setup: introducing jots ======================= *Notation.* R is the set of real numbers, Z is the set of integers, operators like *, / and ^ have their mathematical interpretations, not Python ones. Fix a precision p > 0 and an IEEE 754 binary floating-point format with precision p; write F for the set of representable values in that format, including zeros and infinities. (We don't need NaNs, but feel free to include them if you want to.) Let rnd : R -> F be the rounding function corresponding to any of the standard IEEE 754 rounding modes. We're not ignoring overflow and underflow here: rnd is assumed to round tiny values to +/-0 and large values to +/-infinity as normal. (We only really care about round-ties-to-even, but all of the below is perfectly general.) *Definition.* For the given fixed precision p, a *jot* is a subinterval of the positive reals of the form (m 2^e, (m+1) 2^e) for some integers m and e, with m satisfying 2^p <= m < 2^(p+1). This is a definition-of-convenience, invented purely for the purposes of this proof. (And yes, the name is silly. Suggestions for a better name to replace "jot" are welcome. Naming things is hard.) We've chosen the size of a jot so that between each consecutive pair a and b of positive normal floats in F, there are exactly two jots: one spanning from a to the midpoint (a+b)/2, and another spanning from (a+b)/2 to b. (Since jots are open, the midpoint itself and the floats a and b don't belong to any jot.) Now here's the key point: for values that aren't exactly representable and aren't perfect midpoints, the standard rounding modes, whether directed or round-to-nearest, only ever care about which side of the midpoint the value to be rounded lies. In other words: *Observation.* If x and y belong to the same jot, then rnd(x) = rnd(y). This is the point of jots: they represent the wiggle-room that we have to perturb a real number without affecting the way that it rounds under any of the standard rounding modes. *Note.* Between any two consecutive *subnormal* values, we have 4 or more jots, and above the maximum representable float we have infinitely many, but the observation that rnd is constant on jots remains true at both ends of the spectrum. Also note that jots, as defined above, don't cover the negative reals, but we don't need them to for what follows. Here's a lemma that we'll need shortly. *Lemma.* Suppose that I is an open interval of the form (m 2^e, (m+1) 2^e) for some integers m and e satisfying 2^p <= m. Then I is either a jot, or a subinterval of a jot. *Proof.* If m < 2^(p+1) then this is immediate from the definition. In the general case, m satisfies 2^q <= m < 2^(q+1) for some integer q with p <= q. Write n = floor(m / 2^(q-p)). Then: n <= m / 2^(q-p) < n + 1, so n * 2^(q-p) <= m < (n + 1) * 2^(q-p), so n * 2^(q-p) <= m and m + 1 <= (n + 1) * 2^(q-p) so n * 2^(e+q-p) <= m * 2^e and (m + 1) * 2^e <= (n + 1) * 2^(e+q-p) So I is a subinterval of (n * 2^(e+q-p), (n+1) * 2^(e+q-p)), which is a jot. The magic of round-to-odd ========================= *Definition.* The function to-odd : R -> Z is defined by: - to-odd(x) = x if x is an integer - to-odd(x) = floor(x) if x is not an integer and floor(x) is odd - to-odd(x) = ceil(x) if x is not an integer and floor(x) is even *Properties.* Some easy monotonicity properties of to-odd, with proofs left to the reader: - If x < 2n for real x and integer n, then to-odd(x) < to-odd(2n) - If 2n < x for real x and integer n, then to-odd(2n) < to-odd(x) Here's a restatement of the main principle. *Proposition.* With p and rnd as in the previous section, suppose that x is a positive real number and that e is any integer satisfying 2^e <= x. Define a real number y by: y = 2^(e-p-1) to-odd(x / 2^(e-p-1)) Then rnd(y) = rnd(x). Proof of the principle ====================== In a nutshell, we show that either - y = x, or - x and y belong to the same jot Either way, since rnd is constant on jots, we get rnd(y) = rnd(x). Case 1: x = m * 2^(e-p) for some integer m. Then x / 2^(e-p-1) = 2m is an (even) integer, so to-odd(x / 2^(e-p-1)) = (x / 2^(e-p-1)) and y = x. Hence rnd(y) = rnd(x). Case 2: m * 2^(e-p) < x < (m + 1) * 2^(e-p) for some integer m. Then rearranging, 2m < x / 2^(e-p-1) < 2(m+1). So from the monotonicity properties of to-odd we have: 2m < to-odd(x / 2^(e-p-1)) < 2(m+1) And multiplying through by 2^(e-p-1) we get m * 2^(e-p) < y < (m+1) * 2^(e-p). So both x and y belong to the interval I = (m*2^(e-p), (m+1)*2^(e-p-1)). Furthermore, 2^e <= x < (m + 1) * 2^(e-p), so 2^p < m + 1, and 2^p <= m. So by the lemma above, I is either a jot or a subinterval of a jot, so x and y belong to the same jot and rnd(x) = rnd(y). This completes the proof. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:23:24 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 18:23:24 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637951004.47.0.953804744381.issue45901@roundup.psfhosted.org> Steve Dower added the comment: For future reference, in case someone stumbles over this issue, here's how I tested this change: * set $env:IncludeUWP="true" * did a regular PCbuild/build.bat * generated a Store layout with "./python.bat PC/layout --preset-appx --copy ./out" * mock-installed it with "Add-AppxPackage -Register ./out/appxmanifest.xml" * used "Default Programs" to change my default to the new installed Python 3.11 * put "import sys; print(sys.argv); input()" into test.py * ran "test.py arg1 arg2" and inspected the output ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:36:41 2021 From: report at bugs.python.org (Vishal Pandey) Date: Fri, 26 Nov 2021 18:36:41 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1637951801.76.0.915222439387.issue33381@roundup.psfhosted.org> Change by Vishal Pandey : ---------- keywords: +patch nosy: +vishalpandeyvip nosy_count: 5.0 -> 6.0 pull_requests: +28035 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:36:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Nov 2021 18:36:58 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1637951818.34.0.549950578347.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 4ebde73b8e416eeb1fd5d2ca3283f7ddb534c5b1 by Christian Heimes in branch 'main': bpo-40280: Move hard-coded feature checks to configure (GH-29789) https://github.com/python/cpython/commit/4ebde73b8e416eeb1fd5d2ca3283f7ddb534c5b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:37:43 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 18:37:43 +0000 Subject: [issue26577] inspect.getclosurevars returns incorrect variable when using class member with the same name as other variable In-Reply-To: <1458200430.96.0.916440482942.issue26577@psf.upfronthosting.co.za> Message-ID: <1637951863.21.0.424785341843.issue26577@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:43:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 18:43:47 +0000 Subject: [issue25341] File mode wb+ appears as rb+ In-Reply-To: <1444290178.48.0.0607111061258.issue25341@psf.upfronthosting.co.za> Message-ID: <1637952227.29.0.307117477977.issue25341@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:44:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 18:44:24 +0000 Subject: [issue26577] inspect.getclosurevars returns incorrect variable when using class member with the same name as other variable In-Reply-To: <1458200430.96.0.916440482942.issue26577@psf.upfronthosting.co.za> Message-ID: <1637952264.64.0.946333945032.issue26577@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:49:35 2021 From: report at bugs.python.org (Tim Peters) Date: Fri, 26 Nov 2021 18:49:35 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637952575.16.0.529743387951.issue45876@roundup.psfhosted.org> Tim Peters added the comment: Mark, ya, MS's Visual Studio's ldexp() has, far as I know, always worked this way. The code I showed was run under the 2019 edition, which we use to build the Windows CPython. Raymond, x = float(i) is screamingly obvious at first glance. x = i/1 looks like a coding error at first. The "reason" for different spellings in different branches looked obvious in the original: one branch needs to divide, and the other doesn't. So the original code was materially clearer to me. Both, not sure it helps, but this use of round-to-odd appears akin to the decimal module's ROUND_05UP, which rounds an operation result in such a way that, if it's rounded again - under any rounding mode - to a narrower precision, you get the same narrower result as if you had used that rounding mode on the original operation to that narrower precision to begin with. Decimal only needs to adjust the value of the last retained digit to, effectively, "encode" all possibilities, but binary needs two trailing bits. "Round" and "sticky" are great names for them :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 13:53:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 18:53:47 +0000 Subject: [issue27281] unpickling an xmlrpc.client.Fault raises TypeError In-Reply-To: <1465484956.65.0.651270200726.issue27281@psf.upfronthosting.co.za> Message-ID: <1637952827.19.0.173270572583.issue27281@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced in 3.11. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 14:06:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 19:06:12 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1637953572.28.0.168431893938.issue28422@roundup.psfhosted.org> Irit Katriel added the comment: I don't get any errors from the attached script. Is there still a problem here? ---------- nosy: +iritkatriel resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 14:33:02 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Nov 2021 19:33:02 +0000 Subject: [issue45872] Turtle: invalid example for write doc In-Reply-To: <1637602535.98.0.579349868944.issue45872@roundup.psfhosted.org> Message-ID: <1637955182.61.0.963998929467.issue45872@roundup.psfhosted.org> ?ric Araujo added the comment: The doc for the font parameter is: a triple (fontname, fontsize, fonttype) but the default value in the signature is: font='Arial' I do not know what?s font name vs font type! Do you know if it?s valid to have font='Arial', in which case the doc should be amended? or is the default value wrong? (also not sure if it?s a default value or an example) ---------- nosy: +eric.araujo title: Turtle documentation, write() -> Turtle: invalid example for write doc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 14:43:49 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 26 Nov 2021 19:43:49 +0000 Subject: [issue45889] pathlib: Path.match does not work on paths In-Reply-To: <1637740471.98.0.448189048749.issue45889@roundup.psfhosted.org> Message-ID: <1637955829.09.0.533030878333.issue45889@roundup.psfhosted.org> ?ric Araujo added the comment: FWIW I think in the same way as Ronald. A pattern is not a path, it?s a string expressing rules. If it matches, the results are paths, but that does not make the pattern a path. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 14:45:13 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 19:45:13 +0000 Subject: [issue45898] ctypes cfield.c defines duplicate ffi_type_* symbols In-Reply-To: <1637841460.9.0.780352638967.issue45898@roundup.psfhosted.org> Message-ID: <1637955913.67.0.382369250036.issue45898@roundup.psfhosted.org> Steve Dower added the comment: This is because we use libffi as a DLL and you can't statically reference dynamically loaded addresses on Windows. You could change that format table to be initialised on first use, or resolve the FFI type lazily. Or change ctypes to statically link libffi (including updating our FFI build, which IIRC is the one that requires Cygwin, to generate static libraries instead of dynamic) - we can't backport this change, either, because it affects the layout on disk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 15:07:38 2021 From: report at bugs.python.org (Some User) Date: Fri, 26 Nov 2021 20:07:38 +0000 Subject: [issue45906] Python github installatiomn issue Message-ID: <1637957258.27.0.535906199774.issue45906@roundup.psfhosted.org> New submission from Some User : Whenever i try to setup python3.9 configure via github, It raises a configure error. `` $ ./configure checking build system type... type checking host system type... type checking for python3.9... no checking for python3... no checking for python... no checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... "linux" checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... configure: error: in `/path/folder_which_contains_cpython_folder/cpython-3.9': configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details ``` ---------- components: Installation messages: 407089 nosy: mazen001.ahmed001 priority: normal severity: normal status: open title: Python github installatiomn issue type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 15:09:51 2021 From: report at bugs.python.org (Some User) Date: Fri, 26 Nov 2021 20:09:51 +0000 Subject: [issue45906] Python github installation issue In-Reply-To: <1637957258.27.0.535906199774.issue45906@roundup.psfhosted.org> Message-ID: <1637957391.27.0.374494510199.issue45906@roundup.psfhosted.org> Change by Some User : ---------- title: Python github installatiomn issue -> Python github installation issue _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 15:49:43 2021 From: report at bugs.python.org (Vilnis Termanis) Date: Fri, 26 Nov 2021 20:49:43 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1637959783.97.0.276489486574.issue28422@roundup.psfhosted.org> Vilnis Termanis added the comment: If you un-comment the print_exc() call, you'll see that it still fails - for queue.Queue: Manager failure (for Queue) Traceback (most recent call last): File "fish.py", line 74, in main add_type_in_own_process(mgr, type_name) File "fish.py", line 61, in add_type_in_own_process use_manager(obj, type_name, mgr=mgr) File "fish.py", line 35, in use_manager obj.append(getattr(mgr, type_name)()) File "", line 2, in append File "/usr/lib/python3.8/multiprocessing/managers.py", line 850, in _callmethod raise convert_to_error(kind, result) multiprocessing.managers.RemoteError: --------------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.8/multiprocessing/managers.py", line 243, in serve_client request = recv() File "/usr/lib/python3.8/multiprocessing/connection.py", line 251, in recv return _ForkingPickler.loads(buf.getbuffer()) File "/usr/lib/python3.8/multiprocessing/managers.py", line 959, in RebuildProxy return func(token, serializer, incref=incref, **kwds) TypeError: AutoProxy() got an unexpected keyword argument 'manager_owned' --------------------------------------------------------------------------- ---------- resolution: works for me -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 15:52:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 20:52:00 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1637959920.55.0.609539333343.issue28422@roundup.psfhosted.org> Irit Katriel added the comment: Version 3.8 is in security fix only mode. Is this a problem on newer versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 15:55:07 2021 From: report at bugs.python.org (Vilnis Termanis) Date: Fri, 26 Nov 2021 20:55:07 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1637960107.41.0.870205718082.issue28422@roundup.psfhosted.org> Vilnis Termanis added the comment: Apologies, my mistake - it does indeed work with 3.9 & 3.10. Feel free to close. ---------- resolution: -> works for me status: open -> pending versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 15:55:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 20:55:53 +0000 Subject: [issue28422] multiprocessing Manager mutable type member access failure In-Reply-To: <1476277427.94.0.954125704246.issue28422@psf.upfronthosting.co.za> Message-ID: <1637960153.67.0.713770399889.issue28422@roundup.psfhosted.org> Irit Katriel added the comment: Thank you. ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:02:59 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Nov 2021 21:02:59 +0000 Subject: [issue44452] Allow paths to be joined without worrying about a leading slash In-Reply-To: <1624021106.97.0.804015487667.issue44452@roundup.psfhosted.org> Message-ID: <1637960579.7.0.984937100146.issue44452@roundup.psfhosted.org> Eryk Sun added the comment: > and b / a gives me WindowsPath('/a/b'). So I'm like "ok, a seems > like absolute, I will test for that" but on Windows a.is_absolute() > is False. Path.is_absolute() is true if a path has a `root` and, for a Windows path, also a `drive`. In C++, the filesystem::path is_absolute() method is similar. In Windows it's true if both has_root_name() (i.e. a drive) and has_root_directory() are true. In POSIX it just depends on has_root_directory(). pathlib.Path is also consistent with C++ filesystem::path with regard to appending paths with the slash operator [1]. I would prefer for it to remain so. FYI, in Windows, "/a/b" is resolved using the drive of the process current working directory, which may be a UNC path. The drive of a UNC path is the share path, such as "\\server\share". Another type of relative path in Windows is a drive-relative path, which applies to drive-letter drives only. For example: >>> Path('C:spam') / "eggs" WindowsPath('C:spam/eggs') >>> Path('C:spam') / "/eggs" WindowsPath('C:/eggs') "C:spam" is relative to the current working directory on drive "C:". The API gets the working directory for the target drive either from the process current working directory, if it's a path on the target drive, or from an "=:" environment variable, such as "=Z:". (The Windows API allows environment variable names to begin with "=".) If the process current working directory is on a different drive, and the environment variable for the target drive isn't set, the API defaults to using the root directory on the target drive. Setting these per-drive working directory environment variables is up to the application. Python's os.chdir() supports them. --- [1] https://en.cppreference.com/w/cpp/filesystem/path/append ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:18:42 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Nov 2021 21:18:42 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637961522.87.0.582073077592.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: [Tim] > Note that, on Windows, ldexp() in the presence of > denorms can truncate. Division rounds, so > > assert x / 2**i == ldexp(x, -i) > > can fail. Objects/longobject.c::long_true_divide() uses ldexp() internally. Will it suffer the same issues with subnormals on Windows? Is CPython int/int true division guaranteed to be correctly rounded? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:33:18 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 21:33:18 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637962398.72.0.957827145318.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: > Will it suffer the same issues with subnormals on Windows? No, it should be fine. All the rounding has already happened at the point where ldexp is called, and the result of the ldexp call is exact. > Is CPython int/int true division guaranteed to be correctly rounded? Funny you should ask. :-) There's certainly no documented guarantee, and there _is_ a case (documented in comments) where the current code may not return correctly rounded results on machines that use x87: there's a fast path where both numerator and denominator fit into an IEEE 754 double without rounding, and we then do a floating-point division. But we can't hit that case with the proposed code, since the numerator will always have at least 55 bits, so the fast path is never taken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:43:28 2021 From: report at bugs.python.org (Tim Peters) Date: Fri, 26 Nov 2021 21:43:28 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637963008.57.0.812258670353.issue45876@roundup.psfhosted.org> Tim Peters added the comment: > Objects/longobject.c::long_true_divide() uses ldexp() internally. > Will it suffer the same issues with subnormals on Windows? Doesn't look like it will. In context, looks like it's ensuring that ldexp can only lose trailing 0 bits, so that _whatever_ ldexp does in the way of rounding is irrelevant. But it's not doing this because of Windows - it's to prevent "double-rounding" errors regardless of platform. > Is CPython int/int true division guaranteed to be correctly rounded? If there's some promise of that in the docs, I don't know where it is. But the code clearly intends to strive for correct rounding. Ironically, PEP 238 guarantees that if it is correctly rounded, that's purely by accident ;-) : """ True division for ints and longs will convert the arguments to float and then apply a float division. That is, even 2/1 will return a float """ But i/j is emphatically not implemented via float(i)/float(j). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:46:19 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 21:46:19 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637963179.57.0.0482219202765.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: > All the rounding has already happened at the point where ldexp is called, and the result of the ldexp call is exact. Sketch of proof: [Here](https://github.com/python/cpython/blob/4ebde73b8e416eeb1fd5d2ca3283f7ddb534c5b1/Objects/longobject.c#L3929) we have: shift = Py_MAX(diff, DBL_MIN_EXP) - DBL_MANT_DIG - 2; from which (assuming IEEE 754 as usual) shift >= -1076. (DBL_MIN_EXP = -1021, DBL_MANT_DIG = 53) [Here](https://github.com/python/cpython/blob/4ebde73b8e416eeb1fd5d2ca3283f7ddb534c5b1/Objects/longobject.c#L4008) we round away the last two or three bits of x, after which x is guaranteed to be a multiple of 4: x->ob_digit[0] = low & ~(2U*mask-1U); Then after converting the PyLong x to a double dx with exactly the same value [here](https://github.com/python/cpython/blob/4ebde73b8e416eeb1fd5d2ca3283f7ddb534c5b1/Objects/longobject.c#L4020) we make the ldexp call: result = ldexp(dx, (int)shift); At this point dx is a multiple of 4 and shift >= -1076, so the result of the ldexp scaling is a multiple of 2**-1074, and in the case of a subnormal result, it's already exactly representable. For the int/int division possibly not being correctly rounded on x87, see [here](https://github.com/python/cpython/blob/4ebde73b8e416eeb1fd5d2ca3283f7ddb534c5b1/Objects/longobject.c#L3889-L3892). It won't affect _this_ application, but possibly we should fix this anyway. Though the progression of time is already effectively fixing it for us, as x87 becomes less and less relevant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:56:32 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Nov 2021 21:56:32 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637963792.86.0.909461313956.issue45866@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9a7611a7c4da6406383f8ffcea272ded6f890f1e by Victor Stinner in branch 'main': bpo-45866: Fix typo in the NEWS entry (GH-29798) https://github.com/python/cpython/commit/9a7611a7c4da6406383f8ffcea272ded6f890f1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:56:44 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 21:56:44 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637963804.82.0.432441221917.issue45866@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28037 pull_request: https://github.com/python/cpython/pull/29804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:56:40 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 21:56:40 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637963800.58.0.784525963397.issue45866@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +28036 pull_request: https://github.com/python/cpython/pull/29803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 16:59:02 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Nov 2021 21:59:02 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637963942.22.0.373827242384.issue45876@roundup.psfhosted.org> Mark Dickinson added the comment: Concrete example of int/int not being correctly rounded on systems using x87 instructions: on those systems, I'd expect to see 1/2731 return a result of 0.00036616623947272064 (0x1.7ff4005ffd002p-12), as a result of first rounding to 64-bit precision and then to 53-bit. The correctly-rounded result is 0.0003661662394727206 (0x1.7ff4005ffd001p-12). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 17:19:18 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 22:19:18 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637965158.45.0.192534674202.issue45866@roundup.psfhosted.org> miss-islington added the comment: New changeset fc16ea9c8b8769af8a4c0c16fed7eba2e8bf4019 by Miss Islington (bot) in branch '3.10': bpo-45866: Fix typo in the NEWS entry (GH-29798) https://github.com/python/cpython/commit/fc16ea9c8b8769af8a4c0c16fed7eba2e8bf4019 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 17:20:24 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 22:20:24 +0000 Subject: [issue45866] Out of tree build of Python 3.11.0a2+ breaks regen-frozen In-Reply-To: <1637580722.83.0.464484506874.issue45866@roundup.psfhosted.org> Message-ID: <1637965224.87.0.314498551684.issue45866@roundup.psfhosted.org> miss-islington added the comment: New changeset b3f14dacfea54332e2ddde792142d818b3554dbc by Miss Islington (bot) in branch '3.9': bpo-45866: Fix typo in the NEWS entry (GH-29798) https://github.com/python/cpython/commit/b3f14dacfea54332e2ddde792142d818b3554dbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 17:31:42 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Nov 2021 22:31:42 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1637965902.29.0.573114563718.issue42268@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +28038 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29806 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 17:44:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 22:44:37 +0000 Subject: [issue21944] Allow copying of CodecInfo objects In-Reply-To: <1404906729.25.0.633895333058.issue21944@psf.upfronthosting.co.za> Message-ID: <1637966677.36.0.124734442365.issue21944@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: behavior -> enhancement versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 17:54:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 22:54:28 +0000 Subject: [issue12020] [doc] Attribute error with flush on stdout,stderr In-Reply-To: <1304703877.7.0.898555574271.issue12020@psf.upfronthosting.co.za> Message-ID: <1637967268.93.0.0242536928326.issue12020@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: Attribute error with flush on stdout,stderr -> [doc] Attribute error with flush on stdout,stderr versions: +Python 3.11 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 17:59:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 22:59:25 +0000 Subject: [issue7932] print statement delayed IOError when stdout has been closed In-Reply-To: <1266195907.59.0.6287236457.issue7932@psf.upfronthosting.co.za> Message-ID: <1637967565.31.0.391178465135.issue7932@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: cpython % ./python.exe -c 'import sys; print("x", file=sys.stdout)' 1>&- ; echo $? 0 cpython % ./python.exe -c 'import sys; print("x", file=sys.stderr)' 2>&- ; echo $? x 0 ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:08:29 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 23:08:29 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637968109.12.0.476390415821.issue45901@roundup.psfhosted.org> Steve Dower added the comment: New changeset 4841e694ee1686f8c933ddfcb8c854915867ce17 by Steve Dower in branch 'main': bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799) https://github.com/python/cpython/commit/4841e694ee1686f8c933ddfcb8c854915867ce17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:08:30 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 23:08:30 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637968110.48.0.0607632381189.issue45901@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28039 pull_request: https://github.com/python/cpython/pull/29807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:08:34 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 23:08:34 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637968114.71.0.383704736035.issue45901@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28040 pull_request: https://github.com/python/cpython/pull/29808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:10:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:10:29 +0000 Subject: [issue16242] [doc] Document that __getattr__ can be called before __init__ (e.g. by pickle) In-Reply-To: <1350324673.62.0.567343854306.issue16242@psf.upfronthosting.co.za> Message-ID: <1637968229.33.0.268125306095.issue16242@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Pickle and __getattr__ -> [doc] Document that __getattr__ can be called before __init__ (e.g. by pickle) type: behavior -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:16:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:16:18 +0000 Subject: [issue30535] [doc] Explicitly note that meta_path is not empty In-Reply-To: <1496307550.81.0.122215532062.issue30535@psf.upfronthosting.co.za> Message-ID: <1637968578.52.0.144992674168.issue30535@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Explicitly note that meta_path is not empty -> [doc] Explicitly note that meta_path is not empty versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:22:53 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 23:22:53 +0000 Subject: [issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data In-Reply-To: <1624919733.39.0.974767657181.issue44530@roundup.psfhosted.org> Message-ID: <1637968973.8.0.572834065188.issue44530@roundup.psfhosted.org> Steve Dower added the comment: This change modified the audit event 'code.__name__', which requires a deprecation period (all events are public API, as per PEP 578). We need to revert that part of the change. I don't think we need to add a new event to report the qualname here, so just dropping the new argument seems fine. ---------- nosy: +steve.dower resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:23:27 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 23:23:27 +0000 Subject: [issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data In-Reply-To: <1624919733.39.0.974767657181.issue44530@roundup.psfhosted.org> Message-ID: <1637969007.63.0.454566499686.issue44530@roundup.psfhosted.org> Steve Dower added the comment: Correction: the event is `code.__new__` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:28:16 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 23:28:16 +0000 Subject: [issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data In-Reply-To: <1624919733.39.0.974767657181.issue44530@roundup.psfhosted.org> Message-ID: <1637969296.5.0.964397670999.issue44530@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +28041 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/29809 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:29:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:29:56 +0000 Subject: [issue20126] sched doesn't handle events added after scheduler starts In-Reply-To: <1388890823.36.0.322424274213.issue20126@psf.upfronthosting.co.za> Message-ID: <1637969396.69.0.88794780335.issue20126@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:30:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:30:08 +0000 Subject: [issue20126] sched doesn't handle events added after scheduler starts In-Reply-To: <1388890823.36.0.322424274213.issue20126@psf.upfronthosting.co.za> Message-ID: <1637969408.3.0.963068421401.issue20126@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:30:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:30:42 +0000 Subject: [issue20126] sched doesn't handle events added after scheduler starts as expected In-Reply-To: <1388890823.36.0.322424274213.issue20126@psf.upfronthosting.co.za> Message-ID: <1637969442.05.0.816551773305.issue20126@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: sched doesn't handle events added after scheduler starts -> sched doesn't handle events added after scheduler starts as expected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:30:48 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Nov 2021 23:30:48 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637969448.19.0.715313921978.issue45901@roundup.psfhosted.org> miss-islington added the comment: New changeset 3dcbe01dc5236fb77d8c0133fb7e6bdd0754768a by Miss Islington (bot) in branch '3.10': bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799) https://github.com/python/cpython/commit/3dcbe01dc5236fb77d8c0133fb7e6bdd0754768a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:36:47 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 26 Nov 2021 23:36:47 +0000 Subject: [issue44359] test_ftplib.test_makeport() fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched In-Reply-To: <1623225511.63.0.739788412824.issue44359@roundup.psfhosted.org> Message-ID: <1637969807.92.0.613766095894.issue44359@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: -26699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:42:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:42:00 +0000 Subject: [issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple In-Reply-To: <1329845918.75.0.31962840333.issue14074@psf.upfronthosting.co.za> Message-ID: <1637970120.65.0.566702380686.issue14074@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11, with a different error: % ./python.exe prog.py Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/prog.py", line 5, in args = parse.parse_args() ^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/Lib/argparse.py", line 1822, in parse_args args, argv = self.parse_known_args(args, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/Lib/argparse.py", line 1855, in parse_known_args namespace, args = self._parse_known_args(args, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/Lib/argparse.py", line 2093, in _parse_known_args ', '.join(required_actions)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: sequence item 0: expected str instance, tuple found ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:42:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:42:24 +0000 Subject: [issue21616] argparse explodes with nargs='*' and a tuple metavar In-Reply-To: <1401487300.75.0.673087061626.issue21616@psf.upfronthosting.co.za> Message-ID: <1637970144.86.0.574534854743.issue21616@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:43:20 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 23:43:20 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637970200.45.0.442861568752.issue45901@roundup.psfhosted.org> Steve Dower added the comment: New changeset 133fb267f437f9bd568738d0e0e59e574fc82b02 by Miss Islington (bot) in branch '3.9': bpo-45901: Fixes argument passing when invoking .py files directly through the Store package (GH-29799) https://github.com/python/cpython/commit/133fb267f437f9bd568738d0e0e59e574fc82b02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:51:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:51:22 +0000 Subject: [issue21021] PyMemberDef name is char* instead of const char* In-Reply-To: <1395483359.95.0.0463894937939.issue21021@psf.upfronthosting.co.za> Message-ID: <1637970682.58.0.807658627831.issue21021@roundup.psfhosted.org> Irit Katriel added the comment: It is const char* now: https://github.com/python/cpython/blob/f4c03484da59049eb62a9bf7777b963e2267d187/Include/structmember.h#L19 ---------- nosy: +iritkatriel resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:52:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 26 Nov 2021 23:52:34 +0000 Subject: [issue21020] PyMethodDef ml_doc is char* instead of const char* In-Reply-To: <1395483322.57.0.466317443541.issue21020@psf.upfronthosting.co.za> Message-ID: <1637970754.93.0.0957873979866.issue21020@roundup.psfhosted.org> Irit Katriel added the comment: It is const char* now: https://github.com/python/cpython/blob/f4c03484da59049eb62a9bf7777b963e2267d187/Include/methodobject.h#L40 ---------- nosy: +iritkatriel resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:54:06 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 23:54:06 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1637970846.06.0.206746971661.issue45582@roundup.psfhosted.org> Steve Dower added the comment: Status update on this: I owe everyone a perf comparison of the before/after with this change. I don't particularly want to block on a regression unless it's significant (honestly still have no idea what to expect), but open to others' thoughts on this point. How big a perf impact is this change worth? (Obviously once I have some numbers the discussion can be more concrete, but I don't have them yet, and I have to catch up on other issues for a while as this one took so long to get this far.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:54:58 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 26 Nov 2021 23:54:58 +0000 Subject: [issue45901] store app file type ignores command-line arguments In-Reply-To: <1637907407.05.0.378941758633.issue45901@roundup.psfhosted.org> Message-ID: <1637970898.57.0.0629304904835.issue45901@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 18:59:07 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Fri, 26 Nov 2021 23:59:07 +0000 Subject: [issue45907] Optimize literal comparisons and contains Message-ID: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> New submission from theeshallnotknowethme : Most operations with literals are optimized as well, so why shouldn't the comparison/contain operators be? I created a new bug report for it because of this fact and the TODO in the `fold_compare` function in `Python/ast_opt.c`. ---------- components: Interpreter Core messages: 407114 nosy: February291948 priority: normal severity: normal status: open title: Optimize literal comparisons and contains type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:00:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 00:00:23 +0000 Subject: [issue25880] codecs should raise specific UnicodeDecodeError/UnicodeEncodeError rather than just UnicodeError In-Reply-To: <1450253032.62.0.362649983897.issue25880@psf.upfronthosting.co.za> Message-ID: <1637971223.39.0.235002415087.issue25880@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: u'..'.encode('idna') ? UnicodeError: label empty or too long -> codecs should raise specific UnicodeDecodeError/UnicodeEncodeError rather than just UnicodeError versions: +Python 3.11 -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:05:33 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 27 Nov 2021 00:05:33 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1637971533.45.0.670268689603.issue45907@roundup.psfhosted.org> Change by theeshallnotknowethme : ---------- keywords: +patch pull_requests: +28042 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29810 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:10:58 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2021 00:10:58 +0000 Subject: [issue45860] UnboundLocalError leads to Illegal instruction crashing CPython In-Reply-To: <1637547882.55.0.126109992436.issue45860@roundup.psfhosted.org> Message-ID: <1637971858.04.0.381584386219.issue45860@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:18:25 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 27 Nov 2021 00:18:25 +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: <1637972305.67.0.605632274656.issue41735@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 7edb6270a78c695e4c2ae2432797dc18105374fc by Ma Lin in branch 'main': bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong (GH-29587) https://github.com/python/cpython/commit/7edb6270a78c695e4c2ae2432797dc18105374fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:18:27 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Nov 2021 00:18:27 +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: <1637972307.27.0.580453289588.issue41735@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28043 pull_request: https://github.com/python/cpython/pull/29811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:20:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 00:20:29 +0000 Subject: [issue28463] Email long headers parsing/serialization In-Reply-To: <1476724139.73.0.82516539768.issue28463@psf.upfronthosting.co.za> Message-ID: <1637972429.35.0.0302725278518.issue28463@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:21:30 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 27 Nov 2021 00:21:30 +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: <1637972490.47.0.767850414368.issue41735@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 86c1265cdc64030c8921e0da5fcae2ac64299c26 by Ma Lin in branch '3.9': [3.9] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong (GH-29588) https://github.com/python/cpython/commit/86c1265cdc64030c8921e0da5fcae2ac64299c26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:21:30 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Nov 2021 00:21:30 +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: <1637972490.95.0.584090965918.issue41735@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28044 pull_request: https://github.com/python/cpython/pull/29812 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:22:03 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2021 00:22:03 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1637972523.31.0.490855044407.issue45870@roundup.psfhosted.org> Terry J. Reedy added the comment: Thank you Eryk for the info. As a bug report, this should be closed as '3rd party'. As an enhancement request, it needs to be specified more and should perhaps be discussed on python-ideas. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:24:26 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 27 Nov 2021 00:24: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: <1637972666.2.0.567067667762.issue41735@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks malin! ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:24:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 00:24:37 +0000 Subject: [issue26683] [doc] Questionable terminology ('free variables') for describing what locals() does In-Reply-To: <1459474292.87.0.515226107717.issue26683@psf.upfronthosting.co.za> Message-ID: <1637972677.27.0.306852002783.issue26683@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Questionable terminology for describing what locals() does -> [doc] Questionable terminology ('free variables') for describing what locals() does versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:26:53 2021 From: report at bugs.python.org (Steve Dower) Date: Sat, 27 Nov 2021 00:26:53 +0000 Subject: [issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data In-Reply-To: <1624919733.39.0.974767657181.issue44530@roundup.psfhosted.org> Message-ID: <1637972813.79.0.217232031012.issue44530@roundup.psfhosted.org> Steve Dower added the comment: New changeset db55f3fabafc046e4fca907210ced4ce16bf58d6 by Steve Dower in branch 'main': bpo-44530: Reverts a change to the 'code.__new__' audit event (GH-29809) https://github.com/python/cpython/commit/db55f3fabafc046e4fca907210ced4ce16bf58d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:37:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 00:37:25 +0000 Subject: [issue10880] do_mkvalue and 'boolean' In-Reply-To: <1294678522.28.0.674271875959.issue10880@psf.upfronthosting.co.za> Message-ID: <1637973445.95.0.0470237952988.issue10880@roundup.psfhosted.org> Irit Katriel added the comment: Maybe 'p' as in https://docs.python.org/3/c-api/arg.html#other-objects ? ---------- components: +C API nosy: +iritkatriel type: -> enhancement versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:42:08 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 27 Nov 2021 00:42:08 +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: <1637973728.82.0.743562890449.issue41735@roundup.psfhosted.org> miss-islington added the comment: New changeset 57100c86baa8451a568348646834380cd425b858 by Miss Islington (bot) in branch '3.10': [3.10] bpo-41735: Fix thread lock in zlib.Decompress.flush() may go wrong (GH-29587) (GH-29811) https://github.com/python/cpython/commit/57100c86baa8451a568348646834380cd425b858 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 19:44:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 00:44:38 +0000 Subject: [issue38497] [doc] Wrong argument name in documentation for pipes.Template.open In-Reply-To: <1571213625.11.0.339305647326.issue38497@roundup.psfhosted.org> Message-ID: <1637973878.76.0.997681326987.issue38497@roundup.psfhosted.org> Irit Katriel added the comment: It's documented as a positional arg: Template.open(file, mode) https://docs.python.org/3/library/pipes.html#pipes.Template.open but accepts it also as the kwarg "rw". So these are ok: from pipes import Template; Template().open('/tmp/f', rw='r') from pipes import Template; Template().open('/tmp/f', 'r') And this is not: from pipes import Template; Template().open('/tmp/f', mode='r') ---------- nosy: +iritkatriel title: Wrong argument name in documentation for pipes.Template.open -> [doc] Wrong argument name in documentation for pipes.Template.open type: -> behavior versions: +Python 3.10, Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 21:06:44 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 02:06:44 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1637978804.59.0.797028831303.issue45907@roundup.psfhosted.org> Raymond Hettinger added the comment: This PR looks to be the same as one that was recently rejected. Compare: https://github.com/python/cpython/pull/29639/files https://github.com/python/cpython/pull/29810/files See discussion at: https://bugs.python.org/issue45843 ---------- nosy: +BTaskaya, pablogsal, rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 21:22:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 02:22:16 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637979736.53.0.637152516653.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: > It won't affect _this_ application, but possibly we should > fix this anyway. I would like to see this fixed. It affects our ability to reason about int/int code. That comes up every time a fraction is fed into a math library function than converts its input to a float. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 21:39:41 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 27 Nov 2021 02:39:41 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1637980781.88.0.764457489256.issue45907@roundup.psfhosted.org> theeshallnotknowethme added the comment: It doesn't seem to make sense why other operations on literals are optimized but these particular ones aren't optimized (much). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 21:41:16 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 27 Nov 2021 02:41:16 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1637980876.55.0.356601414147.issue45907@roundup.psfhosted.org> theeshallnotknowethme added the comment: If this bug report isn't accepted, for how long would the TODO remain in `Python/ast_opt.c`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 21:53:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2021 02:53:31 +0000 Subject: [issue45872] Turtle: invalid example for write doc In-Reply-To: <1637602535.98.0.579349868944.issue45872@roundup.psfhosted.org> Message-ID: <1637981611.6.0.372106851123.issue45872@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Doc for turtle.write missing the tuple part of the font param in 3.10+ type: -> behavior versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 21:54:27 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2021 02:54:27 +0000 Subject: [issue45397] turtle.write doc missing tuple parens for font default in 3.10+ In-Reply-To: <1633576337.95.0.961564337357.issue45397@roundup.psfhosted.org> Message-ID: <1637981667.1.0.914692716597.issue45397@roundup.psfhosted.org> Terry J. Reedy added the comment: Closed #45872 as duplicate. ?ric, any idea for a local fix? I verified with Sphinx 3.2.1. I tried both escaping with '\' and doubling parens, without success. ---------- nosy: +terry.reedy title: Doc for turtle.write missing the tuple part of the font param in 3.10+ -> turtle.write doc missing tuple parens for font default in 3.10+ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 22:16:14 2021 From: report at bugs.python.org (Tim Peters) Date: Sat, 27 Nov 2021 03:16:14 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637982974.71.0.682741202626.issue45876@roundup.psfhosted.org> Tim Peters added the comment: But I would like to leave it alone. Extended precision simply is not an issue on any current platform I'm aware of ("not even Windows"), and I would, e.g., hate trying to explain to users why 1 / 2731 != 1.0 / 2731.0 (assuming we're not also proposing to take float division away from the HW). It's A Feature that I / J == float(I) / float(J) whenever I and J are both representable as floats. If extended precision is an issue on some platform, fine, let them speak up. On x87 we could document that CPython assumes the FPU's "precision control" is set to 53 bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 22:22:17 2021 From: report at bugs.python.org (Chris Eykamp) Date: Sat, 27 Nov 2021 03:22:17 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1637983337.51.0.500066605288.issue45796@roundup.psfhosted.org> Chris Eykamp added the comment: If we decide that this is a tkinter bug (and that the Python part is working properly), does that mean that we close this ticket and rely on the upstream provider to fix the problem? I don't know how jurisdiction works with core libraries shipped with Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 22:38:40 2021 From: report at bugs.python.org (Ned Deily) Date: Sat, 27 Nov 2021 03:38:40 +0000 Subject: [issue45796] Using tab to cycle through tkinter widgets breaks foreground styling In-Reply-To: <1636753894.77.0.757469513697.issue45796@roundup.psfhosted.org> Message-ID: <1637984320.38.0.942345556808.issue45796@roundup.psfhosted.org> Ned Deily added the comment: This issue was already closed under the presumption that what you described is Tk behavior. tkinter is the module in the Python standard library that provides the ?glue? to the third-party TCL and Tk libraries; it is pretty much a thin wrapper that provides little functionality on its own. If the Tk folks ultimately reject your Tk issue and believe it is really a problem in Python?s tkinter module, feel free to reopen this issue. (Note, that in general, the Tcl and Tk libraries themselves are not part of Python, however we do provide pre-compiled versions of the libraries with the the Windows and macOS Python binary installers on python.org.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 26 23:14:33 2021 From: report at bugs.python.org (Ma Lin) Date: Sat, 27 Nov 2021 04:14:33 +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: <1637986473.46.0.0658111189871.issue41735@roundup.psfhosted.org> Ma Lin added the comment: Thanks for review! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 00:11:12 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 27 Nov 2021 05:11:12 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637989872.63.0.15590533089.issue45876@roundup.psfhosted.org> Steven D'Aprano added the comment: Raymond, Mark, Tim, I have been reading this whole thread. Thank you all. I am in awe and a little bit intimidated by how much I still have to learn about floating point arithmetic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 00:55:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 05:55:16 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637992516.34.0.263546249787.issue45876@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 00:55:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 05:55:16 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637992516.46.0.953441724418.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset af9ee57b96cb872df6574e36027cc753417605f9 by Raymond Hettinger in branch 'main': bpo-45876: Improve accuracy for stdev() and pstdev() in statistics (GH-29736) https://github.com/python/cpython/commit/af9ee57b96cb872df6574e36027cc753417605f9 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 00:59:37 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 05:59:37 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1637992777.37.0.0917216142879.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: Thank you all for looking at this. It's unlikely that anyone will ever notice the improvement, but I'm happy with it and that's all the matters ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 03:02:49 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 27 Nov 2021 08:02:49 +0000 Subject: [issue45908] dict.fromkeys insertion order Message-ID: <1638000169.24.0.785616834749.issue45908@roundup.psfhosted.org> New submission from Vedran ?a?i? : I'm sure this is exactly how it should work, I just want to know if you think it is documented properly, so I can rely on it. In my opinion the docs should be more precise. >>> ''.join(dict.fromkeys('axbxc')) 'axbc' Is this guaranteed by the documentation? Of course, dict iteration order is now guaranteed to be insertion order, but still, nowhere do the docs say that fromkeys inserts the keys into new dictionary in order in which they appear in its argument. (Probably the reason for this is that dict iteration order was fixed in 3.7, yet fromkeys existed a long time before that.) I propose an addition to the documentation: > Create a new dictionary with keys from iterable (in order) and values set to value. https://docs.python.org/3/library/stdtypes.html ---------- assignee: docs at python components: Documentation messages: 407136 nosy: docs at python, veky priority: normal severity: normal status: open title: dict.fromkeys insertion order versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 03:29:14 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 27 Nov 2021 08:29:14 +0000 Subject: [issue45908] dict.fromkeys insertion order In-Reply-To: <1638000169.24.0.785616834749.issue45908@roundup.psfhosted.org> Message-ID: <1638001754.1.0.0855401160007.issue45908@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +methane, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 03:45:34 2021 From: report at bugs.python.org (Hugo van Kemenade) Date: Sat, 27 Nov 2021 08:45:34 +0000 Subject: =?utf-8?q?=5Bissue45903=5D_What=E2=80=99s_New_In_Python_3=2E11=3A_wrong_r?= =?utf-8?q?eference_to_Signature=2Efrom=5Fcallable?= In-Reply-To: <1637937792.91.0.161252797195.issue45903@roundup.psfhosted.org> Message-ID: <1638002734.68.0.044764842545.issue45903@roundup.psfhosted.org> Change by Hugo van Kemenade : ---------- keywords: +patch pull_requests: +28045 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 03:45:34 2021 From: report at bugs.python.org (Hugo van Kemenade) Date: Sat, 27 Nov 2021 08:45:34 +0000 Subject: [issue45320] Remove deprecated inspect functions In-Reply-To: <1632918150.03.0.388631628057.issue45320@roundup.psfhosted.org> Message-ID: <1638002734.77.0.212239686081.issue45320@roundup.psfhosted.org> Change by Hugo van Kemenade : ---------- pull_requests: +28046 pull_request: https://github.com/python/cpython/pull/29813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 03:47:05 2021 From: report at bugs.python.org (Hugo van Kemenade) Date: Sat, 27 Nov 2021 08:47:05 +0000 Subject: =?utf-8?q?=5Bissue45903=5D_What=E2=80=99s_New_In_Python_3=2E11=3A_wrong_r?= =?utf-8?q?eference_to_Signature=2Efrom=5Fcallable?= In-Reply-To: <1637937792.91.0.161252797195.issue45903@roundup.psfhosted.org> Message-ID: <1638002825.84.0.546968954823.issue45903@roundup.psfhosted.org> Hugo van Kemenade added the comment: Thanks Jakub! I've made https://github.com/python/cpython/pull/29813 to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 03:59:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 08:59:08 +0000 Subject: [issue20126] sched doesn't handle at the expected time those events which are added after scheduler starts In-Reply-To: <1388890823.36.0.322424274213.issue20126@psf.upfronthosting.co.za> Message-ID: <1638003548.37.0.886810813872.issue20126@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: sched doesn't handle events added after scheduler starts as expected -> sched doesn't handle at the expected time those events which are added after scheduler starts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 04:32:06 2021 From: report at bugs.python.org (Kumar Aditya) Date: Sat, 27 Nov 2021 09:32:06 +0000 Subject: [issue45653] Freeze the encodings module. In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org> Message-ID: <1638005526.43.0.914578363825.issue45653@roundup.psfhosted.org> Change by Kumar Aditya : ---------- pull_requests: +28047 pull_request: https://github.com/python/cpython/pull/29814 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 05:38:53 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Nov 2021 10:38:53 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1638009533.71.0.918228373497.issue45907@roundup.psfhosted.org> Serhiy Storchaka added the comment: > It doesn't seem to make sense why other operations on literals are optimized but these particular ones aren't optimized (much). The existing optimizer optimizes the following cases (note that the parser does not produce negative or complex numbers, they are created by the optimizer): -1 1-2j 1/3 16*1024 2**32-1 1<<12 b'a'[0] They all are extremely common. Virtually every Python file contain some of such expressions, and they are often used in loops. In contrary, it is difficult to find any example of using comparison operations with all constant operands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 06:10:48 2021 From: report at bugs.python.org (mike mcleod) Date: Sat, 27 Nov 2021 11:10:48 +0000 Subject: [issue1284670] Allow to restrict ModuleFinder to get "direct" dependencies Message-ID: <1638011448.84.0.821003707253.issue1284670@roundup.psfhosted.org> mike mcleod added the comment: Ok, I will work on this soon and make further comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 06:12:19 2021 From: report at bugs.python.org (mike mcleod) Date: Sat, 27 Nov 2021 11:12:19 +0000 Subject: [issue10483] http.server - what is executable on Windows In-Reply-To: <1290324390.55.0.445837984524.issue10483@psf.upfronthosting.co.za> Message-ID: <1638011539.79.0.793663073757.issue10483@roundup.psfhosted.org> mike mcleod added the comment: I will work on this next week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 06:50:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 11:50:22 +0000 Subject: [issue23819] test_asyncio fails when run under -O In-Reply-To: <1427808695.9.0.385563565443.issue23819@psf.upfronthosting.co.za> Message-ID: <1638013822.11.0.147433364699.issue23819@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 06:54:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 11:54:46 +0000 Subject: [issue15010] unittest: _top_level_dir is incorrectly persisted between calls to different load_test methods In-Reply-To: <1338945643.44.0.808523506511.issue15010@psf.upfronthosting.co.za> Message-ID: <1638014086.95.0.795385897072.issue15010@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11 -Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 06:55:01 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 11:55:01 +0000 Subject: [issue22811] _top_level_dir state leaks on defaultTestLoader In-Reply-To: <1415340312.36.0.0686984074156.issue22811@psf.upfronthosting.co.za> Message-ID: <1638014101.39.0.248328694776.issue22811@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> unittest: _top_level_dir is incorrectly persisted between calls to different load_test methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 06:57:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 11:57:12 +0000 Subject: [issue15498] Eliminate the use of deprecated OS X APIs in getpath.c In-Reply-To: <1343633664.98.0.256476653975.issue15498@psf.upfronthosting.co.za> Message-ID: <1638014232.24.0.762351384661.issue15498@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 07:05:59 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 27 Nov 2021 12:05:59 +0000 Subject: [issue45909] sysconfig --generate-posix-vars creates wrong file when cross compiling Message-ID: <1638014759.88.0.771169774023.issue45909@roundup.psfhosted.org> New submission from Christian Heimes : "sysconfig --generate-posix-vars" creates pybuilddir.txt and a platform-specific sysconfig data file like build/lib.linux-x86_64-3.11/_sysconfigdata__linux_x86_64-linux-gnu.py When creating a cross-compile build of Python, sysconfig mixes data from the cross compile build and the host build. It creates a pybuilddir.txt and build/lib directory with correct values (e.g. wasm32-unknown-emscripten) but sysconfigdata file with name values from the host Python PYTHON_FOR_BUILD (e.g x86_64-unknown-linux-gnu). $ cat pybuilddir.txt build/lib.wasm32-unknown-emscripten-3.11 $ ls build/lib.wasm32-unknown-emscripten-3.11/_sysconfigdata* build/lib.wasm32-unknown-emscripten-3.11/_sysconfigdata__linux_x86_64-linux-gnu.py $ grep CC build/lib.wasm32-unknown-emscripten-3.11/_sysconfigdata__linux_x86_64-linux-gnu.py 'CC': 'gcc', $ grep ^CC Makefile CC= emcc ---------- components: Build, Cross-Build messages: 407141 nosy: Alex.Willmer, christian.heimes priority: normal severity: normal status: open title: sysconfig --generate-posix-vars creates wrong file when cross compiling type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 07:06:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 27 Nov 2021 12:06:24 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1638014784.62.0.230441575217.issue45881@roundup.psfhosted.org> Change by Christian Heimes : ---------- dependencies: +sysconfig --generate-posix-vars creates wrong file when cross compiling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 07:16:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 12:16:40 +0000 Subject: [issue21914] Create unit tests for Turtle guionly In-Reply-To: <1404442037.11.0.611165319303.issue21914@psf.upfronthosting.co.za> Message-ID: <1638015400.61.0.508576896897.issue21914@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> enhancement versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 07:22:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 12:22:00 +0000 Subject: [issue23323] [doc] mention that flags arg to imaplib's append should be a string In-Reply-To: <1422276063.41.0.625016569735.issue23323@psf.upfronthosting.co.za> Message-ID: <1638015720.54.0.483505126227.issue23323@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy title: Issue with imaplib and append messages passing a tuple with flags -> [doc] mention that flags arg to imaplib's append should be a string type: -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 07:40:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 12:40:09 +0000 Subject: [issue25415] [doc] "there is no public constructor" should be reworded in io module documentation In-Reply-To: <1444931934.97.0.280840323098.issue25415@psf.upfronthosting.co.za> Message-ID: <1638016809.83.0.539934666444.issue25415@roundup.psfhosted.org> Irit Katriel added the comment: Martin's patch needs to be converted to a GitHub PR and reviewed. ---------- keywords: +easy -patch nosy: +iritkatriel title: I can create instances of io.IOBase -> [doc] "there is no public constructor" should be reworded in io module documentation type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 07:45:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 12:45:44 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1638017144.62.0.538887580028.issue19737@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 07:51:39 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 12:51:39 +0000 Subject: [issue24040] plistlib assumes dict_type is descendent of dict In-Reply-To: <1429814108.42.0.103611722711.issue24040@psf.upfronthosting.co.za> Message-ID: <1638017499.31.0.119136818404.issue24040@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 08:08:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 13:08:22 +0000 Subject: [issue23360] Content-Type when sending data with urlopen() In-Reply-To: <1422794612.5.0.505084736818.issue23360@psf.upfronthosting.co.za> Message-ID: <1638018502.73.0.50929993446.issue23360@roundup.psfhosted.org> Irit Katriel added the comment: Martin, I think you fixed this in https://github.com/python/cpython/commit/3c0d0baf2badfad7deb346d1043f7d83bb92691f#diff-533bd604631e0e26ce55dfa75a878788f3c4d7d7ccb3bbaeaa2ee2a9c956ffe8 ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 08:14:11 2021 From: report at bugs.python.org (Ethan Smith) Date: Sat, 27 Nov 2021 13:14:11 +0000 Subject: [issue45909] sysconfig --generate-posix-vars creates wrong file when cross compiling In-Reply-To: <1638014759.88.0.771169774023.issue45909@roundup.psfhosted.org> Message-ID: <1638018851.84.0.977624515752.issue45909@roundup.psfhosted.org> Change by Ethan Smith : ---------- nosy: +ethan smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 08:34:03 2021 From: report at bugs.python.org (theeshallnotknowethme) Date: Sat, 27 Nov 2021 13:34:03 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1638020043.88.0.901163375003.issue45907@roundup.psfhosted.org> theeshallnotknowethme added the comment: List and sets as right operands in literal contains are optimized to constant tuples and frozensets, and I'd like to take this optimization a step further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 08:36:15 2021 From: report at bugs.python.org (Batuhan Taskaya) Date: Sat, 27 Nov 2021 13:36:15 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1638020175.28.0.545950272575.issue45907@roundup.psfhosted.org> Batuhan Taskaya added the comment: We just rejected the same issue 2 days ago. If you feel very strong about this; instead of creating new ticket in the same place, you might want to try python-dev instead. Re: the todo comment, feel free to send a patch that removes it. I don't thank that is still applicable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:28:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 14:28:50 +0000 Subject: [issue26346] PySequenceMethods documentation missing sq_slice and sq_ass_slice In-Reply-To: <1455243153.76.0.688486976715.issue26346@psf.upfronthosting.co.za> Message-ID: <1638023330.48.0.161302961363.issue26346@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +C API type: -> enhancement versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:37:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 14:37:34 +0000 Subject: [issue25477] text mode for pkgutil.get_data In-Reply-To: <1445819250.09.0.301891559419.issue25477@psf.upfronthosting.co.za> Message-ID: <1638023854.78.0.0317894332273.issue25477@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: -> enhancement versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:40:53 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 14:40:53 +0000 Subject: [issue45908] dict.fromkeys insertion order In-Reply-To: <1638000169.24.0.785616834749.issue45908@roundup.psfhosted.org> Message-ID: <1638024053.12.0.415989114576.issue45908@roundup.psfhosted.org> Raymond Hettinger added the comment: All the dict methods retain insertion order. There is nothing special about fromkeys(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:41:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 14:41:00 +0000 Subject: [issue23950] Odd behavior with "file" and "filename" attributes in cgi.FieldStorage In-Reply-To: <1429030095.23.0.220534977623.issue23950@psf.upfronthosting.co.za> Message-ID: <1638024060.2.0.763088912076.issue23950@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:42:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 14:42:52 +0000 Subject: [issue28352] winfo_pathname(..) | window id "xyz" doesn't exist in this application. | Python 3.4.4 In-Reply-To: <1475546631.28.0.75775044978.issue28352@psf.upfronthosting.co.za> Message-ID: <1638024172.54.0.713909745412.issue28352@roundup.psfhosted.org> Irit Katriel added the comment: Closing as there is not enough information to understand the issue and there were no replies to followup questions. Please create a new issue if you are still seeing this problem on a current version (>= 3.9). ---------- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 09:47:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 14:47:00 +0000 Subject: [issue24301] gzip module failing to decompress valid compressed file In-Reply-To: <1432742343.38.0.978535326882.issue24301@psf.upfronthosting.co.za> Message-ID: <1638024420.74.0.798073135726.issue24301@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> from gzip import GzipFile >>> from io import BytesIO >>> file = BytesIO() >>> with GzipFile(fileobj=file, mode="wb") as z: ... z.write(b"data") ... 4 >>> file.write(b"garbage") 7 >>> file.seek(0) 0 >>> GzipFile(fileobj=file).read() Traceback (most recent call last): File "", line 1, in File "/Users/iritkatriel/src/cpython-654/Lib/gzip.py", line 301, in read return self._buffer.read(size) ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-654/Lib/_compression.py", line 118, in readall while data := self.read(sys.maxsize): ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-654/Lib/gzip.py", line 499, in read if not self._read_gzip_header(): ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-654/Lib/gzip.py", line 468, in _read_gzip_header last_mtime = _read_gzip_header(self._fp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-654/Lib/gzip.py", line 428, in _read_gzip_header raise BadGzipFile('Not a gzipped file (%r)' % magic) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gzip.BadGzipFile: Not a gzipped file (b'ga') ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 10:03:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 15:03:59 +0000 Subject: [issue22996] Order of _io objects finalization can lose data in reference cycles In-Reply-To: <1417701026.92.0.498236598098.issue22996@psf.upfronthosting.co.za> Message-ID: <1638025439.92.0.162755639456.issue22996@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 10:04:18 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 15:04:18 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1638025458.35.0.351078155707.issue45902@roundup.psfhosted.org> Raymond Hettinger added the comment: I?m -1 on this. Given that use cases are rare, there is no need to burden the code base with an optimization of something we can already do in other ways. Also, I don?t like that the APIs for list.sort(), bytes.sort(), and bytearray.sort() wouldn?t match. IMO that would do more harm than good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 10:11:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 15:11:34 +0000 Subject: [issue23010] "unclosed file" warning when defining unused logging FileHandler in dictConfig In-Reply-To: <1418046415.01.0.116582999558.issue23010@psf.upfronthosting.co.za> Message-ID: <1638025894.5.0.00117336605312.issue23010@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 10:16:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 15:16:37 +0000 Subject: [issue22755] contextlib.closing documentation should use a new example In-Reply-To: <1414536052.52.0.0865505363528.issue22755@psf.upfronthosting.co.za> Message-ID: <1638026197.33.0.933581458521.issue22755@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 10:33:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 15:33:08 +0000 Subject: [issue17708] sys.flags.hash_randomization doesn't return correct value In-Reply-To: <1365832008.74.0.106201952551.issue17708@psf.upfronthosting.co.za> Message-ID: <1638027188.13.0.106853382183.issue17708@roundup.psfhosted.org> Irit Katriel added the comment: This is working now (note that since 3.10 hash randomisation is enabled by default): cpython % export PYTHONHASHSEED=random cpython % ./python.exe -c "import sys; print(sys.flags.hash_randomization)" 1 cpython % export PYTHONHASHSEED=0 cpython % ./python.exe -c "import sys; print(sys.flags.hash_randomization)" 0 cpython % export PYTHONHASHSEED=1 cpython % ./python.exe -c "import sys; print(sys.flags.hash_randomization)" 1 ---------- nosy: +iritkatriel resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 10:42:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 15:42:03 +0000 Subject: [issue21557] [doc] os.popen & os.system lack shell-related security warnings In-Reply-To: <1400794428.31.0.170474236819.issue21557@psf.upfronthosting.co.za> Message-ID: <1638027723.95.0.181635252765.issue21557@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: os.popen & os.system lack shell-related security warnings -> [doc] os.popen & os.system lack shell-related security warnings versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 11:25:15 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 27 Nov 2021 16:25:15 +0000 Subject: [issue45908] dict.fromkeys insertion order In-Reply-To: <1638000169.24.0.785616834749.issue45908@roundup.psfhosted.org> Message-ID: <1638030315.41.0.546369170312.issue45908@roundup.psfhosted.org> Vedran ?a?i? added the comment: Absolutely, but that's not my problem. I take your sentence to mean that when I do something with a _dict_ argument, it should try to preserve its insertion order as much as possible (given the semantics of the concrete method in question). I agree. But my question is about constructing a dict from something other than a dict (here, a str, simply because it's easiest to visualize). I'm sure you don't mean to say dict.fromkeys retains the insertion order of its argument always, since it's obviously false if you give it a set. What I'd like to be specified here (or elsewhere, but here I think it's useful) is that _iteration order_ of the argument to dict.fromkeys is preserved as _insertion order_ (and therefore iteration order) of the resulting dict. Besides, I don't see any other point where it should be specified... the only other constructor, `dict` itself, gives a very precise description (https://docs.python.org/3/library/stdtypes.html#dict) of how it creates a dict from its argument(s). Of course, there it mattered even before Py3.7, since values were important. In dict.fromkeys values are all the same, but order still matters and should (IMO) be specified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 11:51:40 2021 From: report at bugs.python.org (bpoaugust) Date: Sat, 27 Nov 2021 16:51:40 +0000 Subject: [issue45910] mailbox should support options for calling email parser Message-ID: <1638031900.48.0.213018487662.issue45910@roundup.psfhosted.org> New submission from bpoaugust : It looks like mailbox uses email.message_from_... for parsing emails. However it does not allow for passing any options to the parser. In particular the policy cannot be provided. It would be useful if there was a way to pass such options. ---------- components: email messages: 407154 nosy: barry, bpoaugust, r.david.murray priority: normal severity: normal status: open title: mailbox should support options for calling email parser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 11:55:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 16:55:03 +0000 Subject: [issue23991] ZipFile sanity checks In-Reply-To: <1429332247.71.0.71910598875.issue23991@psf.upfronthosting.co.za> Message-ID: <1638032103.48.0.341010320664.issue23991@roundup.psfhosted.org> Irit Katriel added the comment: I get NotADirectory errors now, I believe they were added in issue40564. ---------- nosy: +iritkatriel resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Using zipfile.Path with several files prematurely closes zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 12:02:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 17:02:46 +0000 Subject: [issue24851] infinite loop in faulthandler._stack_overflow In-Reply-To: <1439412048.1.0.772925582506.issue24851@psf.upfronthosting.co.za> Message-ID: <1638032566.64.0.394930561588.issue24851@roundup.psfhosted.org> Irit Katriel added the comment: I think this was fixed in issue38965. ---------- nosy: +iritkatriel, ned.deily resolution: -> duplicate status: open -> pending superseder: -> test_stack_overflow (test.test_faulthandler.FaultHandlerTests) is stuck with GCC10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 12:05:47 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Nov 2021 17:05:47 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1638032747.43.0.357347721687.issue45907@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I agree with Serhiy and Batuhan. Please reach to python-dev of you really want to pursue this even after what has been already discussed. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 12:06:32 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Nov 2021 17:06:32 +0000 Subject: [issue45907] Optimize literal comparisons and contains In-Reply-To: <1637971147.39.0.0141708155517.issue45907@roundup.psfhosted.org> Message-ID: <1638032792.31.0.86617469266.issue45907@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: On the other hand, we can probably just remove the TODO ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 12:07:32 2021 From: report at bugs.python.org (Antony Lee) Date: Sat, 27 Nov 2021 17:07:32 +0000 Subject: [issue25477] text mode for pkgutil.get_data In-Reply-To: <1445819250.09.0.301891559419.issue25477@psf.upfronthosting.co.za> Message-ID: <1638032852.36.0.47159993884.issue25477@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 12:07:53 2021 From: report at bugs.python.org (Antony Lee) Date: Sat, 27 Nov 2021 17:07:53 +0000 Subject: [issue23991] ZipFile sanity checks In-Reply-To: <1429332247.71.0.71910598875.issue23991@psf.upfronthosting.co.za> Message-ID: <1638032873.73.0.126957199606.issue23991@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 13:04:34 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Nov 2021 18:04:34 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1638036274.64.0.528877031553.issue42268@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset e71c12efcddc1076d5367461a5b416092267aa77 by Pablo Galindo Salgado in branch 'main': bpo-42268: Fail the configure step if the selected compiler doesn't support memory sanitizer (GH-29806) https://github.com/python/cpython/commit/e71c12efcddc1076d5367461a5b416092267aa77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 13:05:56 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 27 Nov 2021 18:05:56 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1638036356.34.0.964616795447.issue42268@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +28048 pull_request: https://github.com/python/cpython/pull/29815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 13:25:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 18:25:09 +0000 Subject: [issue27161] Confusing exception in Path().with_name In-Reply-To: <1464654135.6.0.522820749972.issue27161@psf.upfronthosting.co.za> Message-ID: <1638037509.59.0.574742336995.issue27161@roundup.psfhosted.org> Irit Katriel added the comment: I agree that it's not worth changing the code for this. If someone tries to pass {"a": "b"} as a name then, yeah, they get a weird error message. ---------- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 13:28:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 18:28:42 +0000 Subject: [issue33581] Document "optional components that are commonly included in Python distributions." In-Reply-To: <1526767207.27.0.682650639539.issue33581@psf.upfronthosting.co.za> Message-ID: <1638037722.05.0.90839851658.issue33581@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 13:36:15 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 18:36:15 +0000 Subject: [issue25477] text mode for pkgutil.get_data In-Reply-To: <1445819250.09.0.301891559419.issue25477@psf.upfronthosting.co.za> Message-ID: <1638038175.41.0.239935477402.issue25477@roundup.psfhosted.org> Irit Katriel added the comment: Closing due to lack of interest (the OP removed himself from the nosy list, and it is empty now). ---------- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 13:44:10 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 18:44:10 +0000 Subject: [issue43286] [doc] Clarify that Popen.returncode does not get auto-set when the process terminates In-Reply-To: <1613922985.0.0.488591869976.issue43286@roundup.psfhosted.org> Message-ID: <1638038650.93.0.78027938604.issue43286@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) keywords: +easy title: Clarify that Popen.returncode does not get auto-set when the process terminates -> [doc] Clarify that Popen.returncode does not get auto-set when the process terminates versions: +Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 13:48:39 2021 From: report at bugs.python.org (keeely) Date: Sat, 27 Nov 2021 18:48:39 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638038919.62.0.292102145556.issue45870@roundup.psfhosted.org> keeely added the comment: You can take the view that it's not a bug (with some justification), but a few lines in the cmd docs would make all the difference in terms of wasted time. I have now abandoned my Windows port and suggested users install WSL2 instead which is the easiest way forward for me, but it'd be nice to have known from the start that portions of cmd functionality are not available for Win32 instead of the indirect references via readline. You could throw us a bone here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 14:03:41 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 27 Nov 2021 19:03:41 +0000 Subject: [issue45909] sysconfig --generate-posix-vars creates wrong file when cross compiling In-Reply-To: <1638014759.88.0.771169774023.issue45909@roundup.psfhosted.org> Message-ID: <1638039821.46.0.168368220549.issue45909@roundup.psfhosted.org> Christian Heimes added the comment: I just realized that PYTHON_FOR_BUILD is far more complicated. Our WASM build system sets the env var to "$(pwd)/cpython/builddir/build/python". The configure script expects us to set several additional env vars. The logic goes like this for cross compiling: if PYTHON_FOR_BUILD is empty: find Python interpreter with same version as PACKAGE_VERSION set PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp else: use user-supplied PYTHON_FOR_BUILD Since we don't set any of the variables _PYTHON_PROJECT_BASE, _PYTHON_HOST_PLATFORM, and _PYTHON_SYSCONFIGDATA_NAME, we get wrong sysconfig data file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 14:07:20 2021 From: report at bugs.python.org (Antony Lee) Date: Sat, 27 Nov 2021 19:07:20 +0000 Subject: [issue27161] Confusing exception in Path().with_name In-Reply-To: <1464654135.6.0.522820749972.issue27161@psf.upfronthosting.co.za> Message-ID: <1638040040.61.0.220322166889.issue27161@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 14:07:44 2021 From: report at bugs.python.org (Antony Lee) Date: Sat, 27 Nov 2021 19:07:44 +0000 Subject: [issue33581] Document "optional components that are commonly included in Python distributions." In-Reply-To: <1526767207.27.0.682650639539.issue33581@psf.upfronthosting.co.za> Message-ID: <1638040064.53.0.933420541067.issue33581@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 14:08:00 2021 From: report at bugs.python.org (Antony Lee) Date: Sat, 27 Nov 2021 19:08:00 +0000 Subject: [issue43286] [doc] Clarify that Popen.returncode does not get auto-set when the process terminates In-Reply-To: <1613922985.0.0.488591869976.issue43286@roundup.psfhosted.org> Message-ID: <1638040080.36.0.976306927283.issue43286@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:11:37 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2021 20:11:37 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638043897.02.0.71161094698.issue45870@roundup.psfhosted.org> Terry J. Reedy added the comment: What specific sentences would you like where in which doc. (Please link as 'cmd doc' is too vague.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:14:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 27 Nov 2021 20:14:12 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1638044052.92.0.0123262024298.issue45881@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 545aebd2ecef9f6c3b2ca1973e3e0515d8355ce3 by Christian Heimes in branch '3.10': [3.10] bpo-45881: Use CC from env first for cross building (GH-29752). (GH-29753) https://github.com/python/cpython/commit/545aebd2ecef9f6c3b2ca1973e3e0515d8355ce3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:39:10 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 20:39:10 +0000 Subject: [issue45908] dict.fromkeys insertion order In-Reply-To: <1638000169.24.0.785616834749.issue45908@roundup.psfhosted.org> Message-ID: <1638045550.63.0.967693551685.issue45908@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the suggestion but I?m going to decline. We has many APIS that consume an iterable and all of them do so In iteration order. Even the regular dict() constructor takes an iterable of tuples and adds them in iteration order. Also, I?m not concerned because of our experience with OrderedDict() which for a decade had a fromkeys() method and there has never been a question about it. There was even an idiom for deducing a list while maintaining order: list(OrderedDict.fromkeys(seq)). ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:41:02 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Nov 2021 20:41:02 +0000 Subject: [issue45908] dict.fromkeys insertion order In-Reply-To: <1638000169.24.0.785616834749.issue45908@roundup.psfhosted.org> Message-ID: <1638045662.16.0.891615681125.issue45908@roundup.psfhosted.org> Serhiy Storchaka added the comment: What else can it be? dict.fromkeys() adds keys in the order of obtaining them, and it obtains them by iterating its argument. If we need a special note here, we need a special note for list(), tuple(), filter(), enumerate() and all other functions which consume an iterable. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:41:25 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2021 20:41:25 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638045685.81.0.620428017878.issue45870@roundup.psfhosted.org> Terry J. Reedy added the comment: Sorry, you obviously mean https://docs.python.org/3/library/cmd.html#module-cmd What to add where still applies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:42:15 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Nov 2021 20:42:15 +0000 Subject: [issue45908] dict.fromkeys insertion order In-Reply-To: <1638000169.24.0.785616834749.issue45908@roundup.psfhosted.org> Message-ID: <1638045735.02.0.611007770102.issue45908@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:47:03 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Nov 2021 20:47:03 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638046023.11.0.278542245223.issue45870@roundup.psfhosted.org> Terry J. Reedy added the comment: Guido and Raymond, you are the two active coredevs that have contributed the most lines to cmd module. What do either of you think? ---------- nosy: +gvanrossum, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 15:55:49 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Nov 2021 20:55:49 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1638046549.31.0.965834448133.issue45902@roundup.psfhosted.org> Serhiy Storchaka added the comment: I concur with Raymond. It is difficult to find any use case for sorting bytes objects (I cannot find any). As for using radix sort in list.sort() in special case of small integer keys, it is difficult to implement, because we should preserve the initial order of items with the same key. I am not sure that it is possible to implement stable radix sort with linear complexity. In any case the overhead will be more significant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 16:08:18 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Nov 2021 21:08:18 +0000 Subject: [issue24040] plistlib assumes dict_type is descendent of dict In-Reply-To: <1429814108.42.0.103611722711.issue24040@psf.upfronthosting.co.za> Message-ID: <1638047298.62.0.00722741510184.issue24040@roundup.psfhosted.org> Serhiy Storchaka added the comment: The patch LGTM, and I have nothing to add. Ronald, do you mind to create a PR. ---------- assignee: -> ronaldoussoren nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 16:21:30 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Nov 2021 21:21:30 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638048090.56.0.467926138283.issue45870@roundup.psfhosted.org> Eryk Sun added the comment: > You can take the view that it's not a bug (with some justification), > but a few lines in the cmd docs would make all the difference in > terms of wasted time. If anything, I think the readline documentation should have a note explaining the situation in Windows. The documentation of the cmd module already makes the readline dependency clear: If the readline module is loaded, input will automatically inherit bash-like history-list editing (e.g. Control-P scrolls back to the last command, Control-N forward to the next one, Control-F moves the cursor to the right non-destructively, Control-B moves the cursor to the left non-destructively, etc.). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 17:00:19 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 22:00:19 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1638050419.35.0.643475767371.issue45614@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 4dfae6f38e1720ddafcdd68043e476ecb41cb4d5 by Irit Katriel in branch 'main': bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) https://github.com/python/cpython/commit/4dfae6f38e1720ddafcdd68043e476ecb41cb4d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 17:00:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 27 Nov 2021 22:00:52 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1638050452.27.0.68496362096.issue45614@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 17:22:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 27 Nov 2021 22:22:38 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638051758.74.0.190889721669.issue45870@roundup.psfhosted.org> Guido van Rossum added the comment: AFAIK the reason command history works in cmd.py on Windows is that it's built into the terminal program. Or maybe into the operating system. Thus, the user can use line editing and history, but there is no API (in Python) to interact with these. I'm sure Steve Dower can explain the exact situation -- it may depend on which Windows version and which terminal program you use (my only recent experience is with winterm on Windows 10). I agree that (once we sort out what works in what versions of Windows and which terminal programs) we should clarify this in the docs. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 18:01:38 2021 From: report at bugs.python.org (Doron Behar) Date: Sat, 27 Nov 2021 23:01:38 +0000 Subject: [issue45558] shutil.copytree: Give the option to disable copystat In-Reply-To: <1637936491.78.0.458091867672.issue45558@roundup.psfhosted.org> Message-ID: <1638054098.44.0.82698014554.issue45558@roundup.psfhosted.org> Doron Behar added the comment: > Can you provide a description of what motivated you to change the behavior or what benefits this change would have for you or others? Sometimes, you wish to copy a whole directory from a read-only file system and you don't want it to be read-only in the destination. > Do you know why others haven?t reported this need previously? On NixOS all of the files that belong to packages are read-only. I encountered the need for this feature in GNURadio, at: https://github.com/gnuradio/gnuradio/pull/5227 The following Stack overflow question also suggests the need for this functionality is a bit common: https://stackoverflow.com/a/17022146/4935114 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 18:04:59 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Nov 2021 23:04:59 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638054299.82.0.48791171787.issue45870@roundup.psfhosted.org> Eryk Sun added the comment: > AFAIK the reason command history works in cmd.py on Windows is > that it's built into the terminal program. Or maybe into the > operating system. As mentioned in msg406800, input editing, history (e.g. up/down arrows, F7 popup, F8 completion), and alias support is implemented by the Windows console host (conhost.exe or openconsole.exe) for ReadFile() and ReadConsole() calls when the input stream is in line-input mode. Currently, it's the same whether a classic console session or a pseudoconsole (headless) session is hosted. When Windows Terminal is used, the overall connection of components looks like Python<->ConDrv (kernel device)<->OpenConsole<->NamedPipe (kernel device)<->Windows Terminal. The headless console's use of Windows Terminal for the user interface doesn't matter to Python's ReadConsoleW() call. A headless console session always starts with 4 history buffers (one for each attached process) that store up to 50 commands. For a classic console session, the initial number and size of history buffers can be configured in the session properties or defaults. It can always be set dynamically via SetConsoleHistoryInfo(). There's *undocumented* support to get the commands from a history buffer that's associated with the name of an attached process: GetConsoleCommandHistoryLengthW(executable_name) and GetConsoleCommandHistoryW(buffer, buffer_length, executable_name). However, the API provides no function to set the command history. I suppose one could loop over WriteConsoleInputW() and ReadConsoleW() to implement it as a kludge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 18:09:50 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 27 Nov 2021 23:09:50 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638054590.04.0.331062680824.issue45870@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks, Eryk, I only read the part of the issue that landed in my inbox (fhe first message and everything after Terry added me to the nosy list). Sorry. You wrote: > The console/terminal team at Microsoft apparently don't want to do anything with the builtin readline support, which is seen as a legacy feature. What does "the builtin readline support" refer to here? Presumably not GNU Readline? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 18:44:39 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Nov 2021 23:44:39 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638056679.36.0.574037273257.issue45870@roundup.psfhosted.org> Eryk Sun added the comment: > What does "the builtin readline support" refer to here? > Presumably not GNU Readline? That's referring to the readline(ish) support that's built into the console host for ReadFile() and ReadConsole() calls when the input stream is in line-input mode. I've never seen the console developers speak positively of this feature on their GitHub repo. They've suggested the addition of a native readline API on the client side, like PowerShell's PSReadLine module provides. But who knows when/if that would be released. Python has the third-party pyreadline module, but it's no longer actively developed. To bring pyreadline into the standard library would be a non-trivial task. OTOH, I assume if Microsoft provided an official readline API, which does all the heavy lifting, that Python could support it in the readline extension module, if the API is basically compatible with libreadline/libedit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 18:58:01 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 27 Nov 2021 23:58:01 +0000 Subject: [issue23819] test_asyncio fails when run under -O In-Reply-To: <1427808695.9.0.385563565443.issue23819@psf.upfronthosting.co.za> Message-ID: <1638057481.7.0.675267362223.issue23819@roundup.psfhosted.org> Guido van Rossum added the comment: I'm sure there's more to it, but I found at least this failure: ~/cpython$ ./python.exe -O -m test test_asyncio -m test_set_event_loop Raised RLIMIT_NOFILE: 256 -> 1024 0:00:00 load avg: 2.02 Run tests sequentially 0:00:00 load avg: 2.02 [1/1] test_asyncio test test_asyncio failed -- Traceback (most recent call last): File "/Users/guido/cpython/Lib/test/test_asyncio/test_events.py", line 2595, in test_set_event_loop self.assertRaises(AssertionError, policy.set_event_loop, object()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: AssertionError not raised by set_event_loop test_asyncio failed (1 failure) == Tests result: FAILURE == 1 test failed: test_asyncio Total duration: 134 ms Tests result: FAILURE Also this one: ~/cpython$ ./python.exe -O -m test test_asyncio -m test_create_datagram_endpoint_addr_error 0:00:00 load avg: 2.19 Run tests sequentially 0:00:00 load avg: 2.19 [1/1] test_asyncio test test_asyncio failed -- Traceback (most recent call last): File "/Users/guido/cpython/Lib/test/test_asyncio/test_base_events.py", line 1593, in test_create_datagram_endpoint_addr_error self.assertRaises( ^^^^^^^^^^^^^^^^^^ File "/Users/guido/cpython/Lib/unittest/case.py", line 734, in assertRaises return context.handle('assertRaises', args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/guido/cpython/Lib/unittest/case.py", line 218, in handle callable_obj(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/guido/cpython/Lib/asyncio/base_events.py", line 637, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/Users/guido/cpython/Lib/asyncio/base_events.py", line 1287, in create_datagram_endpoint infos = await self._ensure_resolved( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/guido/cpython/Lib/asyncio/base_events.py", line 1369, in _ensure_resolved info = _ipaddr_info(host, port, family, type, proto, *address[2:]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: _ipaddr_info() takes from 5 to 7 positional arguments but 12 were given test_asyncio failed (1 error) == Tests result: FAILURE == 1 test failed: test_asyncio Total duration: 165 ms Tests result: FAILURE I think calling assertRaises(AssertionError, ...) is definitely an anti-pattern. We can't remove all assertions from the asyncio library, but I think the ones that are explicitly checked for by the tests should go, at least. (Probably replaced with TypeError or ValueError in most cases.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 19:14:57 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Nov 2021 00:14:57 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1638056679.36.0.574037273257.issue45870@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Okay, so that's all hypothetical. It looks like the status quo is not likely to change, so we should just document it. I wonder if keeely is interested in submitting a PR for the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 21:10:28 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 28 Nov 2021 02:10:28 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1638065428.06.0.676542597632.issue45902@roundup.psfhosted.org> Gregory P. Smith added the comment: General consensus: There isn't a common need for this. ---------- nosy: +gregory.p.smith resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 21:26:51 2021 From: report at bugs.python.org (xmlsax) Date: Sun, 28 Nov 2021 02:26:51 +0000 Subject: [issue45911] SystemError occured while running an extention Message-ID: <1638066411.19.0.560872886041.issue45911@roundup.psfhosted.org> New submission from xmlsax <1627213803 at qq.com>: I got an while running openfile.open. Python release 3.9.6 ---------- components: C API files: openfile.c messages: 407182 nosy: xmlsax priority: normal severity: normal status: open title: SystemError occured while running an extention type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file50460/openfile.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 21:53:41 2021 From: report at bugs.python.org (Silvio Clecio) Date: Sun, 28 Nov 2021 02:53:41 +0000 Subject: [issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality Message-ID: <1638068021.43.0.0311621080056.issue45912@roundup.psfhosted.org> New submission from Silvio Clecio : Using a simple program as example, the argparse library prints the following text: usage: app.py [-h] options: -h, --help show this help message and exit However, for more formality, it would be nice to print something like this: Usage: app.py [-h] Options: -h, --help Show this help message and exit. Notice the sentences start as capital letters and the helper string finishes with dot. ---------- components: Parser messages: 407183 nosy: lys.nikolaou, pablogsal, silvioprog priority: normal severity: normal status: open title: [argparse] Print texts starting with capital letters and finish with dot for more formality _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 22:53:41 2021 From: report at bugs.python.org (Dan Yeaw) Date: Sun, 28 Nov 2021 03:53:41 +0000 Subject: [issue45913] Doctest Seg Fault with Python 3.10 on CI Message-ID: <1638071621.44.0.368027831233.issue45913@roundup.psfhosted.org> New submission from Dan Yeaw : When running pytest --doctest-modules, I am getting seg faults on the GitHub Actions CI when running doctests covering module docstrings. runner at fv-az177-300:~/work/gaphor/gaphor$ source .venv/bin/activate (.venv) runner at fv-az177-300:~/work/gaphor/gaphor$ xvfb-run gdb python (gdb) run -m pytest Starting program: /home/runner/work/gaphor/gaphor/.venv/bin/python -m pytest [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffecd32700 (LWP 22846)] [New Thread 0x7fffebd31700 (LWP 22847)] [New Thread 0x7fffead30700 (LWP 22848)] [New Thread 0x7fffe9d2f700 (LWP 22849)] [New Thread 0x7fffdbfff700 (LWP 22850)] [New Thread 0x7fffdaffe700 (LWP 22851)] [New Thread 0x7fffd9ffd700 (LWP 22852)] [New Thread 0x7fffcffff700 (LWP 22853)] [Detaching after fork from child process 22854] ============================= test session starts ============================== platform linux -- Python 3.10.0, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 rootdir: /home/runner/work/gaphor/gaphor, configfile: pyproject.toml, testpaths: gaphor, tests, docs plugins: mock-3.6.1, cov-3.0.0 collected 1135 items gaphor/action.py Thread 1 "python" received signal SIGSEGV, Segmentation fault. __GI___libc_free (mem=0x20) at malloc.c:3102 3102 malloc.c: No such file or directory. (gdb) source python-gdb.py (gdb) py-bt Traceback (most recent call first): File "", line 241, in _call_with_frames_removed File "", line 1176, in create_module File "", line 571, in module_from_spec File "", line 674, in _load_unlocked File "", line 1006, in _find_and_load_unlocked File "", line 1027, in _find_and_load File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/pdb.py", line 157, in __init__ import readline File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/doctest.py", line 364, in __init__ pdb.Pdb.__init__(self, stdout=out, nosigint=True) File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/doctest.py", line 1481, in run self.debugger = _OutputRedirectingPdb(save_stdout) File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/doctest.py", line 1856, in run r = DocTestRunner.run(self, test, compileflags, out, False) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/doctest.py", line 287, in runtest self.runner.run(self.dtest, out=failures) # type: ignore[arg-type] File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 162, in pytest_runtest_call item.runtest() File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall res = hook_impl.function(*args) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 255, in lambda: ihook(item=item, **kwds), when=when, reraise=reraise File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 311, in from_call result: Optional[TResult] = func() File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 254, in call_runtest_hook return CallInfo.from_call( File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 215, in call_and_report call = call_runtest_hook(item, when, **kwds) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 126, in runtestprotocol reports.append(call_and_report(item, "call", log)) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/runner.py", line 109, in pytest_runtest_protocol runtestprotocol(item, nextitem=nextitem) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall res = hook_impl.function(*args) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/main.py", line 348, in pytest_runtestloop item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall res = hook_impl.function(*args) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/main.py", line 323, in _main config.hook.pytest_runtestloop(session=session) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/main.py", line 269, in wrap_session session.exitstatus = doit(config, session) or 0 File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/main.py", line 316, in pytest_cmdline_main return wrap_session(config, _main) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall res = hook_impl.function(*args) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 265, in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 162, in main ret: Union[ExitCode, int] = config.hook.pytest_cmdline_main( File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 185, in console_main code = main() File "/home/runner/work/gaphor/gaphor/.venv/lib/python3.10/site-packages/pytest/__main__.py", line 5, in raise SystemExit(pytest.console_main()) File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, action.py is part of the Gaphor project here: https://github.com/gaphor/gaphor The doctest that it is seg faulting on is: >>> class A: ... @action(name="my_action", label="my action") ... def myaction(self): ... print("action called") >>> a = A() >>> a.myaction() action called >>> is_action(a.myaction) True >>> for method in dir(A): ... if is_action(getattr(A, method, None)): ... print(method) myaction >>> A.myaction.__action__.name 'my_action' >>> A.myaction.__action__.label 'my action' """ Running the doctests works fine manually: dan at localhost:~/Projects/gaphor> python -m doctest -v gaphor/action.py Trying: class A: @action(name="my_action", label="my action") def myaction(self): print("action called") Expecting nothing ok Trying: a = A() Expecting nothing ok Trying: a.myaction() Expecting: action called ok Trying: is_action(a.myaction) Expecting: True ok Trying: for method in dir(A): if is_action(getattr(A, method, None)): print(method) Expecting: myaction ok Trying: A.myaction.__action__.name Expecting: 'my_action' ok Trying: A.myaction.__action__.label Expecting: 'my action' ok 5 items had no tests: action action.action.__call__ action.action.__init__ action.action.detailed_name action.is_action 1 items passed all tests: 7 tests in action.action 7 tests in 6 items. 7 passed and 0 failed. Test passed. If I disable this doctests, the other doctests will seg fault as well. Using xdoctest instead of doctest also fixes the seg fault. I compiled Python 3.10.0 with debug enabled on the GitHub Actions runner, so I can provide the full backtrace if that is helpful. ---------- components: Library (Lib) messages: 407184 nosy: danyeaw priority: normal severity: normal status: open title: Doctest Seg Fault with Python 3.10 on CI type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 22:56:19 2021 From: report at bugs.python.org (jiahua wang) Date: Sun, 28 Nov 2021 03:56:19 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1638071779.01.0.978280636208.issue19460@roundup.psfhosted.org> Change by jiahua wang : ---------- keywords: +patch nosy: +180909 nosy_count: 4.0 -> 5.0 pull_requests: +28049 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 23:26:09 2021 From: report at bugs.python.org (Ma Lin) Date: Sun, 28 Nov 2021 04:26:09 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1638073569.05.3.24629207674e-05.issue33376@roundup.psfhosted.org> Ma Lin added the comment: Since 243b6c3b8fd3144450c477d99f01e31e7c3ebc0f (21-08-19), this bug can't be reproduced. In `pysqlite_do_all_statements()`, 243b6c3 resets statements like this: sqlite3_stmt *stmt = NULL; while ((stmt = sqlite3_next_stmt(self->db, stmt))) { if (sqlite3_stmt_busy(stmt)) { (void)sqlite3_reset(stmt); } } But the `pysqlite_Statement.in_use` flag is not reset. In `_pysqlite_query_execute()` function, if `pysqlite_Statement.in_use` flag is 1, it creates a new `pysqlite_Statement` instance. So this line will use a new statement: gen = conn.execute("SELECT c FROM t WHERE ?", (1,)) The duplicate row is from `pysqlite_Cursor.next_row` before 3df0fc89bc2714f5ef03e36a926bc795dcd5e05a (21-08-25). A digressive suggestion is whether it can be changed like this, and add a check for resetting statement. So that statements are not allowed to be reset by other Cursors, which may improve code robust: typedef struct { ... - int in_use; + pysqlite_Cursor *in_use; // points to the attached cursor ... } pysqlite_Statement; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 23:37:54 2021 From: report at bugs.python.org (Chang Zhou) Date: Sun, 28 Nov 2021 04:37:54 +0000 Subject: [issue45914] Very first multiprocessing example not working on Windows 11 Message-ID: <1638074274.33.0.534994157782.issue45914@roundup.psfhosted.org> New submission from Chang Zhou : Very first multiprocessing example not working on Windows 11 https://docs.python.org/3/library/multiprocessing.html from multiprocessing import Pool def f(x): return x*x if __name__ == '__main__': with Pool(5) as p: print(p.map(f, [1, 2, 3])) Tried Python 3.7, 3.8, 3.9, 3.10 Also tried Ubuntu which works fine. But on Windows (clean installed python): >>> from multiprocessing import Pool >>> def f(x): ... return x*x ... >>> with Pool(5) as p: ... print(p.map(f, [1, 2, 3])) ... Process SpawnPoolWorker-14: Process SpawnPoolWorker-13: Traceback (most recent call last): Process SpawnPoolWorker-15: File "C:\Program Files\Python39\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() Traceback (most recent call last): File "C:\Program Files\Python39\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Program Files\Python39\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Program Files\Python39\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Program Files\Python39\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Program Files\Python39\lib\multiprocessing\queues.py", line 368, in get return _ForkingPickler.loads(res) File "C:\Program Files\Python39\lib\multiprocessing\pool.py", line 114, in worker task = get() AttributeError: Can't get attribute 'f' on File "C:\Program Files\Python39\lib\multiprocessing\queues.py", line 368, in get return _ForkingPickler.loads(res) AttributeError: Can't get attribute 'f' on Traceback (most recent call last): File "C:\Program Files\Python39\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Program Files\Python39\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "C:\Program Files\Python39\lib\multiprocessing\pool.py", line 114, in worker task = get() File "C:\Program Files\Python39\lib\multiprocessing\queues.py", line 368, in get return _ForkingPickler.loads(res) AttributeError: Can't get attribute 'f' on ---------- components: Windows messages: 407186 nosy: paul.moore, quattrozhou, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Very first multiprocessing example not working on Windows 11 type: crash versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 23:48:56 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Nov 2021 04:48:56 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1638074936.54.0.599394429097.issue33376@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 27 23:56:54 2021 From: report at bugs.python.org (Ma Lin) Date: Sun, 28 Nov 2021 04:56:54 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1638075414.4.0.946232678948.issue33376@roundup.psfhosted.org> Ma Lin added the comment: This issue is not resolved, but was covered by a problematic behavior. Maybe this issue will be solved in issue44092, I'll study that issue later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 00:03:09 2021 From: report at bugs.python.org (neonene) Date: Sun, 28 Nov 2021 05:03:09 +0000 Subject: [issue45116] Performance regression 3.10b1: inlining issue in the big _PyEval_EvalFrameDefault() function with Visual Studio (MSC) In-Reply-To: <1630942038.24.0.156228540374.issue45116@roundup.psfhosted.org> Message-ID: <1638075789.66.0.880757511612.issue45116@roundup.psfhosted.org> neonene added the comment: I requested the MSVC team to reconsider the inlining issues, including __forceinline. https://developercommunity.visualstudio.com/t/1595341 The stuck at link due to __forceinline can be avoided by completing the _Py_DECREF optimization outside _PyEval_EvalFrameDefault: static inline void // no __forceinline _Py_DECREF_impl(...) { ... } static __forceinline void _Py_DECREF(...) { // no conditional branch in the function _Py_DECREF_impl(...); } In _PyEval_EvalFrameDefault, wrapping the callees like above seems better for performance than just specifying __forceinline under the current MSVC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 00:27:57 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Nov 2021 05:27:57 +0000 Subject: [issue45914] Very first multiprocessing example not working on Windows 11 In-Reply-To: <1638074274.33.0.534994157782.issue45914@roundup.psfhosted.org> Message-ID: <1638077277.6.0.235337794313.issue45914@roundup.psfhosted.org> Eryk Sun added the comment: > AttributeError: Can't get attribute 'f' > on The Windows API only supports the spawn method of process creation. In POSIX (except macOS), the default is the fork method, for which the child inherits the interactive main module of the parent. If you switch to the spawn method in Linux via multiprocessing.set_start_method('spawn'), you'll see the same error. multiprocessing is one package where it's necessary in Windows to test examples using a script. This is implied in the guidelines when it says to "[m]ake sure that the main module can be safely imported by a new Python interpreter without causing unintended side effects (such a starting a new process)". It's the fact the main module has to be importable by child processes that matters in this case. The behavior is noted with an example at the end of the introduction: Note Functionality within this package requires that the __main__ module be importable by the children. This is covered in Programming guidelines however it is worth pointing out here. This means that some examples, such as the multiprocessing.pool.Pool examples will not work in the interactive interpreter. For example: ... If it were up to me this note would be at the beginning of the introduction, where everyone would certainly see it. As is, the reader is expected to at least scan over the entire introduction. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 01:28:19 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Nov 2021 06:28:19 +0000 Subject: [issue45904] Pasting the U00FF character into Python REPL misinterprets character In-Reply-To: <1637944082.95.0.645505652849.issue45904@roundup.psfhosted.org> Message-ID: <1638080899.7.0.31186098487.issue45904@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the report. macOS does not ship with the GNU readline library due to its GPL licensing and instead relies on the BSD editline library, libedit, which, while providing similar functionality, has a different API than GNU readline. However, editline does provide a compatibility layer that provides much, but not all, of the GNU readline API. Third-party programs like Python have linked with that compatibility layer for many years but there are some shortcomings with it, like when trying to use full Unicode in the REPL as in your case. There have been many reports over the years of similar problems in Python and in other products that use the readline compatibility layer of libedit. If this behavior is unacceptable, the standard recommendation on the webs has been to use a version of the product that is linked with GNU readline rather than with libedit's readline layer. (Alas, Python does not support directly linking with libedit's native API which would likely avoid these issues.) The potential drawback to using GNU readline is that it is licensed under GPL v3 which may be unacceptable for some users. There is a third-party package on PyPI called gnureadline which allowed replacing the Python readline module with one linked with GNU readline; I'm not sure what its status is as it doesn't appear to have been updated recently. Alternatively, there are Python distributions from other sources (like Homebrew and MacPorts) that optionally provide GNU readline for Python. Hope that helps! ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 01:49:06 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 28 Nov 2021 06:49:06 +0000 Subject: [issue23599] single and double quotes stripped upon paste with MacPorts libedit In-Reply-To: <1425681436.7.0.781270448465.issue23599@psf.upfronthosting.co.za> Message-ID: <1638082146.01.0.129609185318.issue23599@roundup.psfhosted.org> Ned Deily added the comment: Getting back to this old issue, retesting with a current MacPorts Python 3.9.9 and libedit @20210910-3.1_1, I no longer see the problematic disappearance of the smart quotes; the example now produces the expected "invalid character in identifier" SyntaxError. So no further action is needed. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 02:04:36 2021 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 28 Nov 2021 07:04:36 +0000 Subject: [issue23010] "unclosed file" warning when defining unused logging FileHandler in dictConfig In-Reply-To: <1418046415.01.0.116582999558.issue23010@psf.upfronthosting.co.za> Message-ID: <1638083076.04.0.925948386941.issue23010@roundup.psfhosted.org> Vinay Sajip added the comment: This had dropped off my radar completely, but I still can't see where there's an actual bug here. This simplified script: import logging import sys LOGGING = { 'version': 1, 'handlers': { 'logfile': { 'level': 'DEBUG', 'class': 'logging.FileHandler', 'filename': '/tmp/debug.log', }, }, } print('Starting: %s' % sys.version) from logging.config import dictConfig dictConfig(LOGGING) print('After dictconfig') print('_handlerList 1, initial:', logging._handlerList, len(logging._handlers)) import importlib print('_handlerList 2, about to import shutil:', logging._handlerList, len(logging._handlers)) import shutil print('_handlerList 3, just imported shutil:', logging._handlerList, len(logging._handlers)) print('') when run with Python 3.10, produces Starting: 3.10.0+ (heads/3.10:7203ecd332, Oct 29 2021, 10:04:19) [GCC 7.5.0] After dictconfig _handlerList 1, initial: [] 1 _handlerList 2, about to import shutil: [] 1 /home/vinay/.local/lib/python3.10/_compression.py:33: ResourceWarning: unclosed file <_io.FileIO name='/tmp/debug.log' mode='ab' closefd=True> class DecompressReader(io.RawIOBase): ResourceWarning: Enable tracemalloc to get the object allocation traceback _handlerList 3, just imported shutil: [] 0 But ... there are no loggers that use this handler, so the only reference would be the weak reference in _handlerList - it gets freed up at some point (in this case, when shutil is imported, but I don't believe that's necessarily relevant) and that causes the ResourceWarning, but where's the problem? If you either add a reference to the handler (by adding it to a logger) or adding "delay: True" to the handler configuration dict to delay opening the file, the ResourceWarning is no longer seen. I tested with Python 3.4 - 3.10 and all versions behave the same way - it could just be down to where weak references get dumped, which is down to the vagaries of GC. I don't see this as a "leak" - the ResourceWarning is showing the developer that they opened a file for no particular reason and didn't use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 02:55:59 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 28 Nov 2021 07:55:59 +0000 Subject: [issue45914] Very first multiprocessing example not working on Windows 11 In-Reply-To: <1638074274.33.0.534994157782.issue45914@roundup.psfhosted.org> Message-ID: <1638086159.33.0.619021710057.issue45914@roundup.psfhosted.org> Change by Alex Waygood : ---------- type: crash -> behavior versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:13:53 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 28 Nov 2021 09:13:53 +0000 Subject: [issue45911] SystemError occured while running an extention In-Reply-To: <1638066411.19.0.560872886041.issue45911@roundup.psfhosted.org> Message-ID: <1638090833.04.0.689309727902.issue45911@roundup.psfhosted.org> Eric V. Smith added the comment: At first glance, it looks like: if(!(PyArg_ParseTuple(args,"s",s))) return NULL; should be: if(!(PyArg_ParseTuple(args,"s",&s))) return NULL; The docs say: "A pointer to an existing string is stored in the character pointer variable whose address you pass." ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:24:33 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Nov 2021 09:24:33 +0000 Subject: [issue45911] SystemError occured while running an extention In-Reply-To: <1638066411.19.0.560872886041.issue45911@roundup.psfhosted.org> Message-ID: <1638091473.55.0.425989227042.issue45911@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:24:45 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Nov 2021 09:24:45 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1638091485.69.0.773612932739.issue19460@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 46c8d915715aa2bd4d697482aa051fe974d440e1 by 180909 in branch 'main': bpo-19460: Add test for MIMENonMultipart (GH-29817) https://github.com/python/cpython/commit/46c8d915715aa2bd4d697482aa051fe974d440e1 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:25:00 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Nov 2021 09:25:00 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1638091500.53.0.250191510586.issue19460@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28050 pull_request: https://github.com/python/cpython/pull/29818 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:25:04 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Nov 2021 09:25:04 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1638091504.24.0.921017340428.issue19460@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28051 pull_request: https://github.com/python/cpython/pull/29819 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:39:33 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Nov 2021 09:39:33 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1638092373.95.0.0680559646671.issue45739@roundup.psfhosted.org> Mark Dickinson added the comment: Eric, Serhiy: do you have opinions on the right way forward? Here are 6 options, on a spectrum of increasing level of acceptance of "N". -2. Remove "N" support for cdecimal right now (i.e., for Python 3.11), on the basis that there's no need for deprecation warnings, because it was never officially a feature. -1. Deprecate "N" support for cdecimal, remove it in Python 3.13. 0. Do nothing (the default), leaving _pydecimal and cdecimal inconsistent. 1. Add "N" support to the Python implementation for parity with cdecimal, but don't document it - leave it as an undocumented feature. 2. Officially add "N" support to decimal formatting - add documentation, tests, and fix the Python implementation. 3. Officially add "N" support to all numeric formatting ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 04:40:49 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Nov 2021 09:40:49 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1638092449.49.0.901811530707.issue45739@roundup.psfhosted.org> Mark Dickinson added the comment: I could be persuaded for any of options -1, 1 and 2. I don't much like option 0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 05:13:07 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Nov 2021 10:13:07 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid Message-ID: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> New submission from Christian Heimes : is_valid_fd() uses dup() or fstat() to check whether an fd is valid. Both operations are costly. fcntl() with F_GETFD returns the file descriptor flags (e.g. CLOEXEC) and -1 with errno set to EBADF when fd is not an open file descriptor. It's faster than duplicating + closing a fd or calling fstat(). The idea to use fcntl(fd, F_GETFD) is inspired by the patch [1]. According to Stackoverflow [2]: > fcntl(fd, F_GETFD) is the canonical cheapest way to check that fd is a valid open file descriptor. > F_GETFD is cheaper in principle since it only dereferences the (process-local) file descriptor in kernel space, not the underlying open file description (process-shared) which it refers to. [1] https://github.com/singlestore-labs/cpython/commit/0364554615c79b9364a0acf3038147a999ea2219 [2] https://stackoverflow.com/questions/12340695/how-to-check-if-a-given-file-descriptor-stored-in-a-variable-is-still-valid ---------- components: C API messages: 407197 nosy: christian.heimes, vstinner priority: normal severity: normal status: open title: Use fcntl(fd, F_GETFD) to check whether an fd is valid type: behavior versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 05:14:51 2021 From: report at bugs.python.org (jiahua wang) Date: Sun, 28 Nov 2021 10:14:51 +0000 Subject: [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1638094491.58.0.318719509696.issue28445@roundup.psfhosted.org> Change by jiahua wang : ---------- keywords: +patch nosy: +180909 nosy_count: 4.0 -> 5.0 pull_requests: +28052 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 05:28:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Nov 2021 10:28:50 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1638095330.43.0.696760217713.issue45915@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +28053 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29821 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 05:57:14 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Nov 2021 10:57:14 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1638097034.78.0.0107835278213.issue19460@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 2c398a5acf85d1bbc5796f3385972d0759b90e54 by Miss Islington (bot) in branch '3.10': [3.10] bpo-19460: Add test for MIMENonMultipart (GH-29817) (GH-29818) https://github.com/python/cpython/commit/2c398a5acf85d1bbc5796f3385972d0759b90e54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:00:57 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Nov 2021 12:00:57 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638100857.8.0.145764734778.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset aaf42222cfd5774d23ca48ff304ace1f64426201 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Port _multiprocessing to PY_STDLIB_MOD (GH-29768) https://github.com/python/cpython/commit/aaf42222cfd5774d23ca48ff304ace1f64426201 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:14:56 2021 From: report at bugs.python.org (Tony Zhou) Date: Sun, 28 Nov 2021 12:14:56 +0000 Subject: [issue45916] documentation link error Message-ID: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> New submission from Tony Zhou : 3.10.0 Documentation ? The Python Tutorial ? 15. Floating Point Arithmetic: Issues and Limitationsin in the link "The Perils of Floating Point" brings user to https://www.hmbags.tw/ I don't think this is right. please check ---------- messages: 407200 nosy: cookiez6 priority: normal severity: normal status: open title: documentation link error type: security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:18:59 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 12:18:59 +0000 Subject: [issue31184] Fix data descriptor detection in inspect.getattr_static In-Reply-To: <1502468531.27.0.204472955702.issue31184@psf.upfronthosting.co.za> Message-ID: <1638101939.1.0.227673280172.issue31184@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:22:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 12:22:11 +0000 Subject: [issue28140] Attempt to give better errors for pip commands typed into the REPL In-Reply-To: <1473828003.51.0.301742763108.issue28140@psf.upfronthosting.co.za> Message-ID: <1638102131.82.0.748914072161.issue28140@roundup.psfhosted.org> Irit Katriel added the comment: On 3.11: >>> pip install requests File "", line 1 pip install requests ^^^^^^^^^^^ SyntaxError: invalid syntax. Perhaps you forgot a comma? ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:25:20 2021 From: report at bugs.python.org (Alex Waygood) Date: Sun, 28 Nov 2021 12:25:20 +0000 Subject: [issue28140] Attempt to give better errors for pip commands typed into the REPL In-Reply-To: <1473828003.51.0.301742763108.issue28140@psf.upfronthosting.co.za> Message-ID: <1638102320.9.0.482457741791.issue28140@roundup.psfhosted.org> Alex Waygood added the comment: Similar discussion in a newer issue: https://bugs.python.org/issue45721 ---------- nosy: +AlexWaygood, pablogsal, steven.daprano, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:36:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 12:36:08 +0000 Subject: [issue16726] expat ParseFile expects bytes, not string In-Reply-To: <1355914609.66.0.723053050254.issue16726@psf.upfronthosting.co.za> Message-ID: <1638102968.04.0.0888582248152.issue16726@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- components: +Library (Lib) nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 07:59:47 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 12:59:47 +0000 Subject: [issue10149] [doc] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1638104387.03.0.741186421025.issue10149@roundup.psfhosted.org> Irit Katriel added the comment: Eric's patch needs to be converted to a GitHub PR. ---------- components: +Library (Lib) keywords: +easy -patch nosy: +iritkatriel title: Data truncation in expat parser -> [doc] Data truncation in expat parser versions: +Python 3.11 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 08:04:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 13:04:55 +0000 Subject: [issue12970] [doc] os.walk() consider some symlinks as dirs instead of non-dirs In-Reply-To: <1315918932.02.0.810529185276.issue12970@psf.upfronthosting.co.za> Message-ID: <1638104695.43.0.22370059771.issue12970@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: os.walk() consider some symlinks as dirs instead of non-dirs -> [doc] os.walk() consider some symlinks as dirs instead of non-dirs versions: +Python 3.11 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 08:08:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 13:08:56 +0000 Subject: [issue22618] [doc] urllib.parse.parse_qsl different results after urllib.parse.unquote In-Reply-To: <1413122181.37.0.728502828464.issue22618@psf.upfronthosting.co.za> Message-ID: <1638104936.79.0.281226452033.issue22618@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: urllib.parse.parse_qsl different results after urllib.parse.unquote -> [doc] urllib.parse.parse_qsl different results after urllib.parse.unquote versions: +Python 3.11 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 08:14:00 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 13:14:00 +0000 Subject: [issue22356] mention explicitly that stdlib assumes gmtime(0) epoch is 1970 In-Reply-To: <1410110444.5.0.966357232963.issue22356@psf.upfronthosting.co.za> Message-ID: <1638105240.68.0.402685843203.issue22356@roundup.psfhosted.org> Irit Katriel added the comment: The docs now say "The epoch is the point where the time starts, and is platform dependent. For Unix, the epoch is January 1, 1970, 00:00:00 (UTC). To find out what the epoch is on a given platform, look at time.gmtime(0)." which I believe covers this issue. ---------- nosy: +iritkatriel resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> time.time() documentation should mention UTC timezone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 08:17:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 13:17:44 +0000 Subject: [issue20281] [doc] time.strftime %z format specifier is the same as %Z In-Reply-To: <1389897342.88.0.737767593135.issue20281@psf.upfronthosting.co.za> Message-ID: <1638105464.33.0.413911085982.issue20281@roundup.psfhosted.org> Irit Katriel added the comment: Seems like the only thing to do on this issue is to add a reference to the footnote in the table entries for %z and %Z. ---------- components: +Library (Lib) keywords: +easy nosy: +iritkatriel title: time.strftime %z format specifier is the same as %Z -> [doc] time.strftime %z format specifier is the same as %Z type: behavior -> enhancement versions: +Python 3.11 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 08:21:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 13:21:44 +0000 Subject: [issue17383] [doc] Possibly ambiguous phrasing in tutorial/modules#more-on-modules In-Reply-To: <1362700500.92.0.448355159104.issue17383@psf.upfronthosting.co.za> Message-ID: <1638105704.33.0.604830443731.issue17383@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Possibly ambiguous phrasing in tutorial/modules#more-on-modules -> [doc] Possibly ambiguous phrasing in tutorial/modules#more-on-modules versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 08:29:09 2021 From: report at bugs.python.org (Dan Yeaw) Date: Sun, 28 Nov 2021 13:29:09 +0000 Subject: [issue45913] readline + GTK + Pytest Seg Fault with Python 3.7 and 3.10 on CI In-Reply-To: <1638071621.44.0.368027831233.issue45913@roundup.psfhosted.org> Message-ID: <1638106149.42.0.353082387193.issue45913@roundup.psfhosted.org> Dan Yeaw added the comment: I continued to look in to this and updated the title of the issue, I don't think this is caused by doctest. I also updated a minimum example here: https://github.com/danyeaw/plugin-console-test If using pytest and GTK, any module loaded that makes use of readline causes a seg fault on CI. For example rlcompleter and doctest cause the crash, and even just importing readline. This is reproducible for Python 3.10 and Python 3.7, but not 3.8 or 3.9. ---------- title: Doctest Seg Fault with Python 3.10 on CI -> readline + GTK + Pytest Seg Fault with Python 3.7 and 3.10 on CI versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 09:25:16 2021 From: report at bugs.python.org (jiahua wang) Date: Sun, 28 Nov 2021 14:25:16 +0000 Subject: [issue18717] test for request.urlretrieve In-Reply-To: <1376336214.18.0.793709816185.issue18717@psf.upfronthosting.co.za> Message-ID: <1638109516.38.0.537292938946.issue18717@roundup.psfhosted.org> Change by jiahua wang : ---------- nosy: +180909 nosy_count: 2.0 -> 3.0 pull_requests: +28054 pull_request: https://github.com/python/cpython/pull/29822 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 09:33:58 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Nov 2021 14:33:58 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1638110038.26.0.418750774121.issue19460@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 209cec8a2a2e845df5af764a9171af05a2a4c8e3 by Miss Islington (bot) in branch '3.9': [3.9] bpo-19460: Add test for MIMENonMultipart (GH-29817) (#29819) https://github.com/python/cpython/commit/209cec8a2a2e845df5af764a9171af05a2a4c8e3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 09:46:17 2021 From: report at bugs.python.org (jiahua wang) Date: Sun, 28 Nov 2021 14:46:17 +0000 Subject: [issue19737] Documentation of globals() and locals() should be improved In-Reply-To: <1385225461.09.0.671908077084.issue19737@psf.upfronthosting.co.za> Message-ID: <1638110777.22.0.580765909213.issue19737@roundup.psfhosted.org> Change by jiahua wang : ---------- nosy: +180909 nosy_count: 5.0 -> 6.0 pull_requests: +28055 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 10:02:42 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Nov 2021 15:02:42 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1638111762.76.0.302838597652.issue45739@roundup.psfhosted.org> Raymond Hettinger added the comment: I support deprecating "N". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 10:45:36 2021 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 28 Nov 2021 15:45:36 +0000 Subject: [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1638114336.88.0.79132970721.issue28499@roundup.psfhosted.org> Vinay Sajip added the comment: Closing, as no objections raised. ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 11:51:59 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 28 Nov 2021 16:51:59 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1638118319.11.0.101485728226.issue45739@roundup.psfhosted.org> Eric V. Smith added the comment: I'd support -1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 11:53:49 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Nov 2021 16:53:49 +0000 Subject: [issue45721] Improve error message for OS command entered at >>> prompt In-Reply-To: <1636077220.31.0.800245298483.issue45721@roundup.psfhosted.org> Message-ID: <1638118429.07.0.0459020916132.issue45721@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Attempt to give better errors for pip commands typed into the REPL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 12:39:04 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Nov 2021 17:39:04 +0000 Subject: [issue28140] Give better errors for OS commands, like 'pip', in REPL, script In-Reply-To: <1473828003.51.0.301742763108.issue28140@psf.upfronthosting.co.za> Message-ID: <1638121144.08.0.89164087242.issue28140@roundup.psfhosted.org> Terry J. Reedy added the comment: I closed #45721, which has additional comments, as a duplicate of this. 'print foo' now results in "SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?" ---------- components: +Interpreter Core nosy: +aroberge title: Attempt to give better errors for pip commands typed into the REPL -> Give better errors for OS commands, like 'pip', in REPL, script _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 12:47:29 2021 From: report at bugs.python.org (Gideon) Date: Sun, 28 Nov 2021 17:47:29 +0000 Subject: [issue45917] Add math.exp2() function: 2^x Message-ID: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> New submission from Gideon : Dear Python Support Team, I was looking through Python?s list of supported methods in the math module, and I noticed that C99?s exp2 method was not implemented. This method raises 2 to the power of the supplied argument. I understand that it?s pretty trivial to so this in Python using 2**x or math.pow(x, 2), but I think there are a few reasons why we might want to incorporate it: Uniformity: This method exists most other programming languages and libraries, including numpy. Consistency: Every math method from C99 except exp2 is in python?s math or cmath module (math.cbrt will be added as of python 3.11). Triviality: this method is a part of C99 and is also supported by Visual Studio, so it?s very easy to implement. Accuracy(?): a libm exp2 is supposedly more accurate than pow(2.0, x), though I don?t really see how this would be the case (See https://bugs.python.org/issue31980) That said, this method is a little redundant, so I completely understand if this request is rejected Non-exhaustive list of other languages / libraries that use this method: Rust: https://docs.rs/libm/0.1.1/libm/fn.exp2.html Javascript: https://github.com/stdlib-js/math-base-special-exp2 Numpy: https://numpy.org/doc/stable/reference/generated/numpy.exp2.html C++: https://en.cppreference.com/w/cpp/numeric/math/exp2 (Not authoritative) Ruby: https://www.rubydoc.info/gems/ruby-mpfi/MPFI%2FMath.exp2 Similar Issues: https://bugs.python.org/issue44357 https://bugs.python.org/issue31980 ---------- components: Library (Lib) messages: 407214 nosy: Gideon priority: normal severity: normal status: open title: Add math.exp2() function: 2^x type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 12:48:32 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Nov 2021 17:48:32 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638121712.62.0.452682263134.issue45917@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +mark.dickinson, rhettinger, serhiy.storchaka, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 13:05:23 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Nov 2021 18:05:23 +0000 Subject: [issue45918] Possibly use ROUND_05UP in decimal's localcontext() example Message-ID: <1638122723.34.0.989498425912.issue45918@roundup.psfhosted.org> New submission from Raymond Hettinger : Candidate example: with localcontext() as ctx: ctx.prec += 10 # Perform a higher precision calculation ctx.rounding = ROUND_05UP # Avoid double rounding of the final calculation step s = calculate_something() s = +s # Round the final result back to the default precision Thoughts: * This would highlight the intended purpose of ROUND_05UP. * Usually, it would slightly improve accuracy. * OTOH, it would rarely make a difference in practice. https://docs.python.org/3/library/decimal.html#decimal.localcontext ---------- assignee: rhettinger components: Documentation messages: 407215 nosy: mark.dickinson, rhettinger, tim.peters priority: normal severity: normal status: open title: Possibly use ROUND_05UP in decimal's localcontext() example versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 13:10:38 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Nov 2021 18:10:38 +0000 Subject: [issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality In-Reply-To: <1638068021.43.0.0311621080056.issue45912@roundup.psfhosted.org> Message-ID: <1638123038.43.0.980236586527.issue45912@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: -pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 13:25:34 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Nov 2021 18:25:34 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1638123934.19.0.140847870252.issue45915@roundup.psfhosted.org> Eryk Sun added the comment: In Windows, GetFileType((HANDLE)_get_osfhandle(fd)) is several times faster than close(dup(fd)). For example: #if defined(MS_WINDOWS) int type; _Py_BEGIN_SUPPRESS_IPH type = GetFileType((HANDLE)_get_osfhandle(fd)); _Py_END_SUPPRESS_IPH return type != FILE_TYPE_UNKNOWN; #endif If the C file descriptor isn't assigned and flagged FOPEN, then _get_osfhandle() returns (intptr_t)-1. This is the pseudohandle value for the current process, so GetFileType() will fail with an invalid handle error, as expected. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 13:40:39 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Nov 2021 18:40:39 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1638124839.25.0.270136307788.issue45915@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f87ea0350286837e9e96de03f8bfa215176c2928 by Christian Heimes in branch 'main': bpo-45915: use fcntl(fd, F_GETFD) in is_valid_fd() (GH-29821) https://github.com/python/cpython/commit/f87ea0350286837e9e96de03f8bfa215176c2928 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 13:51:42 2021 From: report at bugs.python.org (Vishal Pandey) Date: Sun, 28 Nov 2021 18:51:42 +0000 Subject: [issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality In-Reply-To: <1638068021.43.0.0311621080056.issue45912@roundup.psfhosted.org> Message-ID: <1638125502.21.0.481676936606.issue45912@roundup.psfhosted.org> Vishal Pandey added the comment: I would like to work on it as my first contribution to the python repository. Can you please assign this to me? ---------- nosy: +vishalpandeyvip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:05:02 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Nov 2021 19:05:02 +0000 Subject: [issue45918] Possibly use ROUND_05UP in decimal's localcontext() example In-Reply-To: <1638122723.34.0.989498425912.issue45918@roundup.psfhosted.org> Message-ID: <1638126302.38.0.15589512066.issue45918@roundup.psfhosted.org> Raymond Hettinger added the comment: I?m concerned though that the intermediate calculations might be worse off than with some other rounding mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:17:43 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 28 Nov 2021 19:17:43 +0000 Subject: [issue44695] asdict use deep copy to dataclass instances In-Reply-To: <1626866962.24.0.087690350539.issue44695@roundup.psfhosted.org> Message-ID: <1638127063.46.0.199729830419.issue44695@roundup.psfhosted.org> Andrei Kulakov added the comment: Duplicate of https://bugs.python.org/issue43905 ---------- nosy: +andrei.avk resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> dataclasses.astuple does deepcopy on all fields _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:21:47 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Nov 2021 19:21:47 +0000 Subject: [issue45919] Use WinAPI GetFileType() in is_valid_fd() Message-ID: <1638127307.77.0.0584468495635.issue45919@roundup.psfhosted.org> New submission from Eryk Sun : During startup, is_valid_fd() in Python/pylifecycle.c is called to validate stdin, stdout, and stderr. Performance isn't critical here, but every bit helps in reducing startup time. In my tests, implementing this check in Windows via GetFileType((HANDLE)_get_osfhandle(fd)) is 5-6 times faster than close(dup(fd)). For example: #if defined(MS_WINDOWS) HANDLE hfile; _Py_BEGIN_SUPPRESS_IPH hfile = (HANDLE)_get_osfhandle(fd); _Py_END_SUPPRESS_IPH return (hfile != INVALID_HANDLE_VALUE && GetFileType(hfile) != FILE_TYPE_UNKNOWN); #endif ---------- components: Interpreter Core, Windows keywords: easy (C) messages: 407221 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Use WinAPI GetFileType() in is_valid_fd() type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:23:14 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Nov 2021 19:23:14 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1638127394.66.0.657771258959.issue45915@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg407216 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:25:09 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Nov 2021 19:25:09 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1638127509.38.0.287563795899.issue45915@roundup.psfhosted.org> Eryk Sun added the comment: I've created bpo-45919 with a suggested enhancement to use GetFileType() in Windows, since the Windows C runtime does not provide fcntl(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:29:16 2021 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Nov 2021 19:29:16 +0000 Subject: [issue45918] Possibly use ROUND_05UP in decimal's localcontext() example In-Reply-To: <1638122723.34.0.989498425912.issue45918@roundup.psfhosted.org> Message-ID: <1638127756.7.0.827680018859.issue45918@roundup.psfhosted.org> Tim Peters added the comment: Not a good idea in general - this rounding mode is _mostly_ "to zero", and isn't intended for chains of operations. I don't believe I've ever seen it used in a real program, so the current "no example at all" is a fair representation of real usage ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:31:12 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Nov 2021 19:31:12 +0000 Subject: [issue45915] Use fcntl(fd, F_GETFD) to check whether an fd is valid In-Reply-To: <1638094386.96.0.551592531479.issue45915@roundup.psfhosted.org> Message-ID: <1638127872.76.0.569022658646.issue45915@roundup.psfhosted.org> Christian Heimes added the comment: Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:31:34 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Nov 2021 19:31:34 +0000 Subject: [issue45918] Possibly use ROUND_05UP in decimal's localcontext() example In-Reply-To: <1638122723.34.0.989498425912.issue45918@roundup.psfhosted.org> Message-ID: <1638127894.54.0.538246171573.issue45918@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:44:25 2021 From: report at bugs.python.org (Tom Viner) Date: Sun, 28 Nov 2021 19:44:25 +0000 Subject: [issue28140] Give better errors for OS commands, like 'pip', in REPL, script In-Reply-To: <1473828003.51.0.301742763108.issue28140@psf.upfronthosting.co.za> Message-ID: <1638128665.5.0.455390186679.issue28140@roundup.psfhosted.org> Tom Viner added the comment: I've updated my pull request from 3 years ago. Fixed merge conflicts and addressed all comments. https://github.com/python/cpython/pull/8536 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:45:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 19:45:56 +0000 Subject: [issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality In-Reply-To: <1638068021.43.0.0311621080056.issue45912@roundup.psfhosted.org> Message-ID: <1638128756.91.0.677385218536.issue45912@roundup.psfhosted.org> Irit Katriel added the comment: I don't think argparse should do such formatting. You can give it the help text in this format if that's what you want printed, and you can implement your own formatter: https://docs.python.org/3/library/argparse.html#formatter-class ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 14:56:33 2021 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Nov 2021 19:56:33 +0000 Subject: [issue45918] Possibly use ROUND_05UP in decimal's localcontext() example In-Reply-To: <1638122723.34.0.989498425912.issue45918@roundup.psfhosted.org> Message-ID: <1638129393.16.0.781891026044.issue45918@roundup.psfhosted.org> Tim Peters added the comment: I'll add that the rounding mode is intended to ease emulating fixed-point arithmetic. The decimal spec claimed that was a goal, but there really isn't any direct support for saying, e.g., "I want two digits after the decimal point". Only for specifying total precision, independent of the radix point's position. So, e.g., if you want to work with tax rates, etc, but keeping results to penny precision, 1. Set the rounding mode to ROUND_05UP with "plenty of" precision digits. 2. To add, say, a statutory 3.578% tax rate to an item with cost C: C *= decimal.Decimal("1.03578") C = C.quantize(decimal.Decimal(".01"), decimal.ROUND_HALF_UP) or whatever final rounding mode local statutes require. I"m not sure anyone other than Mike Cowlishaw realizes that, though ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 15:30:52 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Nov 2021 20:30:52 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1638131452.38.0.983600077255.issue45739@roundup.psfhosted.org> Serhiy Storchaka added the comment: I have no strong opinion. I found the discrepancy when reviewed one of Mark's PRs. I was surprised because I did not know that "N" is supported. On other hand, there are reasons for supporting upper-case variant of "n" if we support upper-case variants of "e", "g" and "x" (formats which produce output containing letters). There is an alternative solution of the problem solved by upper-case variations of formats: add a special converter for converting a string to upper case, so for example f'{x:12.8E}' could be written as f'{x:12.8e!u}'. I prefer -1 or 2. If we choose deprecation I prefer adding an upper-case converter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 15:56:11 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Nov 2021 20:56:11 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638132971.48.0.804109724322.issue45917@roundup.psfhosted.org> Mark Dickinson added the comment: Sounds good to me, provided that all the common platforms that we care about have a reasonable quality implementation. This should be a straightforward wrapping of the C99 function, and with sufficient tests the buildbots should tell us if there are any issues on common platforms. @Gideon: are you're interested in working on a pull request? I'd be happy to review. (Ideally I'd like to have exp10 too, but that's not in C99 so platform support is likely to be spotty. If anyone's interested in pursuing that, we should make it a separate issue.) > a libm exp2 is supposedly more accurate than pow(2.0, x), though I don?t really see how this would be the case pow is a difficult function to implement at high accuracy, and there are a good number of low quality pow implementations around in system math libraries. It's much easier to come up with a high accuracy implementation of a single-argument function - there are well known techniques for generating approximating polynomials that simply don't extend well to functions of two arguments. sqrt is similar: pow(x, 0.5) is very often not correctly rounded even on systems where sqrt(x) _is_. (Though that one's a bit of a cheat, since common processors have dedicated instructions for a correctly-rounded sqrt.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 16:00:41 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Nov 2021 21:00:41 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638133241.7.0.654870836699.issue45917@roundup.psfhosted.org> Mark Dickinson added the comment: See also previous discussion towards the end of https://bugs.python.org/issue3366. FWIW, I don't think there's value in adding exp2 to the cmath module too: we'd have to write our own implementation, and it's just not a function that appears often in the complex world. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 16:23:47 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Nov 2021 21:23:47 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1638134627.45.0.393002331751.issue42268@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 8d1a5800645575ec876932bbb9aed3aa65d18f46 by Pablo Galindo Salgado in branch '3.10': [3.10] bpo-42268: Fail the configure step if the selected compiler doesn't support memory sanitizer (GH-29806) (GH-29815) https://github.com/python/cpython/commit/8d1a5800645575ec876932bbb9aed3aa65d18f46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 16:24:58 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Nov 2021 21:24:58 +0000 Subject: [issue42268] ./configure failing when --with-memory-sanitizer specified In-Reply-To: <1604536775.12.0.717833990014.issue42268@roundup.psfhosted.org> Message-ID: <1638134698.26.0.498144093346.issue42268@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 16:33:10 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 28 Nov 2021 21:33:10 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638135190.3.0.180235147182.issue45917@roundup.psfhosted.org> Mark Dickinson added the comment: On the subject of accuracy, there doesn't seem to be much in it on my mac laptop, and it looks as though pow(2.0, x) is giving correctly rounded results as often as (if not more often than) exp2(x). Here's the log of a terminal session, after recompiling Python to add exp2. It shows the ulps error (tested against a high-precision Decimal computation, which we're treating as representing the "exact" result) for both exp2(x) and pow(2.0, x) when the two results differ, for a selection of randomly chosen x in the range(-1000.0, 1000.0). Columns in the output are: x (in hex), x (in decimal), ulps error in exp2(x), ulps error in pow(2.0, x) >>> from decimal import getcontext, Decimal >>> from math import exp2, pow, ulp >>> import random >>> getcontext().prec = 200 >>> def exp2_error_ulps(x): ... libm = exp2(x) ... exactish = 2**Decimal(x) ... return float(Decimal(libm) - exactish) / ulp(libm) ... >>> def pow2_error_ulps(x): ... libm = pow(2.0, x) ... exactish = 2**Decimal(x) ... return float(Decimal(libm) - exactish) / ulp(libm) ... >>> for n in range(10000): ... x = random.uniform(-1000.0, 999.0) + random.random() ... if exp2(x) != pow(2.0, x): ... print(f"{x.hex():21} {x:22.17f} {exp2_error_ulps(x): .5f}, {pow2_error_ulps(x): .5f}") ... 0x1.e28f2ad3da122p+5 60.31990590581177969 0.50669, -0.49331 -0x1.929e790e1d293p+9 -805.23806930946227567 0.50082, -0.49918 -0x1.49803564f5b8ap+8 -329.50081473349621319 0.49736, -0.50264 -0x1.534cf08081f4bp+8 -339.30054476902722627 -0.50180, 0.49820 -0x1.b430821fb4ad2p+8 -436.18948553238908517 -0.49883, 0.50117 0x1.2c87a8431bd8fp+8 300.52991122655743084 -0.50376, 0.49624 0x1.3e476f9a09c8cp+7 159.13952332848964488 0.50062, -0.49938 0x1.cb8b9c61e7e89p+9 919.09070991347937252 0.49743, -0.50257 0x1.ab86ed0e6c7f6p+9 855.05410938546879152 0.49742, -0.50258 0x1.97bc9af3cbf85p+9 815.47347876986952997 -0.50076, 0.49924 -0x1.b5434441ba11bp+8 -437.26276026528074681 -0.50062, 0.49938 -0x1.0ead35218910ep+9 -541.35318392937347198 0.50192, -0.49808 -0x1.dbae0b861b89cp+9 -951.35972668022759535 0.50601, -0.49399 0x1.522f005d2dcc4p+6 84.54589982597377684 -0.50704, 0.49296 0x1.398ff48d53ee1p+9 627.12465063665524667 -0.50102, 0.49898 -0x1.381307fbd89f5p+5 -39.00929257159069863 -0.50526, 0.49474 0x1.9dc4c85f7c53ap+9 827.53736489840161994 -0.50444, 0.49556 0x1.b357f6012d3c2p+9 870.68719496449216422 -0.50403, 0.49597 -0x1.a6446703677bbp+9 -844.53439371636284250 0.50072, -0.49928 0x1.e3dd54b28998bp+7 241.93228681497234334 0.49897, -0.50103 0x1.b4f77f18a233ep+8 436.96678308448815642 0.49593, -0.50407 -0x1.578c4ce7a7c1bp+3 -10.73587651486564276 -0.50505, 0.49495 0x1.25a9540e1ee65p+5 36.70767985374258302 0.49867, -0.50133 -0x1.6e220f7db7668p+8 -366.13304887511776542 -0.49904, 0.50096 -0x1.94214ed3e5264p+9 -808.26021813095985635 0.50420, -0.49580 0x1.9dcc3d281da18p+5 51.72472602215219695 -0.50423, 0.49577 -0x1.3ba66909e6a40p+7 -157.82502013149678532 -0.50077, 0.49923 -0x1.9eac2c52a1b47p+9 -829.34510262389892432 -0.50540, 0.49460 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 16:35:42 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 28 Nov 2021 21:35:42 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1638135342.93.0.196772538362.issue45739@roundup.psfhosted.org> Eric V. Smith added the comment: While I'd prefer -1 overall, I would also prefer 3 over 2. If we were adding the feature from scratch, we wouldn't have decimal differ from int, float, and complex. And I'm not in favor of an uppercase converter, no matter what we do here. The other converters work like: f'{obj!s}' -> format(str(obj)) f'{obj!r}' -> format(repr(obj)) but the proposed !u would be f'{obj!u}' -> format(obj).upper() That is, it operates on the result of __format__, not its input. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 17:09:09 2021 From: report at bugs.python.org (Gideon) Date: Sun, 28 Nov 2021 22:09:09 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638137349.1.0.119615540347.issue45917@roundup.psfhosted.org> Gideon added the comment: Sounds good. I've already made the necessary code changes on my own build, so I'll just finish writing the tests + documentation and submit a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 17:12:11 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Sun, 28 Nov 2021 22:12:11 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1638137531.52.0.44839884769.issue33376@roundup.psfhosted.org> Erlend E. Aasland added the comment: > Maybe this issue will be solved in issue44092 Yes, this will be resolved in bpo-44092. Hopefully I'll be able to land it sooner than later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 17:13:02 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Sun, 28 Nov 2021 22:13:02 +0000 Subject: [issue44678] Seperate error message for discontinuous padding in binascii.a2b_base64 strict mode In-Reply-To: <1626719574.0.0.378248242955.issue44678@roundup.psfhosted.org> Message-ID: <1638137582.41.0.558640143518.issue44678@roundup.psfhosted.org> Andrei Kulakov added the comment: Looks like it's fixed so closing it.. ---------- nosy: +andrei.avk, kj resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 17:59:43 2021 From: report at bugs.python.org (Arthur Milchior) Date: Sun, 28 Nov 2021 22:59:43 +0000 Subject: [issue45920] make doctest fails Message-ID: <1638140383.16.0.243032979083.issue45920@roundup.psfhosted.org> New submission from Arthur Milchior : On current main, f87ea0350286837e9e96de03f8bfa215176c2928 , ``` cd cpython/Doc make doctest ``` fails. Due to: Document: library/functions --------------------------- Warning, treated as error: ********************************************************************** File "library/functions.rst", line ?, in default Failed example: list(zip(range(3), ['fee', 'fi', 'fo', 'fum'], strict=True)) Expected: Traceback (most recent call last): ... ValueError: zip() argument 2 is longer than argument 1 Got: Traceback (most recent call last): File "/usr/lib/python3.8/doctest.py", line 1336, in __run exec(compile(example.source, filename, "single", File "", line 1, in list(zip(range(3), ['fee', 'fi', 'fo', 'fum'], strict=True)) TypeError: zip() takes no keyword arguments This is not surprising since zip didn't take "Strict" kwarg in 3.8. The issue is that 3.10 doc is tested with Python 3.8. If in Makefile I change Python to "Python3.10" I get a new error, but it still mention "/usr/lib/python3.8/doctest.py" so I guess for some reason it was not using 3.10 everywhere. I don't know make enough to have any idea how to correct this one. By the way, is there a tool to auto-format .rst file? Initially, that was what I was trying to figure out, if I could get automatically warning when a new line is more than 80 chars long for example. ---------- assignee: docs at python components: Documentation messages: 407238 nosy: Arthur-Milchior, docs at python priority: normal severity: normal status: open title: make doctest fails versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 18:27:06 2021 From: report at bugs.python.org (Arthur Milchior) Date: Sun, 28 Nov 2021 23:27:06 +0000 Subject: [issue45920] make doctest fails In-Reply-To: <1638140383.16.0.243032979083.issue45920@roundup.psfhosted.org> Message-ID: <1638142026.43.0.0921492249915.issue45920@roundup.psfhosted.org> Arthur Milchior added the comment: I know understand one thing I missed. I?needed to do `make venv` after changing the make file to get 3.10 in virtual environment. The issue being that this would make doc harder to create on ubuntu since 3.10 is not yet easily accessible through apt/snap. Anyway, even when it's done, when 3.10-venv is installed on my machine and I remake venv, and I run doctest, it still fails with: Document: library/statistics ---------------------------- Warning, treated as error: ********************************************************************** File "library/statistics.rst", line 150, in default Failed example: fmean(grades, weights) Exception raised: Traceback (most recent call last): File "/usr/lib/python3.10/doctest.py", line 1348, in __run exec(compile(example.source, filename, "single", File "", line 1, in fmean(grades, weights) TypeError: fmean() takes 1 positional argument but 2 were given Which comes from the fact that fmean got a new argument in 3.11 it didn't had in 3.10 So I guess the only way to actually get make doctest to work is if the virtual env uses the version of python in main. Is there anyway to do that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 18:52:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 23:52:49 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1638143569.9.0.624877560594.issue45614@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28057 pull_request: https://github.com/python/cpython/pull/29826 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 18:55:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 28 Nov 2021 23:55:37 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1638143737.17.0.606109661428.issue45614@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +28058 pull_request: https://github.com/python/cpython/pull/29827 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 20:38:04 2021 From: report at bugs.python.org (Mark Sapiro) Date: Mon, 29 Nov 2021 01:38:04 +0000 Subject: [issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i Message-ID: <1638149884.18.0.351231109602.issue45921@roundup.psfhosted.org> New submission from Mark Sapiro : iso-8859-6-i, iso-8859-6-e, iso-8859-8-i and iso-8859-8-i are all IANA recognized character sets per https://www.iana.org/assignments/character-sets/character-sets.xhtml. These are all unrecognized by codecs.lookup(). ---------- components: Library (Lib) messages: 407240 nosy: msapiro priority: normal severity: normal status: open title: codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 20:48:56 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 29 Nov 2021 01:48:56 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638150536.07.0.0912699852113.issue43905@roundup.psfhosted.org> Andrei Kulakov added the comment: Eric: I've closed a similar issue about asdict() and now updating the title to keep track of both in this issue. Let me know if you want to keep them separate instead. ---------- title: dataclasses.astuple does deepcopy on all fields -> dataclasses.astuple (and .asdict) do deepcopy on all fields _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 20:58:29 2021 From: report at bugs.python.org (Arthur Milchior) Date: Mon, 29 Nov 2021 01:58:29 +0000 Subject: [issue45922] Many method, function, built-in... are not clickable and should be Message-ID: <1638151109.2.0.445399231307.issue45922@roundup.psfhosted.org> New submission from Arthur Milchior : I would like to work on this documentation improvement. Before spending time on it, I would like to know whether it would be accepted in principle and whether the way I would intend to improve the documentation would be accepted. # Problem: In a lot of part of the documentation, the text refers to a method, function, built-in, variable, member defined somewhere else in the doc, but does not link to it (I'll call it "the defined thing" in the remaining of this BPO). ## Example As an example, in https://docs.python.org/3.10/library/imp.html#imp.reload , you'll get link to import from, but no link on __name__. Admittedly, it's probably not a big deal by itself, and I would not have opened a bug report only for this one. But I'm convinced that there are sufficiently many missing links that a PR?that would solve add a lot of them would improve the day to day use of the documentation in a small way for a lot of users. This example seems interesting to me because it also shows that creating the links can not be 100% automated (even if most of it can). Indeed, __name__ is a property of modules, but it is also a property of class, function, method, descriptor and generator instances. The former is defined in https://docs.python.org/3.10/library/types.html?highlight=__name__#types.ModuleType.__name__ while the latter is defined in https://docs.python.org/3.10/library/stdtypes.html?highlight=__name__#definition.__name__ . Hence, a commit dealing with __name__ need to check that the correct reference is used each time. I got the idea from a change requested by Terry J Reedy on another of my documentation PR?a few days ago: https://github.com/python/cpython/pull/29183#pullrequestreview-816414072 and I believe this should be more systematic. # How I'll solve this issue ## Ensuring the PR is easy to review For each defined thing, I'll create a commit that simply add links to this refered thing. In the example I gave, it will transform ``__name__`` to :meth:`__name__`. That means that each commit will be very easy to review (even if it will be boring). Even better, any diff tools can show that there are no other difference than the one I claim to make. ### One downside The downside is that it requires that I do not change the place where line break occurs (otherwise, git default diff tool will show a lot of difference). this mean that some lines will grow larger than 80 characters. In this case, I believe that this is a cost worth paying because: * there are already a lot of lines with more than 80 characters in the documentation, * reformating each paragraph will makes the reviewer work extremely hard, for virtually no benefits * if required, a last commit can reformat all paragraphs at the end. ## How I'll find missing references I will NOT find all missing references. I do not believe it is a realistic goal. My goal here is to improve the documentation, I don't care if it is not perfect here. What I do is that I search for lines containing matching the regexp `\`\.{2,}\`\`; they are generally, but not always, code that should be reference. For each missing reference, I'll use search and replace in the documentation codebase to replace the code by the link, I'll compile and check that the link works. ## Future work I believe ideally a linter should warn if a single word betwen `` and `` could potentially be a reference. This seems harder work to be honest, I don't know how I'd start it. And it seems useless while so many missing references are in the codebase. #?Conclusion My questions are thus: * If I were to make such a PR, would it be accepted * is there any feedback, improvement one would suggest that may improve the result or save time ---------- assignee: docs at python components: Documentation messages: 407242 nosy: Arthur-Milchior, docs at python priority: normal severity: normal status: open title: Many method, function, built-in... are not clickable and should be type: enhancement versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 21:35:27 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 29 Nov 2021 02:35:27 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638153327.92.0.974580072113.issue43905@roundup.psfhosted.org> Eric V. Smith added the comment: I think it's find to address both of these here. ---------- components: +Documentation -Library (Lib) versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 22:25:00 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Nov 2021 03:25:00 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1638156300.29.0.943488463524.issue45876@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +28059 pull_request: https://github.com/python/cpython/pull/29828 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 22:36:18 2021 From: report at bugs.python.org (Tim Peters) Date: Mon, 29 Nov 2021 03:36:18 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637919390.64.0.975509345951.issue45902@roundup.psfhosted.org> Message-ID: <1638156978.85.0.579392461114.issue45902@roundup.psfhosted.org> Tim Peters added the comment: I agree with closing this - I don't know of real use cases either. Serhiy, essentially all LSD radix sorts are stable, and rely on that for their own correctness. MSD radix sorts vary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 28 23:48:30 2021 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Nov 2021 04:48:30 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638161310.63.0.795010542404.issue45917@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +28060 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29829 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 00:05:35 2021 From: report at bugs.python.org (Gideon) Date: Mon, 29 Nov 2021 05:05:35 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638162335.92.0.205947632169.issue45917@roundup.psfhosted.org> Gideon added the comment: I've submitted a PR at https://github.com/python/cpython/pull/29829. I'd just like to add that the whole Python team is amazing. Thank you for doing what you do! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 00:48:29 2021 From: report at bugs.python.org (jiahua wang) Date: Mon, 29 Nov 2021 05:48:29 +0000 Subject: [issue38619] [Doc] UUID.hex is lowercase In-Reply-To: <1572277818.51.0.346216542748.issue38619@roundup.psfhosted.org> Message-ID: <1638164909.29.0.265103898237.issue38619@roundup.psfhosted.org> Change by jiahua wang : ---------- keywords: +patch nosy: +wangjiahua nosy_count: 5.0 -> 6.0 pull_requests: +28061 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 01:04:39 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 29 Nov 2021 06:04:39 +0000 Subject: [issue44675] Cross-platform issues with private methods and multiprocessing In-Reply-To: <1626709771.89.0.929780396905.issue44675@roundup.psfhosted.org> Message-ID: <1638165879.84.0.219494633949.issue44675@roundup.psfhosted.org> Andrei Kulakov added the comment: The issue seems to be that there was a change between 3.7.7 and 3.8.6, - multiprocessing started using pickle dump / load which cannot handle double underscore methods. See #33007 for a reproducer with pickle. I'm using MacOS and this multiprocessing example in OP works fine in 3.7.7 and raises the same error as OP in 3.8.6. So from my side at least it doesn't appear to be a cross-platform issue (but I'm not sure why it worked on Linux on 3.8.10 for OP). I've also reproduced it on the latest 3.11. So this appears to be a regression and if there's an easy fix, it's probably worth fixing. ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 01:10:12 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 29 Nov 2021 06:10:12 +0000 Subject: [issue44675] Cross-platform issues with private methods and multiprocessing In-Reply-To: <1626709771.89.0.929780396905.issue44675@roundup.psfhosted.org> Message-ID: <1638166212.71.0.142062924718.issue44675@roundup.psfhosted.org> Andrei Kulakov added the comment: More details and a suggested fix here: #37852 . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:13:26 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 08:13:26 +0000 Subject: [issue37658] In some cases asyncio.wait_for can lead to socket leak. In-Reply-To: <1563884177.4.0.19779936427.issue37658@roundup.psfhosted.org> Message-ID: <1638173606.7.0.343815548663.issue37658@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28062 pull_request: https://github.com/python/cpython/pull/29832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:13:13 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Nov 2021 08:13:13 +0000 Subject: [issue37658] In some cases asyncio.wait_for can lead to socket leak. In-Reply-To: <1563884177.4.0.19779936427.issue37658@roundup.psfhosted.org> Message-ID: <1638173593.93.0.730134054397.issue37658@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 934a82623793e9d52b85f74d5395d65927a52205 by Sam Bull in branch 'main': bpo-37658: Actually return result in race condition (GH-29202) https://github.com/python/cpython/commit/934a82623793e9d52b85f74d5395d65927a52205 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:13:39 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 08:13:39 +0000 Subject: [issue37658] In some cases asyncio.wait_for can lead to socket leak. In-Reply-To: <1563884177.4.0.19779936427.issue37658@roundup.psfhosted.org> Message-ID: <1638173619.86.0.483895663063.issue37658@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28063 pull_request: https://github.com/python/cpython/pull/29831 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:14:34 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 08:14:34 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638173674.29.0.159991210074.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28064 pull_request: https://github.com/python/cpython/pull/29833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:15:16 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 08:15:16 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638173716.63.0.28412522013.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: GH-29768 broke builds on platforms without sem_open (e.g. wasm). GH-29833 fixes the issue. emcc -Wsign-compare -g -O0 -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I../../Include/internal -IObjects -IInclude -IPython -I. -I../../Include -DPy_BUILD_CORE_BUILTIN -I../../Modules/_multiprocessing -c ../../Modules/_multiprocessing/semaphore.c -o Modules/_multiprocessing/semaphore.o ../../Modules/_multiprocessing/semaphore.c:16:5: error: unknown type name 'SEM_HANDLE' SEM_HANDLE handle; ^ In file included from ../../Modules/_multiprocessing/semaphore.c:38: ../../Modules/_multiprocessing/clinic/semaphore.c.h:220:60: error: unknown type name 'SEM_HANDLE' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:30:37 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 29 Nov 2021 08:30:37 +0000 Subject: [issue45922] Many method, function, built-in... are not clickable and should be In-Reply-To: <1638151109.2.0.445399231307.issue45922@roundup.psfhosted.org> Message-ID: <1638174637.69.0.680021060989.issue45922@roundup.psfhosted.org> Alex Waygood added the comment: I'm already attempting something similar over at https://bugs.python.org/issue45840 (though that issue is for one specific piece of documentation). See also my attached PR, and the comments on it :) ---------- nosy: +AlexWaygood, eric.araujo versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:32:39 2021 From: report at bugs.python.org (Mark Ao) Date: Mon, 29 Nov 2021 08:32:39 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638174759.98.0.0101139816402.issue43498@roundup.psfhosted.org> Mark Ao added the comment: I'm experiencing the same issue on Python 3.10.0 when I execute the code that uses concurrent.futures.ProcessPoolExecutor. ======== Exception in thread Thread-1: Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1009, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 317, in run result_item, is_broken, cause = self.wait_result_broken_or_wakeup() File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 376, in wait_result_broken_or_wakeup worker_sentinels = [p.sentinel for p in self.processes.values()] File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 376, in PROCESSING DATAFRAME: AKAM worker_sentinels = [p.sentinel for p in self.processes.values()] RuntimeError: dictionary changed size during iteration ======== I also tried to troubleshoot to find out the part that causes this exception, but the most difficult part is: it does not happen every time I execute my code that uses concurrent.futures.ProcessPoolExecutor. (Really like what Jakub mentioend earlier, it is like a coincidence.) At the same time, I am also testing if the same thing happens on other versions like Python 3.8.8 (on Rocky Linux 8.5), but we would appreciate it if someone can tell if this is a bug or not? Or even anything we should improve on my own code? (if needed I can share the sample code, but honestly I do not think this is something wrong with my code, since as I mentioned: the exception is not happening every time I execute my code, so I suspect this might be a bug of Python 3.10.0) (Since Jakub already reported it happens on Python 3.9, so I am not testing on 3.9) I would appreciate it if there is any update or info that can be shared. Thank you! ---------- nosy: +markao _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:37:46 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 08:37:46 +0000 Subject: [issue37658] In some cases asyncio.wait_for can lead to socket leak. In-Reply-To: <1563884177.4.0.19779936427.issue37658@roundup.psfhosted.org> Message-ID: <1638175066.49.0.534698227851.issue37658@roundup.psfhosted.org> miss-islington added the comment: New changeset 305236e03a274850be8ed399ea3390ee71519ef4 by Miss Islington (bot) in branch '3.10': bpo-37658: Actually return result in race condition (GH-29202) https://github.com/python/cpython/commit/305236e03a274850be8ed399ea3390ee71519ef4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 03:41:27 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Nov 2021 08:41:27 +0000 Subject: [issue45922] Many method, function, built-in... are not clickable and should be In-Reply-To: <1638151109.2.0.445399231307.issue45922@roundup.psfhosted.org> Message-ID: <1638175287.81.0.823767321577.issue45922@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is a good idea in general. Please go ahead, I am sure that the PR will be accepted. But keep in mind that not always additional links make the documentation better. The rule of tumb is to not add multiple links to the same entity in one paragraph. In many cases the second and the following references are made non-links intentionally. There is also not much benefit of making a link to itself (if the single-paragraph description of the function contains a reference to that function). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 04:25:55 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Nov 2021 09:25:55 +0000 Subject: [issue23819] test_asyncio fails when run under -O In-Reply-To: <1427808695.9.0.385563565443.issue23819@psf.upfronthosting.co.za> Message-ID: <1638177955.07.0.556495190739.issue23819@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 04:28:44 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Nov 2021 09:28:44 +0000 Subject: [issue45739] The Python implementation of Decimal does not support the "N" format In-Reply-To: <1636206678.41.0.252821341068.issue45739@roundup.psfhosted.org> Message-ID: <1638178124.93.0.22246947022.issue45739@roundup.psfhosted.org> Serhiy Storchaka added the comment: You are right about an uppercase converter. I forget this. I withdraw this proposition. It seems that even if we add support of "N" to all numeric formatting it will not cover all use cases. "n" is a locale specific variant of "g", but other formats could have locale specific variants too. In C all numeric formatting is locale specific. Maybe add a flag which makes any numeric formatting locale specific? Then "n" will became obsolete. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 04:36:14 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 09:36:14 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638178574.92.0.763263925978.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 4dc198dedd66e3247aa934fb91c9a158c3eea15a by Christian Heimes in branch 'main': bpo-45847: Fix _multiprocessing on platforms without sem_open (GH-29833) https://github.com/python/cpython/commit/4dc198dedd66e3247aa934fb91c9a158c3eea15a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:08:01 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 10:08:01 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1638180481.25.0.572430685456.issue45614@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 4d2cc3ed46d2453bad92243128e237e7febca714 by Irit Katriel in branch '3.10': bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29826) https://github.com/python/cpython/commit/4d2cc3ed46d2453bad92243128e237e7febca714 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:11:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 10:11:52 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1638180712.66.0.707681309203.issue45614@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 5b6aa6ce20b5b3b45dec2ebd6355e248cdf2fbcc by Irit Katriel in branch '3.9': bpo-45614: Fix traceback display for exceptions with invalid module name (GH-29726) (GH-29827) https://github.com/python/cpython/commit/5b6aa6ce20b5b3b45dec2ebd6355e248cdf2fbcc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:12:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 10:12:03 +0000 Subject: [issue45614] traceback of exception with non-unicode __module__ In-Reply-To: <1635249947.08.0.737111193049.issue45614@roundup.psfhosted.org> Message-ID: <1638180723.14.0.103508561576.issue45614@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:12:39 2021 From: report at bugs.python.org (keeely) Date: Mon, 29 Nov 2021 10:12:39 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638180759.52.0.0583464499122.issue45870@roundup.psfhosted.org> keeely added the comment: Regrettably I cannot submit a PR for the docs because I value my online anonymity and Python submissions require a real name (IIRC), but my suggestion would be pretty simple. Taking as an example, for termios (https://docs.python.org/3/library/termios.html), we currently have: This module provides an interface to the POSIX calls for tty I/O control. For a complete description of these calls, see?termios(3)?Unix manual page. It is only available for those Unix versions that support POSIX?termios?style tty I/O control configured during installation. For readline (https://docs.python.org/3/library/readline.html#module-readline) we have: The?readline?module defines a number of functions to facilitate completion and reading/writing of history files from the Python interpreter. This module can be used directly, or via the?rlcompleter?module, which supports completion of Python identifiers at the interactive prompt. Settings made using this module affect the behaviour of both the interpreter?s interactive prompt and the prompts offered by the built-in?input()?function. In similar way to the first para of the termios description I would add the following text: ?It is only available on platforms that support the readline functionality, generally POSIX?. Then perhaps I?d also add to the cmd documentation at https://docs.python.org/3/library/cmd.html The?Cmd?class provides a simple framework for writing line-oriented command interpreters. These are often useful for test harnesses, administrative tools, and prototypes that will later be wrapped in a more sophisticated interface. I would add at the end of that first paragraph: ?Some features will be unavailable on non-POSIX platforms due to the readline requirement?. Hope this helps, if it's not clear I can provide in diff form if you prefer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:21:47 2021 From: report at bugs.python.org (Arthur Milchior) Date: Mon, 29 Nov 2021 10:21:47 +0000 Subject: [issue45922] Many method, function, built-in... are not clickable and should be In-Reply-To: <1638151109.2.0.445399231307.issue45922@roundup.psfhosted.org> Message-ID: <1638181307.97.0.666065386854.issue45922@roundup.psfhosted.org> Arthur Milchior added the comment: Thanks for the warning about double link. I agree with you. I guess it's another reason why it would be non trivial to automate here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:23:23 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 29 Nov 2021 10:23:23 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638181403.13.0.497610159174.issue40280@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- nosy: +erlendaasland nosy_count: 11.0 -> 12.0 pull_requests: +28065 pull_request: https://github.com/python/cpython/pull/29834 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:47:26 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Nov 2021 10:47:26 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638182846.44.0.573798940037.issue43498@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for the report. Atomic copy (`list(self.processes.values()`) should fix the bug, sure. I doubt if writing a reliable test for this situation is possible; multithreading is hard. I think we can accept a patch without a test but with an inline comment that describes why copy is crucial. ---------- versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:47:36 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Nov 2021 10:47:36 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638182856.28.0.897001174928.issue43498@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 05:49:57 2021 From: report at bugs.python.org (keeely) Date: Mon, 29 Nov 2021 10:49:57 +0000 Subject: [issue45870] There's no readline module on Windows Python (cmd.Cmd) In-Reply-To: <1637589082.36.0.67630471216.issue45870@roundup.psfhosted.org> Message-ID: <1638182997.64.0.275181822833.issue45870@roundup.psfhosted.org> keeely added the comment: I'm attaching an example usage of cmd + readline to show how you can have context-specific history for sub-shells. WARNING: WRITES FILES TO CWD! In the event that someone does implement this on Windows it would be nice if this worked. That doesn't mean less-capable readline support wouldn't also be useful. thanks. ---------- Added file: https://bugs.python.org/file50461/cmd_shell_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:03:51 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 29 Nov 2021 11:03:51 +0000 Subject: [issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i In-Reply-To: <1638149884.18.0.351231109602.issue45921@roundup.psfhosted.org> Message-ID: <1638183831.46.0.167284648905.issue45921@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:16:06 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 29 Nov 2021 11:16:06 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638184566.56.0.833347806913.issue43498@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +colesbury _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:30:01 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 29 Nov 2021 11:30:01 +0000 Subject: [issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i In-Reply-To: <1638149884.18.0.351231109602.issue45921@roundup.psfhosted.org> Message-ID: <1638185401.05.0.310709504884.issue45921@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: Even though these are IANA recognized encodings, we need to apply he same logic as we do for all new encodings, which essentially boils down to: Are these encoding in wider spread use today ? Reading through the RFC 1556, it seems that the added -i or -e are just indications for applications on how to interpret BIDI information: either implicit by looking at the order of characters in the stream or explicit via control characters embedded in the stream. They are not new encodings, with new mappings. If that's a correct interpretation, we could add those as aliases for the non-annotated encodings. After more than 20 years with Unicode support in Python and the world moving towards UTF-8, I have become fairly reluctant towards adding more encoding support to Python. If people are still using unsupported encodings, it's probably better to point them to other dedicated tools for converting text to UTF-8, e.g. iconv, than extending the pretty extensive support we already have in Python. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:37:57 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 29 Nov 2021 11:37:57 +0000 Subject: [issue45923] Improve performance of sys.settracing based tools. Message-ID: <1638185877.94.0.453545318764.issue45923@roundup.psfhosted.org> New submission from Mark Shannon : In our quest for performance, the performance of sys.settracing based tools has probably gotten worse. 1. How do we measure this? 2. How do fix this? We will initially use coverage.py as proxy for all sys.settracing based tools when measuring performance. The fix is probably to use quickening to insert a minimum set of instrumentation instructions required for tracing/profiling. The existence of `f_trace_opcode` is a bit of a problem however, as we will have to instrument *every* instruction. Ideally, sys.settracing based tools should be faster on 3.11 than 3.10, but at the least we should provide a simple alternative to sys.settracing that is faster. ---------- assignee: Mark.Shannon components: Interpreter Core messages: 407263 nosy: Mark.Shannon, nedbat, pablogsal priority: normal severity: normal status: open title: Improve performance of sys.settracing based tools. type: performance versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:39:39 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 11:39:39 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638185979.06.0.720957848675.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b3f443a35e08a473d52868621e9b268259139cb2 by Erlend Egeberg Aasland in branch 'main': bpo-40280: Disable unusable core extension modules on emscripten (GH-29834) https://github.com/python/cpython/commit/b3f443a35e08a473d52868621e9b268259139cb2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:45:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 11:45:56 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1638186356.2.0.253976478455.issue45881@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28066 pull_request: https://github.com/python/cpython/pull/29835 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:55:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 11:55:26 +0000 Subject: [issue45924] Incorrect traceback when future's exception is raised multiple times Message-ID: <1638186926.45.0.137493772787.issue45924@roundup.psfhosted.org> New submission from Irit Katriel : Background: https://github.com/python/cpython/pull/29780#issuecomment-981170548 https://github.com/python/cpython/pull/29780#issuecomment-981260365 ###################################################### import asyncio, traceback async def raise_after(fut, delay): await asyncio.sleep(delay) fut.set_exception(TypeError(42)) async def main(): loop = asyncio.get_running_loop() fut = loop.create_future() loop.create_task( raise_after(fut, 1)) print('hello ...') for i in range(3): try: print(await fut) except Exception as e: traceback.print_exception(e) asyncio.run(main()) ###################################################### Output (traceback accumulates a frame each time): hello ... Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main print(await fut) ^^^^^^^^^ TypeError: 42 Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main print(await fut) ^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main print(await fut) ^^^^^^^^^ TypeError: 42 Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main print(await fut) ^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main print(await fut) ^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/as.py", line 17, in main print(await fut) ^^^^^^^^^ TypeError: 42 ---------- components: asyncio messages: 407265 nosy: asvetlov, gvanrossum, iritkatriel, yselivanov priority: normal severity: normal status: open title: Incorrect traceback when future's exception is raised multiple times type: behavior versions: Python 3.10, Python 3.11, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:57:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 11:57:08 +0000 Subject: [issue45924] Incorrect traceback when future's exception is raised multiple times In-Reply-To: <1638186926.45.0.137493772787.issue45924@roundup.psfhosted.org> Message-ID: <1638187028.94.0.998237459812.issue45924@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +28067 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:57:19 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 29 Nov 2021 11:57:19 +0000 Subject: [issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.0 Message-ID: <1638187039.58.0.251846461245.issue45925@roundup.psfhosted.org> New submission from Erlend E. Aasland : SQLite 3.37.0 was released a couple of days ago: https://sqlite.org/releaselog/3_37_0.html Given that 3.11 feature freeze is approx. May 2022, and that it took approx. 5 months between SQLite 3.36.0 and 3.37.0, I'd say we aim for a field tested SQLite 3.37.0 instead of a possibly fresh-out-of-the-box 3.38.0 in 3.11. Let's wait a couple of weeks before changing the macOS/Windows installers. ---------- components: Windows, macOS messages: 407266 nosy: erlendaasland, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Upgrade macOS and Windows installers to use SQLite 3.37.0 versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:03:05 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 12:03:05 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638187385.06.0.952383849707.issue43498@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 11.0 -> 12.0 pull_requests: +28068 pull_request: https://github.com/python/cpython/pull/29836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:03:05 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Nov 2021 12:03:05 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638187385.25.0.301683437661.issue43498@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 7431448b817d3bf87f71661cf8f3d537807ab2e2 by Jakub Kul?k in branch 'main': bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868) https://github.com/python/cpython/commit/7431448b817d3bf87f71661cf8f3d537807ab2e2 ---------- message_count: 10.0 -> 11.0 nosy: +miss-islington nosy_count: 11.0 -> 12.0 pull_requests: +28068 pull_request: https://github.com/python/cpython/pull/29836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:03:09 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 12:03:09 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638187389.21.0.993358934496.issue43498@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28069 pull_request: https://github.com/python/cpython/pull/29837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:04:15 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Nov 2021 12:04:15 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1638187455.05.0.83483114992.issue45813@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:04:49 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Nov 2021 12:04:49 +0000 Subject: [issue19460] Add test for MIMENonMultipart In-Reply-To: <1383235171.21.0.576245026541.issue19460@psf.upfronthosting.co.za> Message-ID: <1638187489.11.0.281280483708.issue19460@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 06:59:24 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 11:59:24 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1638187164.44.0.458809935232.issue45886@roundup.psfhosted.org> Irit Katriel added the comment: Is this related to this issue or something else? https://buildbot.python.org/all/#/builders/310/builds/344 gcc -pthread -c -Wsign-compare -g -Og -Wall -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I. -I./Include -DPy_BUILD_CORE -o Programs/_freeze_module.o Programs/_freeze_module.c gcc -pthread -o Programs/_freeze_module Programs/_freeze_module.o Modules/getbuildinfo.o Parser/token.o Parser/pegen.o Parser/pegen_errors.o Parser/action_helpers.o Parser/parser.o Parser/string_parser.o Parser/peg_api.o Parser/myreadline.o Parser/tokenizer.o Objects/abstract.o Objects/accu.o Objects/boolobject.o Objects/bytes_methods.o Objects/bytearrayobject.o Objects/bytesobject.o Objects/call.o Objects/capsule.o Objects/cellobject.o Objects/classobject.o Objects/codeobject.o Objects/complexobject.o Objects/descrobject.o Objects/enumobject.o Objects/exceptions.o Objects/genericaliasobject.o Objects/genobject.o Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/interpreteridobject.o Objects/iterobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/odictobject.o Objects/memoryobject.o Objects/methodobject.o Objects/moduleobject.o Objects/namespaceobject.o Objects/object.o Objects/obmalloc.o Objects/picklebufobject.o Objects/rangeobject.o Objects/setobject.o Objects/sliceobject.o Objects/structseq.o Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Objects/unionobject.o Objects/weakrefobject.o Python/_warnings.o Python/Python-ast.o Python/Python-tokenize.o Python/asdl.o Python/ast.o Python/ast_opt.o Python/ast_unparse.o Python/bltinmodule.o Python/ceval.o Python/codecs.o Python/compile.o Python/context.o Python/dynamic_annotations.o Python/errors.o Python/frame.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getplatform.o Python/getversion.o Python/hamt.o Python/hashtable.o Python/import.o Python/importdl.o Python/initconfig.o Python/marshal.o Python/modsupport.o Python/mysnprintf.o Python/mystrtoul.o Python/pathconfig.o Python/preconfig.o Python/pyarena.o Python/pyctype.o Python/pyfpe.o Python/pyhash.o Python/pylifecycle.o Python/pymath.o Python/pystate.o Python/pythonrun.o Python/pytime.o Python/bootstrap_hash.o Python/specialize.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/thread.o Python/traceback.o Python/getopt.o Python/pystrcmp.o Python/pystrtod.o Python/pystrhex.o Python/dtoa.o Python/formatter_unicode.o Python/fileutils.o Python/suggestions.o Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/atexitmodule.o Modules/faulthandler.o Modules/posixmodule.o Modules/signalmodule.o Modules/_tracemalloc.o Modules/_codecsmodule.o Modules/_collectionsmodule.o Modules/errnomodule.o Modules/_io/_iomodule.o Modules/_io/iobase.o Modules/_io/fileio.o Modules/_io/bytesio.o Modules/_io/bufferedio.o Modules/_io/textio.o Modules/_io/stringio.o Modules/itertoolsmodule.o Modules/_sre.o Modules/_threadmodule.o Modules/timemodule.o Modules/_weakref.o Modules/_abc.o Modules/_functoolsmodule.o Modules/_localemodule.o Modules/_operator.o Modules/_stat.o Modules/symtablemodule.o Modules/pwdmodule.o Modules/xxsubtype.o -lpthread -ldl -lutil -lm Programs/_freeze_module importlib._bootstrap ./Lib/importlib/_bootstrap.py Python/frozen_modules/importlib._bootstrap.h python3 ./Tools/scripts/deepfreeze.py Python/frozen_modules/importlib._bootstrap.h -m importlib._bootstrap -o Python/deepfreeze/importlib._bootstrap.c File "./Tools/scripts/deepfreeze.py", line 29 res.append(f"\\x{i:02x}") ^ SyntaxError: invalid syntax Makefile:1069: recipe for target 'Python/deepfreeze/importlib._bootstrap.c' failed make: *** [Python/deepfreeze/importlib._bootstrap.c] Error 1 program finished with exit code 2 elapsedTime=45.181814 ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:00:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 12:00:06 +0000 Subject: [issue45924] Incorrect traceback when future's exception is raised multiple times In-Reply-To: <1638186926.45.0.137493772787.issue45924@roundup.psfhosted.org> Message-ID: <1638187206.08.0.47429550651.issue45924@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: -28067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:24:44 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 12:24:44 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638188683.99.0.945257593292.issue43498@roundup.psfhosted.org> miss-islington added the comment: New changeset 4b11d7118561a12322d3cfa76c5941690b241149 by Miss Islington (bot) in branch '3.10': bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868) https://github.com/python/cpython/commit/4b11d7118561a12322d3cfa76c5941690b241149 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:28:54 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 12:28:54 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638188934.87.0.185703309045.issue43498@roundup.psfhosted.org> miss-islington added the comment: New changeset 3b9d886567c4fc6279c2198b6711f0590dbf3336 by Miss Islington (bot) in branch '3.9': bpo-43498: Fix dictionary iteration error in _ExecutorManagerThread (GH-24868) https://github.com/python/cpython/commit/3b9d886567c4fc6279c2198b6711f0590dbf3336 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:35:08 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 29 Nov 2021 12:35:08 +0000 Subject: [issue45786] Avoid allocating when exiting frame; it may be unsafe. In-Reply-To: <1636643049.78.0.0321804916993.issue45786@roundup.psfhosted.org> Message-ID: <1638189308.74.0.327477931901.issue45786@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 60929576e40038ec71d896230f69e4411c82be4b by Mark Shannon in branch 'main': bpo-45786: Allocate space for frame in frame object. (GH-29729) https://github.com/python/cpython/commit/60929576e40038ec71d896230f69e4411c82be4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 07:45:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 12:45:22 +0000 Subject: [issue45886] Fix Program/_freeze_module for cross compiling Python In-Reply-To: <1637706922.21.0.951800087197.issue45886@roundup.psfhosted.org> Message-ID: <1638189922.72.0.795311229849.issue45886@roundup.psfhosted.org> Christian Heimes added the comment: The issue is related to bpo-45873. The Debian buildbot has an ancient Python version that does not support f-strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 08:15:13 2021 From: report at bugs.python.org (Alisson Oliveira) Date: Mon, 29 Nov 2021 13:15:13 +0000 Subject: [issue45926] singledispatchmethod doesn't handle named arguments Message-ID: <1638191713.81.0.622193348112.issue45926@roundup.psfhosted.org> New submission from Alisson Oliveira : `functools.singledispatchmethod` doesn't handle named arguments. Ex: ```python from functools import singledispatchmethod class Test: def __init__(self): ... @singledispatchmethod def get(self, filters): return 'Not Implemented!' @get.register def _(self, filters: dict): for k, v in filters.items(): print(k, ' => ' , v) @get.register def _(self, filters: list): for f in filters: print(f) if __name__ == '__main__': t = Test() t.get({'a': 'A'}) t.get(['a']) t.get(filters={'a': 'A'}) ``` This will raise an error: ``` a => A a Traceback (most recent call last): File "/Users/alisson.oliveira/Farfetch/Git/blueprints-package/main.py", line 33, in t.get(filters={'a': 'A'}) File "/usr/local/Cellar/python at 3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/functools.py", line 926, in _method method = self.dispatcher.dispatch(args[0].__class__) IndexError: tuple index out of range ``` the problem is the lib always assume positional arguments in line 194: https://github.com/python/cpython/blob/main/Lib/functools.py#L914 ---------- components: Library (Lib) messages: 407273 nosy: alisson276 priority: normal severity: normal status: open title: singledispatchmethod doesn't handle named arguments type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 08:24:23 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 29 Nov 2021 13:24:23 +0000 Subject: [issue43498] "dictionary changed size during iteration" error in _ExecutorManagerThread In-Reply-To: <1615796616.26.0.51182574064.issue43498@roundup.psfhosted.org> Message-ID: <1638192263.18.0.26059719492.issue43498@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 08:25:57 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Nov 2021 13:25:57 +0000 Subject: [issue35821] Clarify when logging events are propagated when propagate is true In-Reply-To: <1548360439.22.0.955979079327.issue35821@roundup.psfhosted.org> Message-ID: <1638192357.11.0.135117414178.issue35821@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +28070 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/29841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 08:37:54 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 13:37:54 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638193074.31.0.760286982374.issue40280@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28071 pull_request: https://github.com/python/cpython/pull/29842 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 08:57:44 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 13:57:44 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638194264.86.0.762698247846.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset f7a62f24053c82cf38c3db5848d9ff014470fa40 by Erlend Egeberg Aasland in branch 'main': bpo-45847: Make socket module conditional (GH-29769) https://github.com/python/cpython/commit/f7a62f24053c82cf38c3db5848d9ff014470fa40 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 08:59:39 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Nov 2021 13:59:39 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1638194379.26.0.996797899007.issue44391@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +28072 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:01:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 14:01:50 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638194510.39.0.486954177714.issue45847@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +28073 pull_request: https://github.com/python/cpython/pull/29844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:05:14 2021 From: report at bugs.python.org (jiahua wang) Date: Mon, 29 Nov 2021 14:05:14 +0000 Subject: [issue45114] bad example for os.stat In-Reply-To: <1630929270.55.0.756722168935.issue45114@roundup.psfhosted.org> Message-ID: <1638194714.66.0.600647486557.issue45114@roundup.psfhosted.org> Change by jiahua wang : ---------- keywords: +patch nosy: +wangjiahua nosy_count: 2.0 -> 3.0 pull_requests: +28074 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:05:45 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 29 Nov 2021 14:05:45 +0000 Subject: [issue45902] Bytes and bytesarrays can be sorted with a much faster count sort. In-Reply-To: <1637920618.19.0.262249579765.issue45902@roundup.psfhosted.org> Message-ID: <0da92162-58ca-fab0-19a1-1cbae6e0032f@egenix.com> Marc-Andre Lemburg added the comment: On 26.11.2021 10:56, Ruben Vorderman wrote: > > $ python -m timeit -c "from bytes_sort import bytes_sort" "bytes_sort(b'')" > 500000 loops, best of 5: 495 nsec per loop Shouldn't this read: $ python -m timeit -s "from bytes_sort import bytes_sort" "bytes_sort(b'')" (-s instead of -c) ? ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:08:09 2021 From: report at bugs.python.org (Erlend E. Aasland) Date: Mon, 29 Nov 2021 14:08:09 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1638194889.04.0.760281017093.issue45723@roundup.psfhosted.org> Change by Erlend E. Aasland : ---------- pull_requests: +28075 pull_request: https://github.com/python/cpython/pull/29846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:15:45 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 29 Nov 2021 14:15:45 +0000 Subject: [issue45927] timeit accepts -c/--clock and -t/--time without any functionality Message-ID: <1638195345.59.0.368504787144.issue45927@roundup.psfhosted.org> New submission from Marc-Andre Lemburg : >From the code: opts, args = getopt.getopt(args, "n:u:s:r:tcpvh", ["number=", "setup=", "repeat=", "time", "clock", "process", "verbose", "unit=", "help"]) but the options -c and -t are not used in the subsequent code. This can lead to situations where if you mistype e.g. -s as -c, you get completely wrong results (see https://bugs.python.org/issue45902 for an example). ---------- components: Library (Lib) messages: 407276 nosy: lemburg priority: normal severity: normal status: open title: timeit accepts -c/--clock and -t/--time without any functionality versions: Python 3.10, Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:17:19 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 29 Nov 2021 14:17:19 +0000 Subject: [issue45926] singledispatchmethod doesn't handle named arguments In-Reply-To: <1638191713.81.0.622193348112.issue45926@roundup.psfhosted.org> Message-ID: <1638195439.94.0.657203396806.issue45926@roundup.psfhosted.org> Alex Waygood added the comment: This is arguably a duplicate of https://bugs.python.org/issue41122 ---------- nosy: +AlexWaygood, lukasz.langa, rhettinger versions: +Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:23:42 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 29 Nov 2021 14:23:42 +0000 Subject: [issue44675] Cross-platform issues with private methods and multiprocessing In-Reply-To: <1626709771.89.0.929780396905.issue44675@roundup.psfhosted.org> Message-ID: <1638195822.65.0.773662559528.issue44675@roundup.psfhosted.org> Andrei Kulakov added the comment: If we are not going to fix this issue in pickling at this time, I think it makes sense to raise an error with a good, clear explanation in multiprocessing.Process(target=self.__method), which is affected by this and caused some confusion in this issue: #44675 . Josh: adding you since you reported this issue in another ticket, hope that's okay. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:29:26 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 29 Nov 2021 14:29:26 +0000 Subject: [issue45912] [argparse] Print texts starting with capital letters and finish with dot for more formality In-Reply-To: <1638068021.43.0.0311621080056.issue45912@roundup.psfhosted.org> Message-ID: <1638196166.07.0.946434000628.issue45912@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with @iritkatriel. Also, such a change to argparse would be too disruptive. So, I'm going to close this. ---------- components: +Library (Lib) -Parser nosy: +eric.smith resolution: -> wont fix stage: -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:37:50 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Mon, 29 Nov 2021 14:37:50 +0000 Subject: [issue24301] gzip module failing to decompress valid compressed file In-Reply-To: <1432742343.38.0.978535326882.issue24301@psf.upfronthosting.co.za> Message-ID: <1638196670.27.0.301607125674.issue24301@roundup.psfhosted.org> Ruben Vorderman added the comment: >From the spec: https://datatracker.ietf.org/doc/html/rfc1952 2.2. File format A gzip file consists of a series of "members" (compressed data sets). The format of each member is specified in the following section. The members simply appear one after another in the file, with no additional information before, between, or after them. Gzip files with garbage after them are corrupted or not spec compliant. Therefore the gzip module should raise an error in this case. ---------- nosy: +rhpvorderman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:40:09 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Mon, 29 Nov 2021 14:40:09 +0000 Subject: [issue45875] gzip.decompress performance can be improved with memoryviews In-Reply-To: <1637651074.98.0.153102708478.issue45875@roundup.psfhosted.org> Message-ID: <1638196809.73.0.198629748991.issue45875@roundup.psfhosted.org> Change by Ruben Vorderman : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:41:22 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 14:41:22 +0000 Subject: [issue45723] Improve and simplify configure.ac checks In-Reply-To: <1636106747.04.0.649539670364.issue45723@roundup.psfhosted.org> Message-ID: <1638196882.75.0.620101072426.issue45723@roundup.psfhosted.org> miss-islington added the comment: New changeset c1dec9540ab04691f8d4a131671e069913e6eee3 by Erlend Egeberg Aasland in branch 'main': bpo-45723: Sort the grand AC_CHECK_HEADERS check (GH-29846) https://github.com/python/cpython/commit/c1dec9540ab04691f8d4a131671e069913e6eee3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:53:12 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Mon, 29 Nov 2021 14:53:12 +0000 Subject: [issue24301] gzip module failing to decompress valid compressed file In-Reply-To: <1432742343.38.0.978535326882.issue24301@psf.upfronthosting.co.za> Message-ID: <1638197592.06.0.812785270799.issue24301@roundup.psfhosted.org> Ruben Vorderman added the comment: Whoops. Sorry, I spoke before my turn. If gzip implements it, it seems only logical that python's *gzip* module should too. I believe it can be fixed quite easily. The code should raise a warning though. I will make a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 09:57:07 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Nov 2021 14:57:07 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638197827.87.0.378068796647.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: PyBytes_AS_STRING() and PyByteArray_AS_STRING() are used to modify string characters, but not used directly as l-value. Search in PyPI top 5000 packages: $ ./search_pypi_top_5000.sh '(PyByteArray|PyBytes)_AS_.*[^!<>=]=[^=]' pypi-top-5000_2021-08-17/plyvel-1.3.0.tar.gz pypi-top-5000_2021-08-17/numexpr-2.7.3.tar.gz pypi-top-5000_2021-08-17/Cython-0.29.24.tar.gz numexpr-2.7.3, numexpr/numexpr_object.cpp: PyBytes_AS_STRING(constsig)[i] = 'b'; PyBytes_AS_STRING(constsig)[i] = 'i'; PyBytes_AS_STRING(constsig)[i] = 'l'; PyBytes_AS_STRING(constsig)[i] = 'f'; PyBytes_AS_STRING(constsig)[i] = 'd'; PyBytes_AS_STRING(constsig)[i] = 'c'; PyBytes_AS_STRING(constsig)[i] = 's'; plyvel-1.3.0, plyvel/_plyvel.cpp: PyByteArray_AS_STRING(string)[i] = (char) v; PyByteArray_AS_STRING(string)[i] = (char) v; Cython-0.29.24: $ grep -E '(PyByteArray|PyBytes)_AS_.*[^!<>=]=[^=]' -R . ./Cython/Utility/StringTools.c: PyByteArray_AS_STRING(string)[i] = (char) v; ./Cython/Utility/StringTools.c: PyByteArray_AS_STRING(string)[i] = (char) v; ./Cython/Utility/StringTools.c: PyByteArray_AS_STRING(bytearray)[n] = value; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:02:03 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 15:02:03 +0000 Subject: [issue40280] Consider supporting emscripten/webassembly as a build target In-Reply-To: <1586848295.92.0.690921486188.issue40280@roundup.psfhosted.org> Message-ID: <1638198123.98.0.843424622614.issue40280@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 6ac3c8a3140c17bd71ba98dfc5250c371101e77c by Christian Heimes in branch 'main': bpo-40280: Emscripten systems use .wasm suffix by default (GH-29842) https://github.com/python/cpython/commit/6ac3c8a3140c17bd71ba98dfc5250c371101e77c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:22:36 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Nov 2021 15:22:36 +0000 Subject: [issue45828] [sqlite3] use unraisable exceptions in callbacks In-Reply-To: <1637142139.17.0.325447635638.issue45828@roundup.psfhosted.org> Message-ID: <1638199356.2.0.511137600636.issue45828@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset c4a69a4ad035513ada1c0d41a46723606b538e13 by Erlend Egeberg Aasland in branch 'main': bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591) https://github.com/python/cpython/commit/c4a69a4ad035513ada1c0d41a46723606b538e13 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:28:28 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Mon, 29 Nov 2021 15:28:28 +0000 Subject: [issue24301] gzip module failing to decompress valid compressed file In-Reply-To: <1432742343.38.0.978535326882.issue24301@psf.upfronthosting.co.za> Message-ID: <1638199708.06.0.0146380548743.issue24301@roundup.psfhosted.org> Change by Ruben Vorderman : ---------- keywords: +patch pull_requests: +28076 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:30:48 2021 From: report at bugs.python.org (penguin_wwy) Date: Mon, 29 Nov 2021 15:30:48 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs Message-ID: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> New submission from penguin_wwy <940375606 at qq.com>: Set up file stream for redirecting logs by adding a parameter in `set_debug`. The stderr is used by default. ---------- components: Library (Lib) messages: 407286 nosy: penguin_wwy priority: normal severity: normal status: open title: Set up file stream for redirecting GC logs type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:33:44 2021 From: report at bugs.python.org (penguin_wwy) Date: Mon, 29 Nov 2021 15:33:44 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs In-Reply-To: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> Message-ID: <1638200024.39.0.602994792926.issue45928@roundup.psfhosted.org> Change by penguin_wwy <940375606 at qq.com>: ---------- keywords: +patch pull_requests: +28077 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29848 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:34:25 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 15:34:25 +0000 Subject: [issue45847] Port module setup to PY_STDLIB_MOD() macro and addext() In-Reply-To: <1637340990.31.0.170272925457.issue45847@roundup.psfhosted.org> Message-ID: <1638200065.54.0.129859971737.issue45847@roundup.psfhosted.org> Christian Heimes added the comment: New changeset b394af13f69c1a2ac0e7d32dabf6d86443606ab2 by Christian Heimes in branch 'main': bpo-45847: PY_STDLIB_MOD_SIMPLE now checks py_stdlib_not_available (GH-29844) https://github.com/python/cpython/commit/b394af13f69c1a2ac0e7d32dabf6d86443606ab2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:36:22 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Nov 2021 15:36:22 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs In-Reply-To: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> Message-ID: <1638200182.81.0.929726429438.issue45928@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks for opening this issue..I think you need to elaborate a bit more about this feature you are suggesting. In general we don't allow this kind of facilities to redirect to file stream anywhere else in the interpreter. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 10:49:18 2021 From: report at bugs.python.org (Vito De Tullio) Date: Mon, 29 Nov 2021 15:49:18 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows Message-ID: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> New submission from Vito De Tullio : It would be useful to let json.tool support empty rows during handling of json lines generally speaking, this tolerance is already present in parsers like srsly and jsonlines actual behavior: # happy scenario $ echo -e '{"foo":1}\n{"bar":2}' | python3.10 -mjson.tool --json-lines { "foo": 1 } { "bar": 2 } $ # spurious EOL at EOF $ echo -e '{"foo":1}\n{"bar":2}\n' | python3.10 -mjson.tool --json-lines { "foo": 1 } { "bar": 2 } Expecting value: line 2 column 1 (char 1) $ # two groups of "rows" in jsonl <- my current usecase $ echo -e '{"foo":1}\n\n{"bar":2}' | python3.10 -mjson.tool --json-lines { "foo": 1 } Expecting value: line 2 column 1 (char 1) $ my desired outcome is to preserve the EOLs, so to have something like: # happy scenario $ echo -e '{"foo":1}\n{"bar":2}' | python3.10 -mjson.tool --json-lines { "foo": 1 } { "bar": 2 } $ # spurious EOL at EOF $ echo -e '{"foo":1}\n{"bar":2}\n' | python3.10 -mjson.tool --json-lines { "foo": 1 } { "bar": 2 } $ # two groups of "rows" in jsonl $ echo -e '{"foo":1}\n\n{"bar":2}' | python3.10 -mjson.tool --json-lines { "foo": 1 } { "bar": 2 } $ ---------- components: Library (Lib) messages: 407289 nosy: ZeD priority: normal severity: normal status: open title: extend json.tool --json-lines to ignore empty rows type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 11:17:13 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 16:17:13 +0000 Subject: [issue23017] string.printable.isprintable() returns False In-Reply-To: <1418097121.16.0.891016494417.issue23017@psf.upfronthosting.co.za> Message-ID: <1638202633.76.0.766553960398.issue23017@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 11:19:19 2021 From: report at bugs.python.org (Zachary Ware) Date: Mon, 29 Nov 2021 16:19:19 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638202759.51.0.3494295674.issue45916@roundup.psfhosted.org> Zachary Ware added the comment: We had a similar report in bpo-45620, but as Dennis and Eric reported in that issue, I can't reproduce that behavior here. We are using a non-HTTPS link there even though the site supports HTTPS; I'm not sure if fixing that might actually fix things for you and others in the same situation, though. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 11:23:38 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Nov 2021 16:23:38 +0000 Subject: [issue45881] Cross compiling on Linux is untested, undocumented, and broken In-Reply-To: <1637685465.3.0.98765140006.issue45881@roundup.psfhosted.org> Message-ID: <1638203018.45.0.0860486630818.issue45881@roundup.psfhosted.org> Christian Heimes added the comment: New changeset 992565f7f72fd8250b788795f76eedcff5636a64 by Christian Heimes in branch 'main': bpo-45881: configure --with-freeze-module --with-build-python (GH-29835) https://github.com/python/cpython/commit/992565f7f72fd8250b788795f76eedcff5636a64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 11:29:31 2021 From: report at bugs.python.org (Valery Lovchikov) Date: Mon, 29 Nov 2021 16:29:31 +0000 Subject: [issue45930] Lambda function bug Message-ID: <1638203371.42.0.53122628449.issue45930@roundup.psfhosted.org> New submission from Valery Lovchikov : Python 3.9.7 (default, Sep 10 2021, 14:59:43) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> f=[lambda x: y**x for y in [2,3]] >>> f[0](2) 9 >>> f[1](2) 9 ============= I expected 4 as a result of f[0](2), but got 9 ---------- messages: 407293 nosy: lvch priority: normal severity: normal status: open title: Lambda function bug versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 11:44:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 16:44:37 +0000 Subject: [issue26552] Failing ensure_future still creates a Task In-Reply-To: <1457869570.39.0.866858008064.issue26552@psf.upfronthosting.co.za> Message-ID: <1638204277.03.0.723346119601.issue26552@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 11:50:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 16:50:41 +0000 Subject: [issue3354] Improve error reporting for the argument parsing C API In-Reply-To: <1216040063.73.0.634067891199.issue3354@psf.upfronthosting.co.za> Message-ID: <1638204641.26.0.184652292903.issue3354@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced in 3.11: >>> sorted([1,2,3], reverse=None) Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object cannot be interpreted as an integer ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 11:54:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Nov 2021 16:54:57 +0000 Subject: [issue26552] Failing ensure_future still creates a Task In-Reply-To: <1457869570.39.0.866858008064.issue26552@psf.upfronthosting.co.za> Message-ID: <1638204897.05.0.778557836538.issue26552@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:01:26 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 29 Nov 2021 17:01:26 +0000 Subject: [issue45930] Lambda function bug In-Reply-To: <1638203371.42.0.53122628449.issue45930@roundup.psfhosted.org> Message-ID: <1638205286.78.0.768385686001.issue45930@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This is known behaviour due to binding. Please see https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:04:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 17:04:21 +0000 Subject: [issue21915] [doc] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring In-Reply-To: <1404442975.51.0.177790858493.issue21915@psf.upfronthosting.co.za> Message-ID: <1638205461.24.0.209622900986.issue21915@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring -> [doc] telnetlib.Telnet constructor does not match telnetlib.Telnet.__init__ docstring type: -> enhancement versions: +Python 3.11 -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:09:08 2021 From: report at bugs.python.org (penguin_wwy) Date: Mon, 29 Nov 2021 17:09:08 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs In-Reply-To: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> Message-ID: <1638205748.23.0.462297584247.issue45928@roundup.psfhosted.org> penguin_wwy <940375606 at qq.com> added the comment: Thank you for the reminder. At first, I wanted to analyze the effectiveness of GC through logs. However, because GC through the stderr output, these logs are mixed in with other output(such as warnings). This make it difficult to handle them automaticaly. So, i added an `TestIOWrapper` parameter(Not just file streams, but also other io, sockets, buffer and so on) to `set_debug` function in gcmodule.c, to redirect GC logs. I think this will help developers monitor the GC more easily, for example when they deal with a memory leak. Of course, the default will remain the same as the previous behavior , log via stderr :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:10:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 17:10:30 +0000 Subject: [issue23764] [doc] Reference inspect.Signature.bind from functools.wraps documentation In-Reply-To: <1427220873.41.0.520106438504.issue23764@psf.upfronthosting.co.za> Message-ID: <1638205830.2.0.657643927061.issue23764@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Reference inspect.Signature.bind from functools.wraps documentation -> [doc] Reference inspect.Signature.bind from functools.wraps documentation versions: +Python 3.11 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:15:30 2021 From: report at bugs.python.org (penguin_wwy) Date: Mon, 29 Nov 2021 17:15:30 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs In-Reply-To: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> Message-ID: <1638206130.3.0.326609662579.issue45928@roundup.psfhosted.org> penguin_wwy <940375606 at qq.com> added the comment: Sorry, parameter type is `TextIOWrapper`, not `TestIOWrapper` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:16:43 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Nov 2021 17:16:43 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs In-Reply-To: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> Message-ID: <1638206203.04.0.713113248853.issue45928@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: There are several problems with this change: 1) The lifetime of the file descriptor. The file descriptor is borrowed, which normally will lead to not being properly cleaned upon failure or interpreter deallocation. 2) The statistics you are trying to fetch via parsing the file are actually available through better APIS: https://docs.python.org/3/library/gc.html#gc.callbacks and https://docs.python.org/3/library/gc.html#gc.get_stats 3) The stderr output is not stable or considered to be stable between releases. The main purpose is to serve as a quick way to debug or check for statistics without using proper callbacks, but enything more involved needs to use the callbacks. Based on these, I am afraid I don't feel comfortable supporting this patch :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:17:59 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Nov 2021 17:17:59 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs In-Reply-To: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> Message-ID: <1638206279.23.0.573576235763.issue45928@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: There is another problem: PySys_WriteStderr is faster than your gc_log, which can potentially slow down heavy GC-based programs, even if the file descriptor is not used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:18:19 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 17:18:19 +0000 Subject: [issue7951] Should str.format allow negative indexes when used for __getitem__ access? In-Reply-To: <1266450859.13.0.906832569526.issue7951@psf.upfronthosting.co.za> Message-ID: <1638206299.31.0.477222726364.issue7951@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11, and the error message is a little weirder now: >>> "{0[-1]}".format('fox') Traceback (most recent call last): File "", line 1, in TypeError: string indices must be integers, not 'str' ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:18:29 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 29 Nov 2021 17:18:29 +0000 Subject: [issue45928] Set up file stream for redirecting GC logs In-Reply-To: <1638199848.02.0.0303380360366.issue45928@roundup.psfhosted.org> Message-ID: <1638206309.59.0.168004318826.issue45928@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:27:00 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Nov 2021 17:27:00 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1638206820.07.0.658256494833.issue44391@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 4141d94fa608cdf5c8cd3e62f7ea1c27fd41eb8d by Vinay Sajip in branch 'main': bpo-44391: Remove unused argument from a varargs call. (GH-29843) https://github.com/python/cpython/commit/4141d94fa608cdf5c8cd3e62f7ea1c27fd41eb8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:27:08 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 17:27:08 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1638206828.09.0.394572614185.issue44391@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +28078 pull_request: https://github.com/python/cpython/pull/29849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:27:12 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 17:27:12 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1638206832.33.0.236475387706.issue44391@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28079 pull_request: https://github.com/python/cpython/pull/29850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:53:46 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Nov 2021 17:53:46 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1638208426.49.0.666629516547.issue44391@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 40a57532a5ad5dfd81ab6c72c5fb2e2dc4509199 by Miss Islington (bot) in branch '3.9': [3.9] bpo-44391: Remove unused argument from a varargs call. (GH-29843) (GH-29850) https://github.com/python/cpython/commit/40a57532a5ad5dfd81ab6c72c5fb2e2dc4509199 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:54:31 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 29 Nov 2021 17:54:31 +0000 Subject: [issue45930] Lambda function bug In-Reply-To: <1638203371.42.0.53122628449.issue45930@roundup.psfhosted.org> Message-ID: <1638208471.57.0.149332387267.issue45930@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 Mon Nov 29 12:54:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 17:54:49 +0000 Subject: [issue19022] Improve handling of type.__abstractmethods__ descriptor In-Reply-To: <1379230408.43.0.525404043988.issue19022@psf.upfronthosting.co.za> Message-ID: <1638208489.22.0.965024668211.issue19022@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 12:56:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 17:56:16 +0000 Subject: [issue19022] Improve handling of type.__abstractmethods__ descriptor In-Reply-To: <1379230408.43.0.525404043988.issue19022@psf.upfronthosting.co.za> Message-ID: <1638208576.48.0.064975363577.issue19022@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:00:39 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Nov 2021 18:00:39 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1638208839.94.0.366312536121.issue44391@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset af39cfa6ca1e5dc4e5d28c1f09a875a14354e4ae by Miss Islington (bot) in branch '3.10': [3.10] bpo-44391: Remove unused argument from a varargs call. (GH-29843) (GH-29849) https://github.com/python/cpython/commit/af39cfa6ca1e5dc4e5d28c1f09a875a14354e4ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:01:46 2021 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 29 Nov 2021 18:01:46 +0000 Subject: =?utf-8?q?=5Bissue44391=5D_PC/launcher=2Ec=EF=BC=8Cone_more_argument_than?= =?utf-8?q?_required?= In-Reply-To: <1623401355.22.0.20418176372.issue44391@roundup.psfhosted.org> Message-ID: <1638208906.39.0.473627369322.issue44391@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:07:27 2021 From: report at bugs.python.org (da-woods) Date: Mon, 29 Nov 2021 18:07:27 +0000 Subject: [issue45905] Provide a C API for introspectable frames for Cython and similar tools In-Reply-To: <1637944893.57.0.969509870806.issue45905@roundup.psfhosted.org> Message-ID: <1638209247.32.0.16543957862.issue45905@roundup.psfhosted.org> Change by da-woods : ---------- nosy: +da-woods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:08:04 2021 From: report at bugs.python.org (Mark Sapiro) Date: Mon, 29 Nov 2021 18:08:04 +0000 Subject: [issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i In-Reply-To: <1638149884.18.0.351231109602.issue45921@roundup.psfhosted.org> Message-ID: <1638209284.72.0.783247149342.issue45921@roundup.psfhosted.org> Mark Sapiro added the comment: The Mailman-users at python.org list received a post with the From: header containing a Hebrew display name RFC 2047 encoded with the iso-8859-8-i charset which threw a LookupError: unknown encoding: iso-8859-8-i exception in processing and shunted the message. The message body also had the charset declared as iso-8859-8-i although it contained only ascii. Unfortunately, I don't have the original message so I can't say what MUA created it or how common this usage is. I do think that just adding these as aliases for the non-annotated encodings is an appropriate response. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:10:41 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 18:10:41 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638209441.02.0.681677639299.issue43905@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28080 pull_request: https://github.com/python/cpython/pull/29851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:10:40 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 18:10:40 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638209440.83.0.867391766606.issue43905@roundup.psfhosted.org> miss-islington added the comment: New changeset c1f93f0d378958dfae4f24aad0c0088e3e04e403 by andrei kulakov in branch 'main': bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154) https://github.com/python/cpython/commit/c1f93f0d378958dfae4f24aad0c0088e3e04e403 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:10:44 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 18:10:44 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638209444.88.0.68484819981.issue43905@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28081 pull_request: https://github.com/python/cpython/pull/29852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:19:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 18:19:27 +0000 Subject: [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1638209967.75.0.483678323742.issue18531@roundup.psfhosted.org> Irit Katriel added the comment: This seems fixed in 3.11: >>> from collections import defaultdict >>> '{foo}{bar}'.format(**defaultdict(str)) Traceback (most recent call last): File "", line 1, in KeyError: 'foo' ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:21:26 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 29 Nov 2021 18:21:26 +0000 Subject: [issue45924] Incorrect traceback when future's exception is raised multiple times In-Reply-To: <1638186926.45.0.137493772787.issue45924@roundup.psfhosted.org> Message-ID: <1638210086.49.0.708034019243.issue45924@roundup.psfhosted.org> Guido van Rossum added the comment: There's a similar issue with concurrent.futures.Future, and really, anything that stores exceptions and later raises them can get in trouble if there's a way to get the exception raised multiple times. This is rarely noticed because usually the exception isn't raised more than once. We need separate bpo issues for the other cases. The fix is easy enough (separately store a traceback and raise using e.with_traceback(tb)) so I'm marking this as an easy issue. ---------- keywords: +easy -patch stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:25:25 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 29 Nov 2021 18:25:25 +0000 Subject: [issue26552] Failing ensure_future still creates a Task In-Reply-To: <1457869570.39.0.866858008064.issue26552@psf.upfronthosting.co.za> Message-ID: <1638210325.07.0.231552560553.issue26552@roundup.psfhosted.org> Change by Guido van Rossum : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:27:02 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 29 Nov 2021 18:27:02 +0000 Subject: [issue23819] test_asyncio fails when run under -O In-Reply-To: <1427808695.9.0.385563565443.issue23819@psf.upfronthosting.co.za> Message-ID: <1638210422.47.0.936002387671.issue23819@roundup.psfhosted.org> Guido van Rossum added the comment: I'd be happy to mentor someone who wants to tackle this. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:30:46 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 18:30:46 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638210646.81.0.824528533498.issue43905@roundup.psfhosted.org> miss-islington added the comment: New changeset 376b24e4f69cba53bae9856e9d076af47bb2b6c6 by Miss Islington (bot) in branch '3.9': bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154) https://github.com/python/cpython/commit/376b24e4f69cba53bae9856e9d076af47bb2b6c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:33:04 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 18:33:04 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638210784.13.0.0663412940711.issue43905@roundup.psfhosted.org> miss-islington added the comment: New changeset 32f1491a9770b7f2989507ecf8f13ef35dd95b0b by Miss Islington (bot) in branch '3.10': bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154) https://github.com/python/cpython/commit/32f1491a9770b7f2989507ecf8f13ef35dd95b0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:33:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 18:33:42 +0000 Subject: [issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer In-Reply-To: <1564371298.05.0.400100937454.issue37699@roundup.psfhosted.org> Message-ID: <1638210822.21.0.044712241896.issue37699@roundup.psfhosted.org> Irit Katriel added the comment: What is the advantage of making the doc more specific in this manner? If we do change the doc like this, we need to add unit test ensuring that this is the behaviour, and we need are committing cpython (and all other python implementations) to behave like this in the future as well. I suggest this issue be rejected. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:34:08 2021 From: report at bugs.python.org (James Gerity) Date: Mon, 29 Nov 2021 18:34:08 +0000 Subject: =?utf-8?q?=5Bissue34820=5D_binascii=2Ec=3A1578=3A1=3A_error=3A_the_contro?= =?utf-8?q?l_flow_of_function_=E2=80=98binascii=5Fcrc32=E2=80=99_does_not_?= =?utf-8?q?match_its_profile_data_=28counter_=E2=80=98arcs=E2=80=99=29?= In-Reply-To: <1538056682.62.0.545547206417.issue34820@psf.upfronthosting.co.za> Message-ID: <1638210848.33.0.0955892827734.issue34820@roundup.psfhosted.org> James Gerity added the comment: The Makefile issue was fixed in bpo-37725 (GitHub: https://github.com/python/cpython/commit/c6bbcd258302b4b9b3d4f3c39bb5f7ff0120ec67), but the change wasn't ported to the 3.7, 3.8 branches. Those versions are now security-only, so this issue can probably just be closed. If anybody comes to this issue with the same problem, you can `make profile-removal` or `make clobber` to get GNU Make to clean up the PGO data, or you can remove the files yourself with the `find` invocation. ---------- nosy: +SnoopJeDi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:34:32 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 29 Nov 2021 18:34:32 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638210872.68.0.64257220474.issue43905@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks, @andrei.avk! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:37:26 2021 From: report at bugs.python.org (Brian Skinn) Date: Mon, 29 Nov 2021 18:37:26 +0000 Subject: [issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer In-Reply-To: <1564371298.05.0.400100937454.issue37699@roundup.psfhosted.org> Message-ID: <1638211046.72.0.400680661822.issue37699@roundup.psfhosted.org> Brian Skinn added the comment: Indeed, I hadn't been thinking about the testing/maintenance burden to CPython or other implementations when I made the suggestion. I no longer have a strong opinion about this change, so I am happy to reject/close. ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:44:26 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Mon, 29 Nov 2021 18:44:26 +0000 Subject: [issue43905] dataclasses.astuple (and .asdict) do deepcopy on all fields In-Reply-To: <1619007557.11.0.871267775065.issue43905@roundup.psfhosted.org> Message-ID: <1638211466.92.0.182613901233.issue43905@roundup.psfhosted.org> Andrei Kulakov added the comment: Thank you for reviewing Eric! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 13:55:54 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Nov 2021 18:55:54 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638212154.46.0.0465800002899.issue45917@roundup.psfhosted.org> Mark Dickinson added the comment: New changeset 6266e4af873a27c9d352115f2f7a1ad0885fc031 by Gideon in branch 'main': bpo-45917: Add math.exp2() method - return 2 raised to the power of x (GH-29829) https://github.com/python/cpython/commit/6266e4af873a27c9d352115f2f7a1ad0885fc031 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 14:04:35 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Nov 2021 19:04:35 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638212675.03.0.897433823573.issue45917@roundup.psfhosted.org> Mark Dickinson added the comment: All done. Many thanks, Gideon! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 14:13:17 2021 From: report at bugs.python.org (Adrian Garcia Badaracco) Date: Mon, 29 Nov 2021 19:13:17 +0000 Subject: [issue17005] Add a topological sort algorithm In-Reply-To: <1358717952.33.0.209682941713.issue17005@psf.upfronthosting.co.za> Message-ID: <1638213197.28.0.539284844581.issue17005@roundup.psfhosted.org> Adrian Garcia Badaracco added the comment: As part of working on a tool that deals with dependencies, I was building my own topological sort. I iterated through various APIs (iterable of tasks, iterable of parallelizable groups of tasks, etc.) until I found the (now stdlib) version which ended up being exactly the API I needed to most efficiently execute dependencies. So, kudos on the design! I actually ended up re-writing it in Rust, partly because I wanted a good project to learn Rust, partly because I wanted to be able to modify the API a bit. Namely: 1. I needed the ability to re-execute the same DAG multiple times without re-checking for cycles and re-adding all nodes (so basically copying `npredecessors` before executing). 2. I needed the ability to remove nodes from the graph. The real-world application is removing pruning subgraphs corresponding to cached dependencies. Again, I wanted to do this without rebuilding the entire thing (removing nodes can never lead to a cycle, and it is possible to keep track of new leaf nodes as you remove them instead of iterating over the entire graph again to find leaf nodes). Here's the implementation in case anyone is interested: https://github.com/adriangb/graphlib2 The algorithm is the same, but I had to change the data structures somewhat to cope w/ Rusts' borrowing rules (namely I can't hold a mutable reference to two values in `node2nodeinfo` at the same time, which the current implementation does here https://github.com/python/cpython/blob/32f1491a9770b7f2989507ecf8f13ef35dd95b0b/Lib/graphlib.py#L190, so I split them out into two separate mappings). ---------- nosy: +adriangb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 14:43:33 2021 From: report at bugs.python.org (David Federman) Date: Mon, 29 Nov 2021 19:43:33 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo Message-ID: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> New submission from David Federman : When building with Visual Studio 2017+, any Directory.Build.props/targets above the repo in the file structure (eg. in the parent repo when the python repo is a submodule) will be imported automatically. ---------- components: Build messages: 407320 nosy: dfederm priority: normal severity: normal status: open title: Directory.Build.props/targets leaks from folders above the repo type: compile error versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 14:49:21 2021 From: report at bugs.python.org (David Federman) Date: Mon, 29 Nov 2021 19:49:21 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638215361.25.0.975162536401.issue45931@roundup.psfhosted.org> Change by David Federman : ---------- keywords: +patch pull_requests: +28082 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29854 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 14:50:53 2021 From: report at bugs.python.org (Tim Peters) Date: Mon, 29 Nov 2021 19:50:53 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638215453.26.0.405816988806.issue45917@roundup.psfhosted.org> Tim Peters added the comment: Bad news: on Windows, exp2(x) is way worse then pow(2, x). Here I changed the loop of Mark's little driver like so: differ = really_bad = 0 worst = 0.0 for n in range(100_000): x = random.uniform(-1000.0, 999.0) + random.random() if exp2(x) != pow(2.0, x): differ += 1 exp2err = exp2_error_ulps(x) pow2err = pow2_error_ulps(x) assert abs(pow2err) < 0.52 if abs(exp2err) >= 1.0: if abs(exp2err) > abs(worst): worst = exp2err really_bad += 1 if really_bad < 25: print(f"{x.hex():21} {x:22.17f} {exp2err:.5f}, {pow2err:.5f}") print(f"{differ=:,}") print(f"{really_bad=:,}") print(f"worst exp2 ulp error {worst:.5f}") Then output from one run: 0x1.0946680d45f28p+9 530.55005041041749791 -1.04399, -0.04399 0x1.de4f9662d84f8p+9 956.62177691995657369 -1.00976, -0.00976 -0x1.60f9152be0a09p+4 -22.06081120624188330 1.02472, 0.02472 -0x1.687b056d7a81ap+8 -360.48055156937482479 1.48743, 0.48743 0x1.8e97e9d405622p+9 797.18682337057930454 1.05224, 0.05224 -0x1.2d1e3a03eda7fp+9 -602.23614548782632028 -1.21876, -0.21876 0x1.3af55e79cd45dp+8 314.95847283612766887 -1.10044, -0.10044 0x1.0e7fba610cde6p+9 540.99787533882476964 -1.39782, -0.39782 0x1.9c7d0258e460dp+9 824.97663413192060489 1.19690, 0.19690 0x1.3de5064eb1598p+9 635.78925498637818237 1.75376, -0.24624 -0x1.d5189d23da3d0p+9 -938.19229553371587826 1.07734, 0.07734 0x1.967d0857aa500p+9 812.97681709114112891 1.23630, 0.23630 -0x1.30ee89e018914p+6 -76.23294782781550794 -1.10275, -0.10275 -0x1.e35eb8936dddbp+9 -966.74000780930089149 -1.02686, -0.02686 -0x1.28d40d7693088p+6 -74.20708260795993283 1.00352, 0.00352 -0x1.e965d067d1084p+7 -244.69885563303625986 1.21136, 0.21136 -0x1.b1fbeec1c1ba3p+7 -216.99205594529948371 -1.05536, -0.05536 -0x1.543d715a5824cp+9 -680.48002175620922571 1.24955, 0.24955 0x1.526829d46c034p+9 676.81377654336984051 -1.17826, -0.17826 -0x1.bdaf1d7850c74p+6 -111.42101085656196346 1.08670, 0.08670 -0x1.48218d1605dd0p+9 -656.26211810385029821 1.06103, 0.06103 -0x1.16298bcdb9103p+9 -556.32457896744051595 -1.23732, -0.23732 0x1.39ff24b1a7573p+8 313.99665365539038930 -1.20931, -0.20931 0x1.9cdf1d0101646p+8 412.87153631481157845 -1.23481, -0.23481 differ=38,452 really_bad=7,306 worst exp2 ulp error -1.91748 So they differed in more than a third of the cases; in about a fifth of the differing cases, the exp2 error was at least 1 ulp, and nearly 2 ulp at worst; while in all the differing cases the pow(2, x) error was under 0.52 ulp. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 15:01:50 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Nov 2021 20:01:50 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638216110.94.0.64985650356.issue45582@roundup.psfhosted.org> Steve Dower added the comment: It's one data point (well, statistics over 1000 points), but it looks like it's actually a slight improvement in performance over the previous code on Windows :) before after min 23.103 22.154 25% 25.069 23.59925 50% 25.8125 24.2715 75% 26.65175 24.89575 max 147.567 138.997 Going to run a Linux test as well, since that was a completely different code path, but assuming it's not drastically different then I'll go ahead and merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 15:17:18 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 29 Nov 2021 20:17:18 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638217038.39.0.68484225102.issue45931@roundup.psfhosted.org> Change by Eric V. Smith : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 15:27:42 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 29 Nov 2021 20:27:42 +0000 Subject: [issue45653] Freeze the encodings module. In-Reply-To: <1635444712.46.0.923300343963.issue45653@roundup.psfhosted.org> Message-ID: <1638217662.92.0.276158281486.issue45653@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 02b5ac6091ada0c2df99c4e1eae37ddccbcd91f0 by Kumar Aditya in branch 'main': bpo-45653: fix test_embed on windows (GH-29814) https://github.com/python/cpython/commit/02b5ac6091ada0c2df99c4e1eae37ddccbcd91f0 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 15:57:45 2021 From: report at bugs.python.org (Matt Wozniski) Date: Mon, 29 Nov 2021 20:57:45 +0000 Subject: [issue45675] pkgutil.get_data() doesn't add subpackages to parent packages when importing In-Reply-To: <1635535560.24.0.0921518602941.issue45675@roundup.psfhosted.org> Message-ID: <1638219465.16.0.161029051894.issue45675@roundup.psfhosted.org> Matt Wozniski added the comment: I wondered if it would be backwards compatible to make `pkgutil.get_data()` delegate to `importlib.resources.read_binary()`. It isn't, because `pkgutil.get_data()` accepts a relative path for the resource, and `importlib.resources.read_binary()` accepts only a filename. That is, you can do: pkgutil.get_data(__name__, "subdir/some_file") but not: importlib.resources.read_binary(__name__, "subdir/some_file") The latter fails with: File "/opt/bb/lib/python3.10/importlib/_common.py", line 34, in normalize_path raise ValueError(f'{path!r} must be only a file name') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 16:17:04 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Nov 2021 21:17:04 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638220624.17.0.884257398897.issue45931@roundup.psfhosted.org> Steve Dower added the comment: Nice catch, thanks! Did you start the CLA process already? (I personally would exempt this PR from it as "not sufficiently creative", but I'm not sure I'm allowed to do that anymore...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 16:30:21 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Nov 2021 21:30:21 +0000 Subject: [issue45582] Rewrite getpath.c in Python In-Reply-To: <1634945215.33.0.141600213082.issue45582@roundup.psfhosted.org> Message-ID: <1638221421.14.0.245273021116.issue45582@roundup.psfhosted.org> Steve Dower added the comment: Basically unchanged on Debian/WSL as well. There's a new conflict arisen, so I'll resolve that and then merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 16:49:35 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Nov 2021 21:49:35 +0000 Subject: [issue45451] IDLE Shell GUI - remove window border In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org> Message-ID: <1638222575.75.0.251443952809.issue45451@roundup.psfhosted.org> Raymond Hettinger added the comment: I request that this entire new feature be reverted. Having used it in classroom environment, it has been a catastrophe for teaching and is a significant regression in usability. Here are my notes so far: 1) As the OP says, this strong vertical line is visually jarring and against graphic design principles that allow the eye to group input/output pairs. Contrast this with Jupyter, Ipython, and previous versions of IDLE which use strong horizontal delineations between successive input/output pairs. 2) Pasting multiple statements into the shell window causes the first to be executed and the other statements are silently ignored. This is a recurring problem with new students and for those with Jupyter experience. For example, cut and paste these two statements into the shell and press return/enter: print('hello') # This executes print('world') # This is silently ignored 3) When students have errors, it is the norm to communicate them via a chat window. Formerly, the PS1 prompt separated the inputs from the outputs in a shell session; however, the PS1 and PS2 prompts are not included in a cut and paste section. The session becomes unintelligible because essential information is lost. This affects chat, posting interactive sessions to StackOverflow, and the ability to post examples in docstrings. In the main Python documentation, the examples always show the >>> but there is no longer a way to extract this essential information from an interactive session. 4) Related to #3 is that saving the shell window loses all the prompts. For a decade, I've performed live interactive demonstrations and have saved the sessions so that students could review it. Those saved sessions are now unreadable and therefore unusable. Here is what a saved interactive lesson used to look like: Python 3.7.6 (v3.7.6:43364a7ae0, Dec 18 2019, 14:18:50) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license()" for more information. >>> # Quoting syntax: ' " ''' """ >>> 'hello' 'hello' >>> "hello" 'hello' >>> '''hello''' 'hello' >>> """hello""" 'hello' >>> print('Don\'t prefer backslashes') Don't prefer backslashes >>> print("Instead, we've used alternate quotes") Instead, we've used alternate quotes >>> print('''She said, "I'm a good string quoter."''') She said, "I'm a good string quoter." >>> 30 + 40 - 5 65 >>> _ * 10 650 >>> _ * 10 6500 >>> type(_) Here is what the saved session looks like now: Python 3.11.0a2 (v3.11.0a2:e2b4e4bab9, Nov 5 2021, 15:54:35) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin Type "help", "copyright", "credits" or "license()" for more information. # Quoting syntax: ' " ''' """ 'hello' 'hello' "hello" 'hello' '''hello''' 'hello' """hello""" 'hello' print('Don\'t prefer backslashes') Don't prefer backslashes print("Instead, we've used alternate quotes") Instead, we've used alternate quotes print('''She said, "I'm a good string quoter."''') She said, "I'm a good string quoter." 30 + 40 - 5 65 _ * 10 650 _ * 10 6500 type(_) 5) With new students, we have a problem we didn't use to have before. When they emulate a live demo, they are typing the '...' PS1 prompt. It is confusing. FWIW, when I say "students", I'm referring to adults who are already experts in their field. Today I was teaching experienced engineers (most with masters degrees) at a major consumer electronics company. The new IDLE feature seriously degraded their experience and almost every learner was adversely affected in some way. ---------- nosy: +rhettinger priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:01:36 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Nov 2021 22:01:36 +0000 Subject: [issue7951] Should str.format allow negative indexes when used for __getitem__ access? In-Reply-To: <1266450859.13.0.906832569526.issue7951@psf.upfronthosting.co.za> Message-ID: <1638223296.33.0.148295807799.issue7951@roundup.psfhosted.org> Raymond Hettinger added the comment: I recommend not adding support for negative indexing to format() for accessing positional arguments. There is almost no reason to do this because it almost always makes the format string less readable, because the number of arguments is always known in advance, and because the arguments are almost always used entirely rather than selectively. Negative index support isn't a feature of the language. Instead, it is a feature provided on a class by class basis, if it makes sense for that class and for its use cases. We are not obliged to provide negative index support in places where it doesn't make sense or where it makes code less readable. For example, the islice() function doesn't support negative indices because it doesn't make sense there. Likewise, the Sequence ABC doesn't require negative index support or slice support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:10:40 2021 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 29 Nov 2021 22:10:40 +0000 Subject: [issue45932] EmailMessage incorrectly splits reply-to header Message-ID: <1638223840.93.0.45573972976.issue45932@roundup.psfhosted.org> New submission from Alexander Mohr : If you have a reply-to list that contains a name with a comma it must be quoted, however if the line length is just right python with split the name incorrectly and not keep the quote. Note that the CC line keeps the quote in the name but the reply-to does not, presumably since the line is slightly longer. example: from email.message import EmailMessage def main(): message = EmailMessage() message['From'] = 'no-reply at farmersbusinessnetwork.com' message['Reply-To'] = """MEGAN FOOOBAAAAAR ,"KDJEHGI, SCOTT KJUYT" """ message['To'] = """"KDJEHGI, SCOTT KJUYT" """ message['Subject'] = "does not matter" message['CC'] = """MEGAN FOOOBAAAAAR ,"KDJEHGI, SCOTT KJUYT" """ message.set_content('foo bar') print(message.as_string()) if __name__ == '__main__': main() ---------- components: email messages: 407329 nosy: barry, r.david.murray, thehesiod priority: normal severity: normal status: open title: EmailMessage incorrectly splits reply-to header type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:25:10 2021 From: report at bugs.python.org (Tom E) Date: Mon, 29 Nov 2021 22:25:10 +0000 Subject: [issue45933] Illegal Instrution (Core Dumped) Message-ID: <1638224710.52.0.0477949346292.issue45933@roundup.psfhosted.org> New submission from Tom E : When compiling CPython 3.10 on Ubuntu 22.04, with GCC 11.2.0, it compiles successfully, but when trying to run it it just gives Illegal Instrution (Core Dumped). But when I build 3.9.9 its just fine... CPU is Intel Core i5-10400. ---------- messages: 407330 nosy: guacaplushy priority: normal severity: normal status: open title: Illegal Instrution (Core Dumped) type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:27:53 2021 From: report at bugs.python.org (Alex Waygood) Date: Mon, 29 Nov 2021 22:27:53 +0000 Subject: [issue45451] IDLE Shell GUI - remove window border In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org> Message-ID: <1638224873.82.0.767068234769.issue45451@roundup.psfhosted.org> Change by Alex Waygood : ---------- nosy: +AlexWaygood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:32:36 2021 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 29 Nov 2021 22:32:36 +0000 Subject: [issue45932] EmailMessage incorrectly splits name and address header In-Reply-To: <1638223840.93.0.45573972976.issue45932@roundup.psfhosted.org> Message-ID: <1638225156.14.0.0582595600641.issue45932@roundup.psfhosted.org> Change by Alexander Mohr : ---------- title: EmailMessage incorrectly splits reply-to header -> EmailMessage incorrectly splits name and address header _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:40:42 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 22:40:42 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638225642.4.0.517897269931.issue45931@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28083 pull_request: https://github.com/python/cpython/pull/29855 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:40:43 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Nov 2021 22:40:43 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638225643.01.0.455782871605.issue45931@roundup.psfhosted.org> Steve Dower added the comment: New changeset 734ed3538314c9651ae64d5e2e0e98aae3aec17b by David Federman in branch 'main': bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (GH-29854) https://github.com/python/cpython/commit/734ed3538314c9651ae64d5e2e0e98aae3aec17b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:40:47 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 22:40:47 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638225647.21.0.616936062977.issue45931@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28084 pull_request: https://github.com/python/cpython/pull/29856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 17:46:55 2021 From: report at bugs.python.org (NIKOLA DRAGANIC) Date: Mon, 29 Nov 2021 22:46:55 +0000 Subject: [issue45934] python curses newterm implementation Message-ID: <1638226015.0.0.416996876875.issue45934@roundup.psfhosted.org> Change by NIKOLA DRAGANIC : ---------- components: C API, Windows nosy: draganic1, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: python curses newterm implementation type: enhancement versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 18:06:25 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Nov 2021 23:06:25 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638227185.51.0.992054419168.issue45931@roundup.psfhosted.org> Steve Dower added the comment: Looks like it's gone through. Thanks! ---------- nosy: -miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 18:08:41 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 23:08:41 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638227321.26.0.25542634061.issue45931@roundup.psfhosted.org> miss-islington added the comment: New changeset 5a6d9ed700ecc6984387e0533b11d81692c40469 by Miss Islington (bot) in branch '3.10': bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (GH-29854) https://github.com/python/cpython/commit/5a6d9ed700ecc6984387e0533b11d81692c40469 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 18:08:57 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 29 Nov 2021 23:08:57 +0000 Subject: [issue45931] Directory.Build.props/targets leaks from folders above the repo In-Reply-To: <1638215013.82.0.388546987279.issue45931@roundup.psfhosted.org> Message-ID: <1638227337.15.0.925423400987.issue45931@roundup.psfhosted.org> miss-islington added the comment: New changeset b91805ec0283f0642aa3311ec617c8596f65b7b4 by Miss Islington (bot) in branch '3.9': bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (GH-29854) https://github.com/python/cpython/commit/b91805ec0283f0642aa3311ec617c8596f65b7b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 18:38:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 23:38:11 +0000 Subject: [issue45935] Add test for Issue11109: socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass. Message-ID: <1638229091.88.0.545801814049.issue45935@roundup.psfhosted.org> New submission from Irit Katriel : As mentioned in https://bugs.python.org/issue11109#msg136869, test_socketserver needs to be updated to serve as a regression test for Issue11109. ---------- components: Tests messages: 407335 nosy: giampaolo.rodola, gregory.p.smith, iritkatriel, jwarkentin, orsenthil, python-dev, vstinner priority: normal severity: normal status: open title: Add test for Issue11109: socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass. type: enhancement versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 18:39:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 23:39:08 +0000 Subject: [issue11109] socketserver.ForkingMixIn leaves zombies, also fails to reap all zombies in one pass In-Reply-To: <1296770474.15.0.807802878959.issue11109@psf.upfronthosting.co.za> Message-ID: <1638229148.9.0.9299451646.issue11109@roundup.psfhosted.org> Irit Katriel added the comment: I've created Issue45935 for the missing test and will close this as resolved in version 3.3. ---------- nosy: +iritkatriel status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 18:46:48 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 23:46:48 +0000 Subject: [issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing In-Reply-To: <1282759693.65.0.0842882042261.issue9682@psf.upfronthosting.co.za> Message-ID: <1638229608.8.0.503838395866.issue9682@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: Traceback (most recent call last): File "/Users/iritkatriel/src/cpython-1/Lib/encodings/idna.py", line 165, in encode raise UnicodeError("label empty or too long") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeError: label empty or too long The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in File "/Users/iritkatriel/src/cpython-1/Lib/socket.py", line 824, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/iritkatriel/src/cpython-1/Lib/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long) ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 18:59:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 29 Nov 2021 23:59:34 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1638230374.61.0.589098072197.issue13236@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:02:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 00:02:53 +0000 Subject: [issue22859] unittest.TestProgram.usageExit no longer invoked In-Reply-To: <1415874322.06.0.308310544849.issue22859@psf.upfronthosting.co.za> Message-ID: <1638230573.57.0.0268680508167.issue22859@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +easy versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:06:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 00:06:03 +0000 Subject: [issue23056] tarfile raises an exception when reading an empty tar in streaming mode In-Reply-To: <1418671674.41.0.864207249713.issue23056@psf.upfronthosting.co.za> Message-ID: <1638230763.6.0.112835904685.issue23056@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:12:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 00:12:31 +0000 Subject: [issue23717] strptime() with year-weekday pair can produce invalid data In-Reply-To: <1426850371.96.0.168304833853.issue23717@psf.upfronthosting.co.za> Message-ID: <1638231151.14.0.326552499857.issue23717@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:15:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 00:15:29 +0000 Subject: [issue23217] help() function incorrectly captures comment preceding a nested function In-Reply-To: <1420882396.37.0.573730184021.issue23217@psf.upfronthosting.co.za> Message-ID: <1638231329.88.0.634052311664.issue23217@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11. ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:17:28 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Nov 2021 00:17:28 +0000 Subject: [issue45451] IDLE - modify text frame and widget borders In-Reply-To: <1634087096.76.0.0471723883661.issue45451@roundup.psfhosted.org> Message-ID: <1638231448.87.0.123663809549.issue45451@roundup.psfhosted.org> Terry J. Reedy added the comment: This issue applies to both Shell, with the prompt sidebar, and editor windows, with line number sidebars. I looked carefully at Windows Notepad++ editor tabs. They have a tab border, separate from the window border, that encompasses the line numbers, text, and scrollbar, but not the status bar. The are no internal lines between the three components. But the line numbers and scrollbar have a light gray background that separates them from the text. The IDLE text widgets instead have a border around the text but apparently not one around the larger frame. As a result, text widgets with just a scrollbar do not look exactly right. It would be easy to delete the text border and adjust the frame border. But as I suggested previously, I am pretty sure deleting it entirely would require a default light gray background. Any change would have to be tested on all 3 major systems. ---------- title: IDLE Shell GUI - remove window border -> IDLE - modify text frame and widget borders _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:18:33 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 30 Nov 2021 00:18:33 +0000 Subject: [issue45524] Cross-module dataclass inheritance breaks get_type_hints In-Reply-To: <1634654267.46.0.759337669411.issue45524@roundup.psfhosted.org> Message-ID: <1638231513.88.0.543696533125.issue45524@roundup.psfhosted.org> Change by Eric V. Smith : ---------- assignee: -> eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:30:11 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 00:30:11 +0000 Subject: [issue22656] `help` ignores `__doc__` of descriptors In-Reply-To: <1413551704.24.0.449864930924.issue22656@psf.upfronthosting.co.za> Message-ID: <1638232211.5.0.637557445251.issue22656@roundup.psfhosted.org> Irit Katriel added the comment: I am unable to reproduce the problem on 3.11 (on a Mac). I get both help messages from Ram's code. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:39:09 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 30 Nov 2021 00:39:09 +0000 Subject: [issue41102] ZipFile.namelist() does not match the actual files in .zip file In-Reply-To: <1593001145.16.0.222635534542.issue41102@roundup.psfhosted.org> Message-ID: <1638232749.93.0.492776364519.issue41102@roundup.psfhosted.org> Andrei Kulakov added the comment: Closing by request of OP. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 19:47:45 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 30 Nov 2021 00:47:45 +0000 Subject: [issue45813] Importing asyncio after deleting a coroutine object and before cleaning it up leads to crashing on Python3.11 In-Reply-To: <1637052252.29.0.850993765277.issue45813@roundup.psfhosted.org> Message-ID: <1638233265.61.0.194912922643.issue45813@roundup.psfhosted.org> Dennis Sweeney added the comment: I think the PR fixed one case, but the other case (when coro is kept around) still fails an assertion: Python 3.11.0a2+ (heads/main:734ed35383, Nov 29 2021, 19:29:25) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> async def f(): pass ... >>> coro = f() >>> frame = coro.cr_frame >>> frame.clear() :1: RuntimeWarning: coroutine 'f' was never awaited RuntimeWarning: Enable tracemalloc to get the object allocation traceback Assertion failed: f->f_frame->generator == NULL, file C:\Users\sween\Source\Repos\cpython2\multiply\Objects\frameobject.c, line 689 Perhaps there should be some sort of backport as well? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 20:03:09 2021 From: report at bugs.python.org (Rob) Date: Tue, 30 Nov 2021 01:03:09 +0000 Subject: [issue45896] Conflicting statements in docs about default support for asyncio subprocesses on Windows In-Reply-To: <1637792122.45.0.429203503373.issue45896@roundup.psfhosted.org> Message-ID: <1638234189.02.0.0153498013545.issue45896@roundup.psfhosted.org> Change by Rob : ---------- keywords: +patch pull_requests: +28085 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 20:12:26 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 30 Nov 2021 01:12:26 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1638234746.06.0.983033184203.issue44413@roundup.psfhosted.org> Andrei Kulakov added the comment: Cannot reproduce with 3.8.6 on MacOS. The code runs without any errors. As OP hasn't responded in 4 months I think we should close as "works for me". ---------- nosy: +andrei.avk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 20:12:59 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 30 Nov 2021 01:12:59 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1638234779.0.0.521906579378.issue44413@roundup.psfhosted.org> Change by Andrei Kulakov : ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 20:22:11 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Nov 2021 01:22:11 +0000 Subject: [issue22656] `help` ignores `__doc__` of descriptors In-Reply-To: <1413551704.24.0.449864930924.issue22656@psf.upfronthosting.co.za> Message-ID: <1638235331.43.0.899549511415.issue22656@roundup.psfhosted.org> Raymond Hettinger added the comment: This was fixed long ago in commit ac4bdcc80e986bdd5b9d10ab0bce35aabb790a3e The code is in inspect.py::_finddoc(). See issue 25503. ---------- nosy: +rhettinger resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 21:43:03 2021 From: report at bugs.python.org (Richard Decal) Date: Tue, 30 Nov 2021 02:43:03 +0000 Subject: [issue45936] collections.Counter drops key if value is 0 and updating using += operator Message-ID: <1638240183.83.0.336191695201.issue45936@roundup.psfhosted.org> New submission from Richard Decal : In brief: ``` from collections import Counter x = Counter({'a': 0, 'b': 1}) x.update(x) # works: Counter({'a': 0, 'b': 2}) x += x # expected: Counter({'a': 0, 'b': 3}) actual: Counter({'b': 3}) ``` I expect `+=` and `.update()` to be synonymous. However, the += operator is deleting keys if the source Counter has a zero count to begin with: ``` x = Counter({'a': 1}) x += Counter({'a': 0}) # ok: Counter({'a': 1}) y = Counter({'a': 0}) y += y # expected: Counter({'a': 0}) actual: Counter() ``` ---------- messages: 407348 nosy: crypdick priority: normal severity: normal status: open title: collections.Counter drops key if value is 0 and updating using += operator type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 22:29:37 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Tue, 30 Nov 2021 03:29:37 +0000 Subject: [issue45936] collections.Counter drops key if value is 0 and updating using += operator In-Reply-To: <1638240183.83.0.336191695201.issue45936@roundup.psfhosted.org> Message-ID: <1638242977.11.0.668509080665.issue45936@roundup.psfhosted.org> Dennis Sweeney added the comment: This is consistent with the docstrings of the methods: --------------------------------------------------------------------- >>> help(Counter.__iadd__) Help on function __iadd__ in module collections: __iadd__(self, other) Inplace add from another counter, keeping only positive counts. >>> c = Counter('abbb') >>> c += Counter('bcc') >>> c Counter({'b': 4, 'c': 2, 'a': 1}) >>> help(Counter.update) Help on function update in module collections: update(self, iterable=None, /, **kwds) Like dict.update() but add counts instead of replacing them. Source can be an iterable, a dictionary, or another Counter instance. >>> c = Counter('which') >>> c.update('witch') # add elements from another iterable >>> d = Counter('watch') >>> c.update(d) # add elements from another counter >>> c['h'] # four 'h' in which, witch, and watch 4 --------------------------------------------------------------------- However, it seems Counter.__iadd__ is not mentioned at all at https://docs.python.org/3/library/collections.html#collections.Counter. I think there could be a doc update. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 22:36:50 2021 From: report at bugs.python.org (Hozoy) Date: Tue, 30 Nov 2021 03:36:50 +0000 Subject: [issue45937] Pdb can't use the commands through -c or .pdbrc files Message-ID: <1638243410.6.0.709504814494.issue45937@roundup.psfhosted.org> New submission from Hozoy : I have a python file: def do_something(): pass def main(): a = 1 b = 2 c = a+b print(f"c:{c}") pass if __name__ == '__main__': main() I run this command: python -m pdb -c "b 5" -c "commands 1;;do_something();;end" -c "c" main.py It doesn't work. And I have a .pdbrc file b 5 commands 1 do_something() end c It doesn't work either. ---------- components: Library (Lib) messages: 407350 nosy: Zrincet priority: normal severity: normal status: open title: Pdb can't use the commands through -c or .pdbrc files versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 22:46:38 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Nov 2021 03:46:38 +0000 Subject: [issue45936] collections.Counter drops key if value is 0 and updating using += operator In-Reply-To: <1638240183.83.0.336191695201.issue45936@roundup.psfhosted.org> Message-ID: <1638243998.86.0.788768645206.issue45936@roundup.psfhosted.org> Raymond Hettinger added the comment: I don't think there is a need to list the inplace methods. They were put in to optimize what was already occurring when only the __add__ method was defined. Also, other container typically don't specifically call out the inplace methods. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 29 22:47:26 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Nov 2021 03:47:26 +0000 Subject: [issue45936] collections.Counter drops key if value is 0 and updating using += operator In-Reply-To: <1638240183.83.0.336191695201.issue45936@roundup.psfhosted.org> Message-ID: <1638244046.26.0.409894750392.issue45936@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 00:11:01 2021 From: report at bugs.python.org (Tim Peters) Date: Tue, 30 Nov 2021 05:11:01 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638249061.73.0.268347058238.issue45917@roundup.psfhosted.org> Tim Peters added the comment: Across millions of tries, same thing: Windows exp2 is off by at least 1 ulp over a third of the time, and by over 2 ulp about 3 times per million. Still haven't seen pow(2, x) off by as much as 0.52 ulp. >From its behavior, it appears Windows implements exp2(x) like so: i = floor(x) x -= i # now 0 <= x < 1 return ldexp(exp2(x), i) So it's apparently using some sub-state-of-the-art approximation to 2**x over the domain [0, 1]. But a consequence is that it gets it exactly right whenever x is an integer, so it's unlikely anyone will notice it's sloppy ;-) I expect we should just live with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 00:20:44 2021 From: report at bugs.python.org (Vishal Pandey) Date: Tue, 30 Nov 2021 05:20:44 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1638249644.43.0.291164219048.issue33381@roundup.psfhosted.org> Vishal Pandey added the comment: I have made a PR into the repository, can anyone please review and merge it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 01:19:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 06:19:30 +0000 Subject: [issue44413] OverflowError: mktime argument out of range after 2019 In-Reply-To: <1623607333.16.0.709856027198.issue44413@roundup.psfhosted.org> Message-ID: <1638253170.26.0.947667832831.issue44413@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 02:10:36 2021 From: report at bugs.python.org (Vito De Tullio) Date: Tue, 30 Nov 2021 07:10:36 +0000 Subject: [issue45929] extend json.tool --json-lines to ignore empty rows In-Reply-To: <1638200958.63.0.173460715414.issue45929@roundup.psfhosted.org> Message-ID: <1638256236.15.0.406686882916.issue45929@roundup.psfhosted.org> Change by Vito De Tullio : ---------- keywords: +patch pull_requests: +28086 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 02:12:30 2021 From: report at bugs.python.org (Francesc Elies) Date: Tue, 30 Nov 2021 07:12:30 +0000 Subject: [issue45842] AddressSanitizer: bad-free - hello world c extension In-Reply-To: <1637323577.79.0.578225391074.issue45842@roundup.psfhosted.org> Message-ID: <1638256350.41.0.274792089856.issue45842@roundup.psfhosted.org> Francesc Elies added the comment: I am closing this one, bad-free is in this case a false positive. Starting python and loading a dll which was linked with asan is incorrect. One should asan-rt as earyly as possible, in order to do that in linux one should use LD_PRELOAD but in windows it's a bit more convoluted. We made an executable which loads asan and instructed the dll DLLs to use the runtime linked into the main executable to avoid shadow memory collisions. In the official docs https://clang.llvm.org/docs/AddressSanitizer.html I could not find much about asan with clang under windows. Despite the library file names where not the same as in llvm master and that the blogpost has msvc in mind instead of clang this blog https://devblogs.microsoft.com/cppblog/addresssanitizer-asan-for-windows-with-msvc/#contributions-to-asan-runtime pointed us in the right direction. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 04:25:16 2021 From: report at bugs.python.org (Kumar Aditya) Date: Tue, 30 Nov 2021 09:25:16 +0000 Subject: [issue23819] test_asyncio fails when run under -O In-Reply-To: <1427808695.9.0.385563565443.issue23819@psf.upfronthosting.co.za> Message-ID: <1638264316.66.0.897308721861.issue23819@roundup.psfhosted.org> Kumar Aditya added the comment: I would like to tackle this, I'll work on this from next week. ---------- nosy: +kumaraditya303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 04:31:06 2021 From: report at bugs.python.org (Kumar Aditya) Date: Tue, 30 Nov 2021 09:31:06 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1638264666.85.0.28546222128.issue45816@roundup.psfhosted.org> Kumar Aditya added the comment: I have installed VS 2022 with v143 of MSVC. I get this error when compiling ```console C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.ta rgets(436,5): error MSB8020: The build tools for Visual Studio 2019 (Platform Toolset = 'v142') cannot be found. To build using the v142 build tools, please install Visual Studio 2019 build tools. Alternat ively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:\cpython\PCbuild\_freeze_module.vcxproj] 0 Warning(s) 1 Error(s) ``` ---------- nosy: +kumaraditya303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 05:36:39 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 10:36:39 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638268599.87.0.610130448656.issue45476@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28087 pull_request: https://github.com/python/cpython/pull/29860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 05:43:44 2021 From: report at bugs.python.org (jiahua wang) Date: Tue, 30 Nov 2021 10:43:44 +0000 Subject: [issue28953] Use `raise from` when raising new IncompleteRead In-Reply-To: <1481578993.98.0.52471260982.issue28953@psf.upfronthosting.co.za> Message-ID: <1638269024.13.0.835651380623.issue28953@roundup.psfhosted.org> Change by jiahua wang : ---------- nosy: +wangjiahua nosy_count: 1.0 -> 2.0 pull_requests: +28088 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29861 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:01:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 11:01:54 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1638270114.38.0.27876573801.issue33381@roundup.psfhosted.org> Irit Katriel added the comment: New changeset f97ec09baf8431494fd2ef5133090c7b0afd0551 by Vishal Pandey in branch 'main': bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) https://github.com/python/cpython/commit/f97ec09baf8431494fd2ef5133090c7b0afd0551 ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:01:55 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Nov 2021 11:01:55 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1638270115.57.0.0949870101288.issue33381@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 7.0 -> 8.0 pull_requests: +28089 pull_request: https://github.com/python/cpython/pull/29862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:01:59 2021 From: report at bugs.python.org (miss-islington) Date: Tue, 30 Nov 2021 11:01:59 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1638270119.64.0.242756386353.issue33381@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +28090 pull_request: https://github.com/python/cpython/pull/29863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:14:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 11:14:49 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638270889.38.0.847449603798.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c19c3a09618ac400538ee412f84be4c1196c7bab by Victor Stinner in branch 'main': bpo-45476: Add _Py_RVALUE() macro (GH-29860) https://github.com/python/cpython/commit/c19c3a09618ac400538ee412f84be4c1196c7bab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:23:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Nov 2021 11:23:58 +0000 Subject: [issue45933] Illegal Instrution (Core Dumped) In-Reply-To: <1638224710.52.0.0477949346292.issue45933@roundup.psfhosted.org> Message-ID: <1638271438.35.0.463203688309.issue45933@roundup.psfhosted.org> Christian Heimes added the comment: The issue sounds like a bug in your Linux distribution. I have been using GCC 11.2 for a while without any problems. Have you filed a bug with Ubuntu already? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:25:04 2021 From: report at bugs.python.org (Aivar Annamaa) Date: Tue, 30 Nov 2021 11:25:04 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638271504.81.0.654450519072.issue45732@roundup.psfhosted.org> Aivar Annamaa added the comment: Do I understand properly, that the macOS build hasn't been updated yet? It would be really great if Python 3.10.1 for macOS would come with Tcl/Tk 8.6.12, as it is supposed to fix a nasty crash with Spanish keyboard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:27:36 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Nov 2021 11:27:36 +0000 Subject: =?utf-8?q?=5Bissue34820=5D_binascii=2Ec=3A1578=3A1=3A_error=3A_the_contro?= =?utf-8?q?l_flow_of_function_=E2=80=98binascii=5Fcrc32=E2=80=99_does_not_?= =?utf-8?q?match_its_profile_data_=28counter_=E2=80=98arcs=E2=80=99=29?= In-Reply-To: <1538056682.62.0.545547206417.issue34820@psf.upfronthosting.co.za> Message-ID: <1638271656.27.0.315852568062.issue34820@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the update. I'm marking the issue as "wont fix" for 3.7 and 3.8. ---------- nosy: +christian.heimes resolution: -> wont fix stage: needs patch -> resolved status: open -> closed superseder: -> "make clean" should remove PGO task data _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:50:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 11:50:03 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1638273003.46.0.69458594905.issue33381@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 39751420b363530ef46506f10691d7b91ffe9b44 by Miss Islington (bot) in branch '3.10': bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) (GH-29862) https://github.com/python/cpython/commit/39751420b363530ef46506f10691d7b91ffe9b44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:50:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 11:50:32 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1638273032.82.0.947439104191.issue33381@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 031e2bb3326be542b224bbe35e7829846ea422cd by Miss Islington (bot) in branch '3.9': bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (GH-29801) (GH-29863) https://github.com/python/cpython/commit/031e2bb3326be542b224bbe35e7829846ea422cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:51:15 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 11:51:15 +0000 Subject: [issue33381] [doc] Incorrect documentation for strftime()/strptime() format code %f In-Reply-To: <1524963978.65.0.682650639539.issue33381@psf.upfronthosting.co.za> Message-ID: <1638273075.45.0.900990811172.issue33381@roundup.psfhosted.org> Irit Katriel added the comment: Thank you Judy and Vishal! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 06:54:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 11:54:31 +0000 Subject: [issue45607] Make it possible to enrich an exception's error message In-Reply-To: <1635194281.32.0.0583100270803.issue45607@roundup.psfhosted.org> Message-ID: <1638273271.79.0.0516398030058.issue45607@roundup.psfhosted.org> Irit Katriel added the comment: Issue28953 is another use case for this feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:00:08 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Nov 2021 12:00:08 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1638273608.04.0.100957132034.issue13236@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch nosy: +serhiy.storchaka nosy_count: 7.0 -> 8.0 pull_requests: +28091 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/29864 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:02:18 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Nov 2021 12:02:18 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1638273738.54.0.531176842673.issue13236@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:02:06 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Nov 2021 12:02:06 +0000 Subject: [issue13236] unittest needs more flush calls In-Reply-To: <1319137324.16.0.266090134048.issue13236@psf.upfronthosting.co.za> Message-ID: <1638273726.44.0.345516052388.issue13236@roundup.psfhosted.org> Serhiy Storchaka added the comment: I do not remember details, but I encountered this issue (maybe when run tests in subprocesses?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:05:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 12:05:41 +0000 Subject: [issue20281] [doc] time.strftime %z format specifier is the same as %Z In-Reply-To: <1389897342.88.0.737767593135.issue20281@psf.upfronthosting.co.za> Message-ID: <1638273941.49.0.989727326509.issue20281@roundup.psfhosted.org> Irit Katriel added the comment: See also Issue29964. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:06:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 12:06:08 +0000 Subject: [issue29964] [doc] %z directive has no effect on the output of time.strptime In-Reply-To: <1491164378.66.0.775281160942.issue29964@psf.upfronthosting.co.za> Message-ID: <1638273968.28.0.0289507097306.issue29964@roundup.psfhosted.org> Irit Katriel added the comment: See also Issue20281. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, iritkatriel title: %z directive has no effect on the output of time.strptime -> [doc] %z directive has no effect on the output of time.strptime type: behavior -> enhancement versions: +Python 3.11 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:14:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 12:14:34 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter In-Reply-To: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> Message-ID: <1638274474.85.0.748511671914.issue31196@roundup.psfhosted.org> Irit Katriel added the comment: I'm pretty sure both behaviours are by design. Can you explain why this is a problem? ---------- nosy: +iritkatriel resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:23:18 2021 From: report at bugs.python.org (Tony Zhou) Date: Tue, 30 Nov 2021 12:23:18 +0000 Subject: [issue45916] documentation link error In-Reply-To: <1638101696.82.0.501489879762.issue45916@roundup.psfhosted.org> Message-ID: <1638274998.69.0.846868372216.issue45916@roundup.psfhosted.org> Tony Zhou added the comment: ok i see, I found the pdf. thank you for that anyway ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:28:21 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 12:28:21 +0000 Subject: [issue26791] shutil.move fails to move symlink (Invalid cross-device link) In-Reply-To: <1460912297.17.0.227992133358.issue26791@psf.upfronthosting.co.za> Message-ID: <1638275301.46.0.749677220159.issue26791@roundup.psfhosted.org> Irit Katriel added the comment: Removing old versions. ---------- nosy: +iritkatriel versions: +Python 3.11 -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 07:43:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 12:43:18 +0000 Subject: [issue41270] NamedTemporaryFile is not its own iterator. In-Reply-To: <1594389522.96.0.51886326593.issue41270@roundup.psfhosted.org> Message-ID: <1638276198.84.0.0201438639774.issue41270@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: behavior -> enhancement versions: +Python 3.11 -Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 08:00:54 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Nov 2021 13:00:54 +0000 Subject: [issue44884] logging Formatter behavior when using msecs and braces : '{' In-Reply-To: <1628660598.09.0.631024760388.issue44884@roundup.psfhosted.org> Message-ID: <1638277254.84.0.248733407125.issue44884@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 08:12:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 13:12:10 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638277930.39.0.695161053219.issue45476@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +28092 pull_request: https://github.com/python/cpython/pull/29866 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 08:15:39 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Nov 2021 13:15:39 +0000 Subject: [issue41270] NamedTemporaryFile is not its own iterator. In-Reply-To: <1594389522.96.0.51886326593.issue41270@roundup.psfhosted.org> Message-ID: <1638278139.0.0.899590999414.issue41270@roundup.psfhosted.org> Serhiy Storchaka added the comment: Biopython uses next() without iter(), and there is no guarantee that it should work. ---------- nosy: +brett.cannon, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 08:39:31 2021 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 30 Nov 2021 13:39:31 +0000 Subject: [issue37658] In some cases asyncio.wait_for can lead to socket leak. In-Reply-To: <1563884177.4.0.19779936427.issue37658@roundup.psfhosted.org> Message-ID: <1638279571.38.0.740855648363.issue37658@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 99a9b343316172f049a52b39a406f0c0c42c106f by Miss Islington (bot) in branch '3.9': bpo-37658: Actually return result in race condition (GH-29202) (GH-29832) https://github.com/python/cpython/commit/99a9b343316172f049a52b39a406f0c0c42c106f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 09:13:03 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 14:13:03 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638281583.86.0.517867120184.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: I created this issue to disallow macros like PyFloat_AS_DOUBLE() and PyDict_GET_SIZE() as l-value. It seems like this change by itself is controversial. I proposed one way to implement this change: convert macros to static inline functions. I didn't expect that this conversion would be also controversial. For now, I abandon the static inline approach, to focus on the implementation which keeps macros: modify macros to use _Py_RVALUE() => PR 28976. Once the PR 28976 will be merged and the PEP 670 will be accepted, we can reconsider converting these macros to static inline functions, then it should be non controversial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 09:14:03 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 14:14:03 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638281643.33.0.384973781447.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4b97d974ecca9cce532be55410fe851eb9fdcf21 by Victor Stinner in branch 'main': bpo-45476: Disallow using asdl_seq_GET() as l-value (GH-29866) https://github.com/python/cpython/commit/4b97d974ecca9cce532be55410fe851eb9fdcf21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 09:36:02 2021 From: report at bugs.python.org (Andrei Kulakov) Date: Tue, 30 Nov 2021 14:36:02 +0000 Subject: [issue43153] tempfile seems to treat a file as a directory when processing an exception in the onerror() In-Reply-To: <1612691564.38.0.627288937354.issue43153@roundup.psfhosted.org> Message-ID: <1638282962.36.0.530792305976.issue43153@roundup.psfhosted.org> Andrei Kulakov added the comment: My last comment was wrong, the issue I linked is unrelated. I think the actual issue here is the code here: https://github.com/python/cpython/blob/4b97d974ecca9cce532be55410fe851eb9fdcf21/Lib/tempfile.py#L826 If `path` is a file that causes a permission error, `rmtree` is called and causes a NotADirectory error. This can be confusing when debugging and can lead to a bug if user's code tries to catch a PermissionError it expects but instead gets NotADirectory error. A solution is probably to check if path is a file and error is PermissionError and if ignore_errors=False, re-raise it instead of calling rmtree(). If ignore_errors=True, return instead of calling rmtree(). I don't have windows so can't test the OP code with this approach. Serhiy: adding you since you wrote `def onerror()` in tempfile module, do you think that is the cause of the issue and the right solution for it? ---------- nosy: +kj, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 09:55:29 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 30 Nov 2021 14:55:29 +0000 Subject: [issue44674] dataclasses should allow frozendict default value In-Reply-To: <1626703592.29.0.0154308260517.issue44674@roundup.psfhosted.org> Message-ID: <1638284129.38.0.654318245546.issue44674@roundup.psfhosted.org> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +28093 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29867 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 09:58:49 2021 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Nov 2021 14:58:49 +0000 Subject: [issue45932] EmailMessage incorrectly splits name and address header In-Reply-To: <1638223840.93.0.45573972976.issue45932@roundup.psfhosted.org> Message-ID: <1638284329.39.0.276039218074.issue45932@roundup.psfhosted.org> R. David Murray added the comment: This is a duplicate of #44637. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 09:59:41 2021 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Nov 2021 14:59:41 +0000 Subject: [issue44637] Quoting issue on header Reply-To and other address headers In-Reply-To: <1626266697.4.0.946779337742.issue44637@roundup.psfhosted.org> Message-ID: <1638284381.54.0.350182082037.issue44637@roundup.psfhosted.org> Change by R. David Murray : ---------- nosy: +thehesiod title: Quoting issue on header Reply-To -> Quoting issue on header Reply-To and other address headers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 10:14:43 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 30 Nov 2021 15:14:43 +0000 Subject: [issue45732] Make python.org Windows and macOS installers use Tk 8.6.12 In-Reply-To: <1636154121.05.0.278439369914.issue45732@roundup.psfhosted.org> Message-ID: <1638285283.58.0.582969015124.issue45732@roundup.psfhosted.org> Ned Deily added the comment: > It would be really great if Python 3.10.1 for macOS would come with Tcl/Tk 8.6.12, as it is supposed to fix a nasty crash with Spanish keyboard. Not to worry, the Tk for the macOS 3.10.1 will be updated. I need to do some more testing first. (BTW, I assume you are referring to this Tk issue: https://core.tcl-lang.org/tk/tktview/1626ed65b879bd76db99. The most recent 3.11.0 alpha preview has a pre-release of 8.6.12 and I can confirm that the Cmd-` with the Spanish keyboard no longer crashes with it.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 10:18:50 2021 From: report at bugs.python.org (Marc Villain) Date: Tue, 30 Nov 2021 15:18:50 +0000 Subject: [issue45938] EmailMessage as_bytes Message-ID: <1638285530.74.0.285035322318.issue45938@roundup.psfhosted.org> New submission from Marc Villain : I am parsing an email with a subject header where the encoding of a unicode character happens to be cut in half. When a second encoded unicode character is encountered, we get the following error: > 'utf-8' codec can't encode characters in position 1-2: surrogates not allowed This error can be reproduced using the following: >>> from email.message import EmailMessage >>> msg = EmailMessage() >>> msg.add_header('subject', '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_a=C3=B1o?=') >>> print(str(msg)) # This will succeed >>> print(msg.as_bytes()) # This will fail >>> print(msg.as_string()) # This will fail After a bit of investigations, it appears the library is at some poing trying to concatenate 'a\udcc3\udcb1o ' and 'c?mo'. It then proceeds to try to call _ew.encode in email._header_value_parser._fold_as_ew on that. This obviously fails as '\udcc3\udcb1o' is not utf-8, whereas 'c?mo' is. More tests: [OK] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_a=C3=B1o?=' > b' subject: =?utf-8?q?a=C3=B1o_c=C3=B3mo?=\n\n' [OK] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_cmo?=' > b' subject: =?unknown-8bit?q?a=C3=B1o?= cmo\n\n' [OK] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o?= =?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o?=' > b' subject: =?unknown-8bit?q?a=C3=B1oa=C3=B1o?=\n\n' [KO] '=?UTF-8?Q?a=C3?= =?UTF-8?Q?=B1o_a=C3=B1o?=' > 'utf-8' codec can't encode characters in position 1-2: surrogates not allowed Not sure what is the best way to fix that. ---------- components: Library (Lib) messages: 407379 nosy: marc.villain priority: normal severity: normal status: open title: EmailMessage as_bytes type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 10:19:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 15:19:04 +0000 Subject: [issue44637] Quoting issue on header Reply-To and other address headers In-Reply-To: <1626266697.4.0.946779337742.issue44637@roundup.psfhosted.org> Message-ID: <1638285544.29.0.258554348165.issue44637@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 10:30:49 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Nov 2021 15:30:49 +0000 Subject: [issue45917] Add math.exp2() function: 2^x In-Reply-To: <1638121649.37.0.378311866468.issue45917@roundup.psfhosted.org> Message-ID: <1638286249.04.0.634991773633.issue45917@roundup.psfhosted.org> Mark Dickinson added the comment: [Tim] > on Windows, exp2(x) is way worse then pow(2, x) Darn. > I expect we should just live with it. Agreed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 10:37:16 2021 From: report at bugs.python.org (Eric Blake) Date: Tue, 30 Nov 2021 15:37:16 +0000 Subject: [issue45939] PyErr_SetObject documentation lacks mention of reference counting Message-ID: <1638286636.68.0.690482450072.issue45939@roundup.psfhosted.org> New submission from Eric Blake : While PyErr_SetString is obvious that you do not have to worry about the reference count of 'exception', the documentation for PyErr_SetObject is silent on whether it steals or adds a reference to 'value'. This is particularly confusing, since other functions on the page (like PyErr_Restore) are explicit about stealing references. Looking at non-canonical documentation, I found https://docstore.mik.ua/orelly/other/python/0596001886_pythonian-chp-24-sect-1.html which claims PyErr_SetObject steals a reference to 'value'. But that is wrong; looking at the source code for _PyErr_SetString, it becomes obvious that once you use SetObject, the reference count will be increased, and the caller can release its own reference because nothing was stolen. I noticed this lack of documentation when trying to debug a memory leak in nbdsh: https://listman.redhat.com/archives/libguestfs/2021-November/msg00280.html ---------- assignee: docs at python components: Documentation messages: 407381 nosy: docs at python, eblake priority: normal severity: normal status: open title: PyErr_SetObject documentation lacks mention of reference counting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 10:39:25 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 30 Nov 2021 15:39:25 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1637073304.41.0.776528442295.issue45816@roundup.psfhosted.org> Message-ID: <1638286765.57.0.460965629941.issue45816@roundup.psfhosted.org> Steve Dower added the comment: An easy workaround for people encountering this is to set the PlatformToolset environment variable to v143 before building: $env:PlatformToolset = "v143" (or in CMD: set PlatformToolset=v143) Alternatively, you should be able to install the v142 toolset through VS 2022. For now, it's still the official toolset, though we'll definitely move to v143 before 3.11. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 10:59:42 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Nov 2021 15:59:42 +0000 Subject: [issue45939] PyErr_SetObject documentation lacks mention of reference counting In-Reply-To: <1638286636.68.0.690482450072.issue45939@roundup.psfhosted.org> Message-ID: <1638287982.62.0.797341135634.issue45939@roundup.psfhosted.org> Ronald Oussoren added the comment: The default behaviour of functions is to not steal references, in general only exceptions to this are documented. Likewise with return values: by default the result is a strong reference, and borrowed references are documented as such. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 11:42:42 2021 From: report at bugs.python.org (Kumar Aditya) Date: Tue, 30 Nov 2021 16:42:42 +0000 Subject: [issue45816] Python does not support standalone MSVC v143 (VS 2022) Build Tools In-Reply-To: <1638286765.57.0.460965629941.issue45816@roundup.psfhosted.org> Message-ID: Kumar Aditya added the comment: Thanks Steve, installing v142 is indeed my current workaround but would be great to support v143 as it is the latest version. On Tue, Nov 30, 2021, 21:09 Steve Dower wrote: > > Steve Dower added the comment: > > An easy workaround for people encountering this is to set the > PlatformToolset environment variable to v143 before building: > > $env:PlatformToolset = "v143" > > (or in CMD: set PlatformToolset=v143) > > Alternatively, you should be able to install the v142 toolset through VS > 2022. For now, it's still the official toolset, though we'll definitely > move to v143 before 3.11. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 11:44:35 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 30 Nov 2021 16:44:35 +0000 Subject: [issue24725] test_socket testFDPassEmpty fails on OS X 10.11+ with "Cannot allocate memory" In-Reply-To: <1437896131.77.0.341264720465.issue24725@psf.upfronthosting.co.za> Message-ID: <1638290675.1.0.11394445377.issue24725@roundup.psfhosted.org> Ronald Oussoren added the comment: The reproducer script and .c file I added earlier do not fail with "Cannot allocate memory" on macOS 12.0.1. I haven't checked yet if this is enough to avoid test failures in the (now skipped) testFDPassEmpty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 11:56:16 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 16:56:16 +0000 Subject: [issue28842] PyInstanceMethod_Type isn't hashable In-Reply-To: <1480530394.0.0.669928514028.issue28842@psf.upfronthosting.co.za> Message-ID: <1638291376.24.0.985579607849.issue28842@roundup.psfhosted.org> Change by Irit Katriel : ---------- type: behavior -> enhancement versions: +Python 3.11 -Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 11:58:14 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 16:58:14 +0000 Subject: [issue28842] PyInstanceMethod_Type isn't hashable In-Reply-To: <1480530394.0.0.669928514028.issue28842@psf.upfronthosting.co.za> Message-ID: <1638291494.61.0.177705600194.issue28842@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 11:59:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 16:59:52 +0000 Subject: [issue17186] no way to introspect registered atexit handlers In-Reply-To: <1360622130.89.0.261803397072.issue17186@psf.upfronthosting.co.za> Message-ID: <1638291592.65.0.840453724596.issue17186@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Library (Lib) type: -> enhancement versions: +Python 3.11 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:04:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 17:04:12 +0000 Subject: [issue19941] python -m imports non-ASCII .py file without encoding declaration In-Reply-To: <1386673497.85.0.313178291575.issue19941@psf.upfronthosting.co.za> Message-ID: <1638291852.52.0.653691329474.issue19941@roundup.psfhosted.org> Irit Katriel added the comment: On 3.11 both are working (on a Mac): cpython-1 % python -m tt ?Hello world! cpython-1 % ./python.exe -c 'import tt' ?Hello world! ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:05:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 17:05:03 +0000 Subject: [issue19941] python -m imports non-ASCII .py file without encoding declaration In-Reply-To: <1386673497.85.0.313178291575.issue19941@psf.upfronthosting.co.za> Message-ID: <1638291903.0.0.356449179236.issue19941@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:07:07 2021 From: report at bugs.python.org (Ethan Smith) Date: Tue, 30 Nov 2021 17:07:07 +0000 Subject: [issue45940] add_multiarch_paths breaks cross compilation to Emscripten Message-ID: <1638292027.25.0.771827901631.issue45940@roundup.psfhosted.org> New submission from Ethan Smith : When I cross compile on an Ubuntu system, the "PyBuildExt.add_multiarch_paths" method seems to add system includes, even when cross compiling for Emscripten. Adding the system includes breaks Emscripten and causes several extensions to fail to build. I have a patch which fixes this that I will be submitting shortly to Github. ---------- components: Build messages: 407387 nosy: christian.heimes, ethan smith priority: normal severity: normal status: open title: add_multiarch_paths breaks cross compilation to Emscripten type: compile error versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:16:30 2021 From: report at bugs.python.org (Ethan Smith) Date: Tue, 30 Nov 2021 17:16:30 +0000 Subject: [issue45940] add_multiarch_paths breaks cross compilation to Emscripten In-Reply-To: <1638292027.25.0.771827901631.issue45940@roundup.psfhosted.org> Message-ID: <1638292590.67.0.274266276447.issue45940@roundup.psfhosted.org> Change by Ethan Smith : ---------- keywords: +patch pull_requests: +28094 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29868 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:25:40 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Nov 2021 17:25:40 +0000 Subject: [issue45940] add_multiarch_paths breaks cross compilation to Emscripten In-Reply-To: <1638292027.25.0.771827901631.issue45940@roundup.psfhosted.org> Message-ID: <1638293140.25.0.211895376292.issue45940@roundup.psfhosted.org> Christian Heimes added the comment: Could you please try again with latest master? GH-29752 should have fixed the issue. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:35:26 2021 From: report at bugs.python.org (Ethan Smith) Date: Tue, 30 Nov 2021 17:35:26 +0000 Subject: [issue45940] add_multiarch_paths breaks cross compilation to Emscripten In-Reply-To: <1638292027.25.0.771827901631.issue45940@roundup.psfhosted.org> Message-ID: <1638293726.84.0.841921422808.issue45940@roundup.psfhosted.org> Ethan Smith added the comment: Bah, it actually seems the real issue is that my configure is choosing the host_cpu as x86-64 for some reason. I'm still trying to figure out why though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:40:24 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Nov 2021 17:40:24 +0000 Subject: [issue45940] add_multiarch_paths breaks cross compilation to Emscripten In-Reply-To: <1638292027.25.0.771827901631.issue45940@roundup.psfhosted.org> Message-ID: <1638294024.13.0.439686417856.issue45940@roundup.psfhosted.org> Christian Heimes added the comment: rm config.cache? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 12:49:56 2021 From: report at bugs.python.org (Ethan Smith) Date: Tue, 30 Nov 2021 17:49:56 +0000 Subject: [issue45940] add_multiarch_paths breaks cross compilation to Emscripten In-Reply-To: <1638292027.25.0.771827901631.issue45940@roundup.psfhosted.org> Message-ID: <1638294596.89.0.999385070289.issue45940@roundup.psfhosted.org> Ethan Smith added the comment: Unfortunately, I am using latest master :/ I was able to reproduce this issue in your wasm docker container mounting CPython master into it, if you want to play with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 13:20:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 18:20:31 +0000 Subject: [issue24124] Two versions of instructions for installing Python modules In-Reply-To: <1430744496.1.0.475235677565.issue24124@psf.upfronthosting.co.za> Message-ID: <1638296431.42.0.856142909023.issue24124@roundup.psfhosted.org> Irit Katriel added the comment: The legacy doc has this message in it now, so I think we can close this issue and trust Steve to deal with it along with the rest of distutils. The entire ``distutils`` package has been deprecated and will be removed in Python 3.12. This documentation is retained as a reference only, and will be removed with the package. See the :ref:`What's New ` entry for more information. ---------- nosy: +iritkatriel, steve.dower resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 13:23:22 2021 From: report at bugs.python.org (Dino Viehland) Date: Tue, 30 Nov 2021 18:23:22 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1638296602.47.0.567586706136.issue30533@roundup.psfhosted.org> Dino Viehland added the comment: New changeset af8c8caaf5e07c02202d736a31f6a2f7e27819b8 by Weipeng Hong in branch 'main': bpo-30533:Add function inspect.getmembers_static that does not call properties or dynamic properties. (#20911) https://github.com/python/cpython/commit/af8c8caaf5e07c02202d736a31f6a2f7e27819b8 ---------- nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 13:32:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 18:32:32 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638297152.58.0.969529627428.issue11352@roundup.psfhosted.org> Irit Katriel added the comment: Since there was no activity on this for 6-7 years and it's not describing a specific issue, I will close this in a couple of weeks unless someone asks me not to. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 13:34:51 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 18:34:51 +0000 Subject: [issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638297291.31.0.331065604033.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PEP 674 "Disallow using macros as l-value" for this change: https://python.github.io/peps/pep-0674/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 13:44:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 18:44:38 +0000 Subject: [issue20468] [doc] resource module documentation is incorrect In-Reply-To: <1391208641.83.0.141932054107.issue20468@psf.upfronthosting.co.za> Message-ID: <1638297878.43.0.751156974076.issue20468@roundup.psfhosted.org> Irit Katriel added the comment: The remaining text is now saying "Returns the number of bytes in a system page". This is still not accurate if it's sometimes number of kilobytes. ---------- nosy: +iritkatriel title: resource module documentation is incorrect -> [doc] resource module documentation is incorrect type: -> behavior versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 13:48:35 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 18:48:35 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1638298115.4.0.607703766822.issue27779@roundup.psfhosted.org> Change by Irit Katriel : ---------- assignee: skrah -> keywords: +easy -patch type: -> enhancement versions: +Python 3.11 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 15:00:37 2021 From: report at bugs.python.org (Glenn Linderman) Date: Tue, 30 Nov 2021 20:00:37 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638302437.78.0.515785785229.issue11352@roundup.psfhosted.org> Glenn Linderman added the comment: Seems like another example of the CGI module not getting much support. While I haven't looked at all the details of the patches, it seems that several people have contributed enhancements or clarifications. and it would be a shame to discard them rather than merge the submissions... but it seems no one with authority wants to support CGI. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 15:04:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 20:04:51 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638302691.68.0.443049905964.issue11352@roundup.psfhosted.org> Irit Katriel added the comment: Would you like to work on a GitHub PR with these changes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 15:20:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 20:20:38 +0000 Subject: [issue6471] errno and strerror attributes incorrectly set on socket errors wrapped by urllib In-Reply-To: <1247432074.99.0.825435411389.issue6471@psf.upfronthosting.co.za> Message-ID: <1638303638.34.0.57968795211.issue6471@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on 3.11: >>> from urllib.request import urlopen >>> try: ... urlopen('http://www.pythonfoobarbaz.org') ... except Exception as exc: ... err = exc ... print('err:', err) ... print('repr(err):', repr(err)) ... print('err.errno:', err.errno) ... print('err.strerror:', err.strerror) ... print('err.reason:', err.reason) ... print('err.reason.errno:', err.reason.errno) ... print('err.reason.strerror:', err.reason.strerror) ... err: repr(err): URLError(gaierror(8, 'nodename nor servname provided, or not known')) err.errno: None err.strerror: None err.reason: [Errno 8] nodename nor servname provided, or not known err.reason.errno: 8 err.reason.strerror: nodename nor servname provided, or not known ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 15:23:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 20:23:03 +0000 Subject: [issue25633] The documentation for urllib.request should mention http.client.HTTPException In-Reply-To: <1447663371.73.0.839165836135.issue25633@psf.upfronthosting.co.za> Message-ID: <1638303783.08.0.318887477147.issue25633@roundup.psfhosted.org> Irit Katriel added the comment: Issue22797 was resolved by being more specific about when a URLError is raised, rather than mentioning other exceptions as well. Do we want to do more than that, or can this be closed as well? ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 16:50:04 2021 From: report at bugs.python.org (Tom E) Date: Tue, 30 Nov 2021 21:50:04 +0000 Subject: [issue45933] Illegal Instrution (Core Dumped) In-Reply-To: <1638224710.52.0.0477949346292.issue45933@roundup.psfhosted.org> Message-ID: <1638309004.15.0.159794440428.issue45933@roundup.psfhosted.org> Tom E added the comment: Not yet... my configure flags are ./configure CFLAGS="-O3 -mtune=corei7-avx -march=corei7-avx" LDFLAGS="-L/usr/local/ssl/lib64" CPP=cpp CXX=g++ --with-openssl=/usr/local/ssl --enable-optimizations --enable-shared ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 17:37:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 22:37:29 +0000 Subject: [issue45711] Simplify the interpreter's (type, val, tb) exception representation In-Reply-To: <1636025387.26.0.346517237471.issue45711@roundup.psfhosted.org> Message-ID: <1638311849.33.0.776223692817.issue45711@roundup.psfhosted.org> Irit Katriel added the comment: New changeset 8a45ca542a65ea27e7acaa44a4c833a27830e796 by Irit Katriel in branch 'main': bpo-45711: Change exc_info related APIs to derive type and traceback from the exception instance (GH-29780) https://github.com/python/cpython/commit/8a45ca542a65ea27e7acaa44a4c833a27830e796 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 17:45:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 22:45:55 +0000 Subject: [issue45941] help("modules") segfaults on 3.11 Message-ID: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> New submission from Irit Katriel : Python 3.11.0a2+ (heads/main:8a45ca542a, Nov 30 2021, 22:40:56) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> help("modules") Please wait a moment while I gather a list of all available modules... /Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives __import__(info.name) /Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+ __import__(info.name) test_sqlite3: testing with version '2.6.0', sqlite_version '3.32.3' /Users/iritkatriel/src/cpython/Lib/distutils/command/build_ext.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead from distutils.sysconfig import customize_compiler, get_python_version zsh: segmentation fault ./python.exe ---------- components: Interpreter Core messages: 407403 nosy: iritkatriel priority: normal severity: normal status: open title: help("modules") segfaults on 3.11 type: crash versions: Python 3.11 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 17:46:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 22:46:12 +0000 Subject: [issue45941] help("modules") segfaults on 3.11 In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638312372.95.0.163744460662.issue45941@roundup.psfhosted.org> Irit Katriel added the comment: On the debugger: >>> help("modules") Please wait a moment while I gather a list of all available modules... /Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives __import__(info.name) /Users/iritkatriel/src/cpython/Lib/pkgutil.py:92: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+ __import__(info.name) test_sqlite3: testing with version '2.6.0', sqlite_version '3.32.3' /Users/iritkatriel/src/cpython/Lib/distutils/command/build_ext.py:13: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead from distutils.sysconfig import customize_compiler, get_python_version Process 88596 stopped * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0) frame #0: 0x0000000100160046 python.exe`_PyObject_GenericGetAttrWithDict(obj=0x0000000106acfa50, name=0x0000000100fe91c0, dict=0x0000000000000000, suppress=0) at object.c:1305:17 1302 PyDictValues **values_ptr = _PyObject_ValuesPointer(obj); 1303 if (values_ptr && *values_ptr) { 1304 if (PyUnicode_CheckExact(name)) { -> 1305 assert(*_PyObject_DictPointer(obj) == NULL); 1306 res = _PyObject_GetInstanceAttribute(obj, *values_ptr, name); 1307 if (res != NULL) { 1308 goto done; Target 0: (python.exe) stopped. (lldb) p _PyObject_Dump(name) object address : 0x100fe91c0 object refcount : 165 object type : 0x10051aec0 object type name: str object repr : 'string' (lldb) p _PyObject_Dump(*_PyObject_DictPointer(obj)) error: Execution was interrupted, reason: Attempted to dereference an invalid pointer.. The process has been returned to the state before expression evaluation. (lldb) p _PyObject_Dump(obj) object address : 0x106acfa50 object refcount : 7 object type : 0x105add590 object type name: _cffi_backend.FFI object repr : <_cffi_backend.FFI object at 0x106acfa50> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 17:47:29 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 22:47:29 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638312449.51.0.603308763722.issue45941@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: help("modules") segfaults on 3.11 -> help("modules") segfaults on 3.11, MacOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 17:49:31 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 22:49:31 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638312571.32.0.885188497927.issue45941@roundup.psfhosted.org> Irit Katriel added the comment: It works for me on 3.10. ---------- keywords: +3.11regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 17:53:17 2021 From: report at bugs.python.org (Dino Viehland) Date: Tue, 30 Nov 2021 22:53:17 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1638312797.6.0.0995435628561.issue30533@roundup.psfhosted.org> Change by Dino Viehland : ---------- stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:14:06 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 23:14:06 +0000 Subject: [issue45340] Lazily create dictionaries for plain Python objects In-Reply-To: <1633087277.57.0.188806648124.issue45340@roundup.psfhosted.org> Message-ID: <1638314046.44.0.13736977857.issue45340@roundup.psfhosted.org> Irit Katriel added the comment: I believe this may have caused the regression in Issue45941. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:13:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 23:13:07 +0000 Subject: [issue45941] help("modules") segfaults on 3.11, MacOS In-Reply-To: <1638312355.41.0.606974934326.issue45941@roundup.psfhosted.org> Message-ID: <1638313987.93.0.272837705519.issue45941@roundup.psfhosted.org> Irit Katriel added the comment: It's failing in this assertion which was added in https://github.com/python/cpython/pull/28802 : https://github.com/python/cpython/blob/8a45ca542a65ea27e7acaa44a4c833a27830e796/Objects/object.c#L1305 ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:23:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 23:23:42 +0000 Subject: [issue16652] [doc] socket.getfqdn docs are not explicit enough about the algorithm. In-Reply-To: <1355089481.55.0.645096435972.issue16652@psf.upfronthosting.co.za> Message-ID: <1638314622.2.0.618124179326.issue16652@roundup.psfhosted.org> Irit Katriel added the comment: There was a recent update nearby in issue40635 by Andrei, but I think it doesn't quite cover this issue. ---------- nosy: +andrei.avk, iritkatriel title: socket.getfqdn docs are not explicit enough about the algorithm. -> [doc] socket.getfqdn docs are not explicit enough about the algorithm. versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:33:23 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 23:33:23 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index In-Reply-To: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> Message-ID: <1638315203.52.0.660667805946.issue31042@roundup.psfhosted.org> Irit Katriel added the comment: My reading of the discussion is that we are not going to make any changes to the docs. Please correct me if I missed anything. ---------- nosy: +iritkatriel resolution: -> rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:33:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 23:33:23 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638315203.38.0.516025523691.issue45476@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: [C API] Disallow using PyFloat_AS_DOUBLE() as l-value -> [C API] PEP 674: Disallow using macros as l-value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:37:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 23:37:23 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638315443.94.0.604146909411.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: In the PyPI top 5000, I found two projects using PyDescr_TYPE() and PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was code generated by SWIG: * This file was automatically generated by SWIG (http://www.swig.org). * Version 4.0.2 M2Crypto-0.38.0/src/SWIG/_m2crypto_wrap.c and mecab-python3-1.0.4/src/MeCab/MeCab_wrap.cpp contain the function: SWIGINTERN PyGetSetDescrObject * SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) { PyGetSetDescrObject *descr; descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0); assert(descr); Py_XINCREF(type); PyDescr_TYPE(descr) = type; PyDescr_NAME(descr) = PyString_InternFromString(getset->name); descr->d_getset = getset; if (PyDescr_NAME(descr) == NULL) { Py_DECREF(descr); descr = NULL; } return descr; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:37:41 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 23:37:41 +0000 Subject: [issue33252] [doc] Clarify ResourceWarning documentation In-Reply-To: <1523312024.12.0.682650639539.issue33252@psf.upfronthosting.co.za> Message-ID: <1638315461.74.0.318878122418.issue33252@roundup.psfhosted.org> Irit Katriel added the comment: It's too late for (b) but (a) still needs to be done. ---------- keywords: +easy nosy: +iritkatriel title: Clarify ResourceWarning documentation -> [doc] Clarify ResourceWarning documentation versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:39:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 30 Nov 2021 23:39:57 +0000 Subject: [issue22942] Language Reference - optional comma In-Reply-To: <1416945158.04.0.329806790258.issue22942@psf.upfronthosting.co.za> Message-ID: <1638315597.14.0.512463772703.issue22942@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:46:17 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Nov 2021 23:46:17 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638315977.8.0.223340395468.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: I found 4 projects using "Py_TYPE(obj) = new_type;" in the PyPI top 5000: mypy-0.910: * mypyc/lib-rt/misc_ops.c: Py_TYPE(template_) = &PyType_Type; * mypyc/lib-rt/misc_ops.c: Py_TYPE(t) = metaclass; recordclass-0.16.3: * lib/recordclass/_dataobject.c: Py_TYPE(op) = type; * lib/recordclass/_dataobject.c: Py_TYPE(op) = type; * lib/recordclass/_litetuple.c: // Py_TYPE(ob) = &PyLiteTupleType_Type; pysha3-1.0.2: * Modules/_sha3/sha3module.c: Py_TYPE(type) = &PyType_Type; datatable-1.0.0.tar.gz: * src/core/python/namedtuple.cc: Py_TYPE(v) = type.v; * src/core/python/tuple.cc: Py_TYPE(v_new) = v_type; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:54:43 2021 From: report at bugs.python.org (Daisy Choi) Date: Tue, 30 Nov 2021 23:54:43 +0000 Subject: [issue45942] shutil.copytree can raise OSErrors not wrapped in shutil.Error Message-ID: <1638316483.94.0.0446181658365.issue45942@roundup.psfhosted.org> New submission from Daisy Choi : shutil.copytree's docstring [1] and documentation [2] states that, "If exception(s) occur, an Error is raised with a list of reasons," but it can raise OSErrors at the top-level call. For example: >>> import shutil >>> shutil.copytree(nonexistent_dir, dst) FileNotFoundError: [WinError 3] The system cannot find the path specified: '...' >>> shutil.copytree(actually_a_file, dst) NotADirectoryError: [WinError 267] The directory name is invalid: '...' >>> shutil.copytree(src, dst_already_exists, dirs_exist_ok=False) FileExistsError: [WinError 183] Cannot create a file when that file already exists: '...' The errors above happen because shutil.copytree and shutil._copytree call os.scandir and os.makedir respectively without wrapping any exceptions inside shutil.Error. [3][4] It seems like shutil.copytree(src, dst) only raises a shutil.Error if an OSError or shutil.Error was raised when copying over a file in src or during a recursive call to shutil.copytree for a subdirectory of src: >>> shutil.copytree(dir_with_broken_symblink, dst) shutil.Error: [('a\\symlink', 'b\\symlink', "[Errno 2] No such file or directory: 'a\\\\symlink'")] Is this behavior intended? Should shutil.copytree be changed so that exceptions for the top level are wrapped inside shutil.Error, or should the documentation for shutil.copytree mention that it can raise exceptions that aren't shutil.Error? (Or is this just a non-issue?) [1]: https://github.com/python/cpython/blob/b494f5935c92951e75597bfe1c8b1f3112fec270/Lib/shutil.py#L522 [2]: https://docs.python.org/3.10/library/shutil.html?highlight=shutil#shutil.copytree [3]: https://github.com/python/cpython/blob/b494f5935c92951e75597bfe1c8b1f3112fec270/Lib/shutil.py#L554 [4]: https://github.com/python/cpython/blob/b494f5935c92951e75597bfe1c8b1f3112fec270/Lib/shutil.py#L457 ---------- components: Library (Lib) messages: 407413 nosy: Floozutter priority: normal severity: normal status: open title: shutil.copytree can raise OSErrors not wrapped in shutil.Error type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 18:55:23 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 30 Nov 2021 23:55:23 +0000 Subject: [issue19941] python -m imports non-ASCII .py file without encoding declaration In-Reply-To: <1386673497.85.0.313178291575.issue19941@psf.upfronthosting.co.za> Message-ID: <1638316523.03.0.288986034734.issue19941@roundup.psfhosted.org> Eryk Sun added the comment: test.py is a UTF-8 file, which is the default source encoding in Python 3. It fails as expected if the test script is encoded differently, such as Latin-1, unless the source encoding is declared. ---------- nosy: +eryksun resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:20:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Dec 2021 00:20:16 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1638318016.87.0.423206325107.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset a39f46afdead515e7ac3722464b5ee8d7b0b2c9b by Raymond Hettinger in branch 'main': bpo-45876: Correctly rounded stdev() and pstdev() for the Decimal case (GH-29828) https://github.com/python/cpython/commit/a39f46afdead515e7ac3722464b5ee8d7b0b2c9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:21:50 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 00:21:50 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638318110.45.0.894260864179.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: In the PyPI top 5000 projects, I found 32 projects using "Py_SIZE(obj) = new_size": 8 of them are written manually, 24 use Cython. 8 projects using "Py_SIZE(obj) = new_size": * guppy3-3.1.2: src/sets/bitset.c and src/sets/nodeset.c * mypy-0.910: list_resize() in mypyc/lib-rt/pythonsupport.h * pickle5-0.0.12: pickle5/_pickle.c * python-snappy-0.6.0: maybe_resize() in snappy/snappymodule.cc * recordclass-0.16.3: lib/recordclass/_dataobject.c + code generated by Cython * scipy-1.7.3: scipy/_lib/boost/boost/python/object/make_instance.hpp * zodbpickle-2.2.0: src/zodbpickle/_pickle_33.c * zstd-1.5.0.2: src/python-zstd.c 24 projects using "Py_SIZE(obj) = new_size" generated by an outdated Cython: * Naked-0.1.31 * Shapely-1.8.0 * dedupe-hcluster-0.3.8 * fastdtw-0.3.4 * fuzzyset-0.0.19 * gluonnlp-0.10.0 * hdbscan-0.8.27 * jenkspy-0.2.0 * lightfm-1.16 * neobolt-1.7.17 * orderedset-2.0.3 * ptvsd-4.3.2 * py_spy-0.3.11 * pyemd-0.5.1 * pyhacrf-datamade-0.2.5 * pyjq-2.5.2 * pypcap-1.2.3 * python-crfsuite-0.9.7 * reedsolo-1.5.4 * tables-3.6.1 * thriftpy-0.3.9 * thriftrw-1.8.1 * tinycss-0.4 * triangle-20200424 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:25:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 00:25:37 +0000 Subject: [issue45476] [C API] PEP 674: Disallow using macros as l-value In-Reply-To: <1634246251.33.0.982878943146.issue45476@roundup.psfhosted.org> Message-ID: <1638318337.51.0.158902484678.issue45476@roundup.psfhosted.org> STINNER Victor added the comment: Attached pep674_regex.py generated a regex to search for code incompatible with the PEP 674. To download PyPI top 5000, you can use my script: https://github.com/vstinner/misc/blob/main/cpython/download_pypi_top.py To grep a regex in tarball and ZIP archives, you can use the rg command: $ rg -zl REGEX DIRECTORY/*.{zip,gz,bz2,tgz} Or you can try my script: https://github.com/vstinner/misc/blob/main/cpython/search_pypi_top.py ---------- Added file: https://bugs.python.org/file50462/pep674_regex.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:27:05 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Dec 2021 00:27:05 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1638318425.77.0.41685238896.issue45876@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +28095 pull_request: https://github.com/python/cpython/pull/29869 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:43:59 2021 From: report at bugs.python.org (Glenn Linderman) Date: Wed, 01 Dec 2021 00:43:59 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638319439.78.0.362214697431.issue11352@roundup.psfhosted.org> Glenn Linderman added the comment: First I would have to learn how GitHub works, and how PRs work. And I haven't found time for that, as yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:45:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 00:45:37 +0000 Subject: [issue19941] python -m imports non-ASCII .py file without encoding declaration In-Reply-To: <1386673497.85.0.313178291575.issue19941@psf.upfronthosting.co.za> Message-ID: <1638319537.69.0.980601947514.issue19941@roundup.psfhosted.org> STINNER Victor added the comment: I confirm: Python 3.10 works as expected. Python 3.10 fails with the same SyntaxError using "python script.py" or "python -m script" if the script contains non-ASCII characters but is not encoded to UTF-8. vstinner at apu$ python3 test.py File "/home/vstinner/test.py", line 1 print('?Hello world!') ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte vstinner at apu$ python3 -m test Traceback (most recent call last): (...) File "/home/vstinner/test.py", line 1 print('?Hello world!') ^ SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:45:52 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Dec 2021 00:45:52 +0000 Subject: [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1638319552.15.0.779010089747.issue11352@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 19:39:20 2021 From: report at bugs.python.org (Qualyn Richard) Date: Wed, 01 Dec 2021 00:39:20 +0000 Subject: [issue45943] Kids10yrsapart@gmail.com Message-ID: <1638319160.38.0.564015282647.issue45943@roundup.psfhosted.org> Change by Qualyn Richard : ---------- components: email files: PSX_20210903_080553.jpg nosy: barry, oktaine57, r.david.murray priority: normal severity: normal status: open title: Kids10yrsapart at gmail.com type: behavior versions: Python 3.11 Added file: https://bugs.python.org/file50463/PSX_20210903_080553.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 20:26:07 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Dec 2021 01:26:07 +0000 Subject: [issue45876] Improve accuracy of stdev functions in statistics In-Reply-To: <1637655710.57.0.966606985611.issue45876@roundup.psfhosted.org> Message-ID: <1638321967.16.0.235909975077.issue45876@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 0aa0bd056349f73de9577ccc38560c1d01864d51 by Raymond Hettinger in branch 'main': bpo-45876: Have stdev() also use decimal specific square root. (GH-29869) https://github.com/python/cpython/commit/0aa0bd056349f73de9577ccc38560c1d01864d51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 20:34:39 2021 From: report at bugs.python.org (Zeth) Date: Wed, 01 Dec 2021 01:34:39 +0000 Subject: [issue31700] one-argument version for Generator.typing In-Reply-To: <1507192517.86.0.213398074469.issue31700@psf.upfronthosting.co.za> Message-ID: <1638322479.7.0.398284340672.issue31700@roundup.psfhosted.org> Zeth added the comment: I don't get why this is closed. It is a bug. The Generator type annotation works differently than the others, it shouldn't. Sebastian Rittau is correct here, the closer doesn't seem to have understood. As for using Iterator instead as the documentation suggests, that makes a mockery of the whole process. You might as well set everything to Any. ---------- nosy: +zeth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 20:47:31 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 01 Dec 2021 01:47:31 +0000 Subject: [issue7951] Should str.format allow negative indexes when used for __getitem__ access? In-Reply-To: <1266450859.13.0.906832569526.issue7951@psf.upfronthosting.co.za> Message-ID: <1638323251.78.0.745598726415.issue7951@roundup.psfhosted.org> Eric V. Smith added the comment: I'm closing this as "won't fix" for the negative indexing functionality. If someone wants to open an new documentation issue (and ideally provide a PR), that would be welcome. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 21:28:10 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 01 Dec 2021 02:28:10 +0000 Subject: [issue30533] missing feature in inspect module: getmembers_static In-Reply-To: <1496271168.24.0.639482608296.issue30533@psf.upfronthosting.co.za> Message-ID: <1638325690.92.0.297286024187.issue30533@roundup.psfhosted.org> Dong-hee Na added the comment: Please update the documentation also. see: https://docs.python.org/3.11/library/inspect.html?highlight=inspect#inspect.getmembers ---------- nosy: +corona10 status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 22:21:20 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 01 Dec 2021 03:21:20 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1638328880.28.0.754183600167.issue27779@roundup.psfhosted.org> Raymond Hettinger added the comment: One way to do is to dynamically update the docstrings on import. Something like this: for name in dir(_decimal.Decimal): if name.startswith('_'): continue py_method = getattr(_decimal.Decimal, name) py_doc = py_method.__doc__ if py_doc is None: continue c_method = getattr(_pydecimal.Decimal, name, None) if c_method is None: continue c_doc = c_method.__doc__ if c_doc is None or len(c_doc) < len(py_doc): c_method.__doc__ = py_doc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:00:06 2021 From: report at bugs.python.org (Joseph Fox-Rabinovitz) Date: Wed, 01 Dec 2021 04:00:06 +0000 Subject: [issue31042] Inconsistency in documentation of operator.index In-Reply-To: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> Message-ID: <1638331206.96.0.189374371514.issue31042@roundup.psfhosted.org> Joseph Fox-Rabinovitz added the comment: I closed the issue (it's already been rejected), primarily based on > a.__index__ = is an unauthorized use of a *reserved* word and the effect of such usage is not and need not be documented. > The entry for __*__ does include "*Any* use of __*__ names, in any context, that does not follow explicitly documented use, is subject to breakage without warning." To me, that says that the effect of the reserved-word assignment is undefined. It could be made to raise an exception. It's like filing a bug report for UB in C. ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 30 23:20:08 2021 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 01 Dec 2021 04:20:08 +0000 Subject: [issue45943] Kids10yrsapart@gmail.com Message-ID: <1638332408.64.0.984156286968.issue45943@roundup.psfhosted.org> Change by Jelle Zijlstra : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________